html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5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bGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #F0F0F0;
}

.inputCustom {
    border: solid 1px #1C1062;
    color: #1C1062 !important;
    border-radius: 10px;
    padding: 5px !important
}

.btnCustom {
    border-radius: 10px;
    padding: 10px !important
}

.bg-color-blue {
    background-color: #1C1062 !important
}

.txt-color-orange {
    color: #FF6019 !important
}

.day-square {
    width: 150px; /* Ajuste conforme quiser */
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}

.empty-day {
    background-color: #f9f9f9; /* Diferencia dias vazios */
    border: none;
}

.nav-link-custom {
    color: var(--mud-palette-surface) !important;
}

.nav-link-custom .mud-icon-root {
    color: var(--mud-palette-surface) !important;
}

/* Quando ativo (classe active no <a>) */
.nav-link-custom .mud-nav-link.active {
    color: var(--mud-palette-secondary) !important; /* cor secundária para texto */
}

.nav-link-custom .mud-nav-link.active .mud-icon-root {
    color: var(--mud-palette-secondary) !important; /* cor secundária para ícone */
}

.login-container {
    height: 100vh;
    overflow: hidden;
}

.left-panel {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    color: white;
    min-height: 100vh;
}

.left-content {
    position: relative;
    z-index: 2;
    height: 100%;
    align-items: center;
    text-align: center;
    justify-content: center;
    display: flex;
}

.selected-works {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    width: fit-content;
}

.auth-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.auth-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .auth-btn.active {
        background: white;
        color: #1a1a2e;
    }

    .auth-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

.creator-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.creator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ff6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.navigation-arrows {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.nav-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .nav-arrow:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.right-panel {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 100vh;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    text-align: center;
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.2;
}

.welcome-subtitle {
    color: #6b7280;
    margin-bottom: 32px;
    font-size: 16px;
}

.custom-input {
    margin-bottom: 20px;
}

    .custom-input .mud-input-root {
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background: #f9fafb;
        padding: 16px 20px;
        font-size: 16px;
    }

        .custom-input .mud-input-root:focus-within {
            border-color: #3b82f6;
            background: white;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

.forgot-password {
    text-align: right;
    margin-bottom: 24px;
}

    .forgot-password a {
        color: #6b7280;
        text-decoration: none;
        font-size: 14px;
    }

        .forgot-password a:hover {
            color: #3b82f6;
        }

.login-button {
    width: 100%;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .login-button:hover {
        background: #dc2626;
        transform: translateY(-1px);
    }

    .login-button:disabled {
        background: #9ca3af;
        cursor: not-allowed;
        transform: none;
    }

.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    color: #6b7280;
    font-size: 14px;
}

    .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: #e5e7eb;
        z-index: 1;
    }

    .divider span {
        background: white;
        padding: 0 16px;
        position: relative;
        z-index: 2;
    }

.google-button {
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    margin-bottom: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

    .google-button:hover {
        background: #f9fafb;
        border-color: #d1d5db;
    }

.signup-link {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 32px;
}

    .signup-link a {
        color: #3b82f6;
        text-decoration: none;
        font-weight: 500;
    }

        .signup-link a:hover {
            text-decoration: underline;
        }

.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

    .social-icon:hover {
        background: #e5e7eb;
        color: #374151;
    }

.language-selector {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .login-container {
        height: 100vh;
        background: #f8f9fa;
    }

        .login-container .mud-grid {
            height: 100vh;
        }

    /* Ocultar completamente o painel esquerdo em dispositivos móveis */
    .left-panel {
        display: none !important;
    }

    /* O painel direito ocupa toda a tela */
    .right-panel {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        min-height: 100vh;
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .login-form-container {
        padding: 32px 24px;
        margin: 0;
        width: 100%;
        max-width: 400px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .welcome-title {
        font-size: 28px;
    }

    .brand-logo {
        font-size: 20px;
    }

    .custom-input .mud-input-root {
        padding: 14px 16px;
        font-size: 16px;
    }

    .login-button, .google-button {
        padding: 14px;
        font-size: 16px;
    }
}

/* === ESTILOS PRINCIPAIS === */
.study-card {
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa !important;
    max-width: 100%;
    box-sizing: border-box;
}

    .study-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
        border-color: #d0d0d0 !important;
    }

/* === CONTAINER DO ÍCONE === */
.icon-container {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
    margin-left:10px;
}

.study-card:hover .icon-container {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lesson-icon:hover {
    background: #e3f2fd !important;
}

.revision-icon:hover {
    background: #f3e5f5 !important;
}

.questions-icon:hover {
    background: #fce4ec !important;
}

/* === TIPOGRAFIA === */
.card-title {
    color: #2c2c2c !important;
    font-weight: 600 !important;
    margin-bottom: 2px !important;
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
}

.card-subject {
    color: #424242 !important;
    font-weight: 500 !important;
    margin-bottom: 2px !important;
    font-size: 0.85rem !important;
}

.card-subtitle {
    color: #757575 !important;
    font-weight: 400 !important;
    font-size: 0.8rem !important;
}

/* === BOTÕES === */
.action-buttons {
    flex-shrink: 0;
    margin-right:10px;
}

.action-btn {
    border-radius: 10px !important;
    text-transform: none !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    transition: all 0.3s ease !important;
    min-width: 80px !important;
    border: none !important;
    font-size: 0.8rem !important;
}

    .action-btn:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
    }

.success-btn {
    background: #4caf50 !important;
    color: white !important;
}

    .success-btn:hover {
        background: #45a049 !important;
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25) !important;
    }

.questions-btn {
    background: #e91e63 !important;
    color: white !important;
}

    .questions-btn:hover {
        background: #d81b60 !important;
        box-shadow: 0 4px 12px rgba(233, 30, 99, 0.25) !important;
    }

.youtube-btn {
    background: #ff4444 !important;
    color: white !important;
    min-width: 70px !important;
}

    .youtube-btn:hover {
        background: #cc0000 !important;
        box-shadow: 0 4px 12px rgba(255, 68, 68, 0.25) !important;
    }

.status-btn {
    border-radius: 8px !important;
    text-transform: none !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
    min-width: 32px !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.studied-btn {
    background: #4caf50 !important;
    color: white !important;
}

    .studied-btn:hover {
        background: #45a049 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 3px 8px rgba(76, 175, 80, 0.2) !important;
    }

.not-studied-btn {
    background: #f44336 !important;
    color: white !important;
}

    .not-studied-btn:hover {
        background: #d32f2f !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 3px 8px rgba(244, 67, 54, 0.2) !important;
    }

/* === RESPONSIVIDADE MOBILE === */
@media (max-width: 768px) {
    .study-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .icon-container {
        width: 45px;
        height: 45px;
    }

    .card-title {
        font-size: 0.9rem !important;
    }

    .card-subject {
        font-size: 0.8rem !important;
    }

    .card-subtitle {
        font-size: 0.75rem !important;
    }

    .action-btn {
        min-width: 70px !important;
        padding: 5px 10px !important;
        font-size: 0.75rem !important;
    }

    .youtube-btn {
        min-width: 60px !important;
    }

    .status-btn {
        min-width: 28px !important;
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
    }

    /* Ajustes específicos para modal em mobile */
    .mud-dialog-content {
        padding: 8px !important;
    }

    .study-card .p-3 {
        padding: 12px !important;
    }

    .study-card .mb-2 {
        margin-bottom: 8px !important;
    }

    .gap-1 {
        gap: 4px !important;
    }

    .gap-2 {
        gap: 6px !important;
    }
}

@media (max-width: 480px) {
    .study-card {
        border-radius: 12px !important;
    }

    .icon-container {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .card-title {
        font-size: 0.85rem !important;
    }

    .action-btn {
        min-width: 60px !important;
        font-size: 0.7rem !important;
    }

    .youtube-btn {
        min-width: 55px !important;
    }

    .status-btn {
        min-width: 24px !important;
        padding: 2px 4px !important;
    }

    /* Layout mais compacto para telas muito pequenas */
    .study-card .p-3 {
        padding: 10px !important;
    }
}

/* === ANIMAÇÕES === */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.study-card {
    animation: slideInUp 0.4s ease-out;
}

/* === CHIPS PERSONALIZADOS === */
.mud-chip {
    font-weight: 500 !important;
    height: 24px !important;
}

/* === FLEXBOX HELPERS === */
.flex-wrap {
    flex-wrap: wrap !important;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

/* === ESTADOS ESPECIAIS === */
.study-card.completed {
    opacity: 0.8;
    background: #f1f8e9 !important;
    border-color: #c8e6c9 !important;
}

.study-card.in-progress {
    border: 2px solid #ffc107 !important;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.15) !important;
}

.q-question-enunciation img {
    max-width: 100%;
    height: auto;
}

.mud-collapse-wrapper-inner {
    max-width: 100%; /* nunca maior que o pai */
    overflow-x: auto; /* scroll horizontal se precisar */
    overflow-y: hidden; /* evita scroll vertical desnecessário */
}

.mud-collapse-wrapper-inner * {
    max-width: 100%; /* filhos não podem ultrapassar o container */
    box-sizing: border-box;
}

.mud-collapse-wrapper-inner img {
    height: auto;
    display: block;
    margin: 0 auto; /* centraliza imagens */
}

.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: radial-gradient(circle, #22c55e 20%, transparent 20%), radial-gradient(circle, #4ade80 20%, transparent 20%), radial-gradient(circle, #86efac 20%, transparent 20%);
    background-size: 10px 10px;
    animation: confetti-fall 1.5s ease-in-out infinite;
}

@keyframes confetti-fall {
    0% {
        background-position: 0 0, 10px 10px, 20px -10px;
    }

    100% {
        background-position: 0 100px, 10px 110px, 20px 90px;
    }
}
