/* Extraído de templates/base.html.
 * Estilos globais do layout: navbar, dropdowns, footer, banner de
 * cookies e os breakpoints responsivos. Ficava inline e era reenviado
 * em toda requisição; aqui é servido uma vez com hash e cache longo.
 */

:root {
            --netflix-red: #e50914;
            --netflix-dark: #141414;
            --netflix-gray: #333333;
            --primary-blue: #007bff;
            --primary-purple: #6f42c1;
            --glass-bg: rgba(255, 255, 255, 0.1);
            --glass-border: rgba(255, 255, 255, 0.2);
        }

        /* AdSense — os Anúncios automáticos injetam <ins class="adsbygoogle">
           como filho direto do contêiner que o Google escolhe. Quando esse
           contêiner é um grid ou um flex (caso do hero de /simulados/), a
           unidade virava uma célula estreita numa das colunas e deixava o
           resto da linha vazio. Aqui ela é forçada a ocupar a linha inteira,
           centralizada e sem estourar a largura, em qualquer página.
           Sem !important no display: quando o anúncio não é preenchido, o
           próprio Google aplica display:none inline e precisa vencer. */
        ins.adsbygoogle {
            display: block;
            grid-column: 1 / -1;
            grid-row: auto;
            flex: 1 1 100%;
            width: 100%;
            max-width: 100%;
            margin-inline: auto;
            overflow: hidden;
        }

        ins.adsbygoogle[data-ad-status="unfilled"] {
            display: none !important;
        }

        /* Netflix-style Navbar */
        .navbar-netflix {
            background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
            /* Sem backdrop-filter: o fundo é opaco (o blur seria invisível) e,
               por ser um ancestral, criava containing block que prendia o
               offcanvas (#navbarNav) dentro da navbar em vez da viewport. */
            border-bottom: 1px solid var(--glass-border);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            /* Rola junto com a página (não fica fixo). Assim as barras internas
               das páginas grudam no topo absoluto (top:0) sem sobrepor a navbar.
               z-index mantido para as dropdowns ficarem acima do conteúdo. */
            position: relative;
            z-index: 1000;
        }

        .navbar-netflix.scrolled {
            background: rgba(20, 20, 20, 0.95);
        }

        .navbar-brand-netflix {
            font-weight: 800;
            font-size: 1.5rem;
            background: linear-gradient(45deg, #ffffff, #f8f9fa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
            transition: all 0.3s ease;
            white-space: nowrap;
        }

        .navbar-brand-netflix:hover {
            transform: scale(1.05);
            filter: brightness(1.2);
        }

        .nav-link-netflix {
            color: rgba(255, 255, 255, 0.9) !important;
            font-weight: 500;
            padding: 8px 16px !important;
            border-radius: 12px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .nav-link-netflix::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .nav-link-netflix:hover::before {
            left: 100%;
        }

        .nav-link-netflix:hover,
        .nav-link-netflix.active {
            color: white !important;
            background: var(--glass-bg);
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }

        /* Badge de Notificações */
        .badge-notificacao {
            position: absolute;
            top: 2px;
            right: 4px;
            background: linear-gradient(135deg, #e53935, #d32f2f);
            color: white;
            font-size: 0.75rem;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 10px;
            min-width: 20px;
            height: 20px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            border: 2px solid rgba(15, 23, 42, 0.8);
            text-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
            box-shadow: 0 2px 8px rgba(229, 57, 53, 0.5);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.1);
            }
        }

        .dropdown-menu-netflix {
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,.12);
            animation: dropdownFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            min-width: 320px;
            max-width: 380px;
            padding: 0;
            overflow: hidden;
        }

        /* Custom scrollbar para dropdown */
        .dropdown-menu-netflix::-webkit-scrollbar {
            width: 6px;
        }

        .dropdown-menu-netflix::-webkit-scrollbar-track {
            background: #f3f4f6;
            border-radius: 10px;
        }

        .dropdown-menu-netflix::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 10px;
        }

        .dropdown-menu-netflix::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }

        @keyframes dropdownFadeIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

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

        /* Dropdown claro para menu Estudar */
        .dropdown-menu-estudar {
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,.12);
            animation: dropdownFadeIn .3s cubic-bezier(.4,0,.2,1);
            min-width: 200px;
            padding: .4rem 0;
            overflow: hidden;
        }
        .dropdown-menu-estudar .dropdown-item {
            color: #374151;
            padding: .55rem 1rem;
            font-size: .88rem;
            font-weight: 500;
            transition: all .15s;
        }
        .dropdown-menu-estudar .dropdown-item i {
            width: 20px;
            text-align: center;
            color: #667eea;
        }
        .dropdown-menu-estudar .dropdown-item:hover {
            background: #f3f0ff;
            color: #667eea;
        }
        .dropdown-menu-estudar .dropdown-item.active {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: #fff;
        }
        .dropdown-menu-estudar .dropdown-item.active i {
            color: #fff;
        }

        /* Responsividade mobile/tablet para dropdown Estudar */
        @media (max-width: 1199.98px) {
            .dropdown-menu-estudar {
                background: transparent !important;
                border: none !important;
                box-shadow: none !important;
                border-radius: 0 !important;
                padding: 0 0 0 1rem !important;
                margin: 0 !important;
                animation: none !important;
            }
            .dropdown-menu-estudar .dropdown-item {
                color: rgba(255, 255, 255, 0.85);
                border-radius: 8px;
                padding: .55rem 1rem;
            }
            .dropdown-menu-estudar .dropdown-item i {
                color: rgba(255, 255, 255, 0.6);
            }
            .dropdown-menu-estudar .dropdown-item:hover,
            .dropdown-menu-estudar .dropdown-item:focus {
                background: rgba(255, 255, 255, 0.08);
                color: #fff;
            }
            .dropdown-menu-estudar .dropdown-item:hover i,
            .dropdown-menu-estudar .dropdown-item:focus i {
                color: #fff;
            }
            .dropdown-menu-estudar .dropdown-item.active {
                background: linear-gradient(135deg, rgba(102,126,234,.25), rgba(118,75,162,.25));
                color: #fff;
            }
            .dropdown-menu-estudar .dropdown-item.active i {
                color: #fff;
            }
        }

        /* Smooth collapse animation */
        .navbar-collapse {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .navbar-collapse.collapsing {
            transition: height 0.35s ease;
        }

        .navbar-collapse.show {
            animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }

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

        /* Animated hamburger to X */
        .navbar-toggler.active .navbar-toggler-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M6 6l18 18M6 24L24 6'/%3e%3c/svg%3e") !important;
        }

        /* Mobile backdrop */
        @media (max-width: 1199.98px) {
            .navbar-collapse.show::before {
                content: '';
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: -1;
                animation: fadeIn 0.3s ease;
            }

            @keyframes fadeIn {
                from {
                    opacity: 0;
                }

                to {
                    opacity: 1;
                }
            }
        }

        .dropdown-item-netflix {
            color: rgba(255, 255, 255, 0.9);
            padding: 10px 20px;
            transition: all 0.2s ease;
            border-radius: 8px;
            margin: 2px 8px;
        }

        .dropdown-item-netflix:hover {
            background: var(--glass-bg);
            color: white;
            transform: translateX(5px);
        }

        /* Seções do Dropdown */
        .dropdown-section-header {
            padding: 12px 20px 6px;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: rgba(255, 255, 255, 0.5);
            margin-top: 8px;
            margin-bottom: 4px;
            background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .dropdown-section-header:first-child {
            margin-top: 0;
        }

        .dropdown-item-with-badge {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .dropdown-badge {
            background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
            color: white;
            font-size: 0.7rem;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 12px;
            min-width: 20px;
            text-align: center;
        }

        /* ========================================= */
        /* ACCORDION MENU STYLES */
        /* ========================================= */

        .dropdown-menu-netflix .user-header {
            padding: 16px 20px;
            border-bottom: 1px solid #e5e7eb;
            background: linear-gradient(135deg, rgba(102,126,234,.06), rgba(118,75,162,.06));
        }

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

        .user-header-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            border: 2px solid #e5e7eb;
        }

        .user-header-details h6 {
            margin: 0;
            color: #1f2937;
            font-weight: 600;
            font-size: 1rem;
        }

        .user-header-details p {
            margin: 0;
            color: #6b7280;
            font-size: 0.85rem;
            word-break: break-word;
            overflow-wrap: break-word;
        }

        .accordion-menu {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .accordion-item-custom {
            border-bottom: 1px solid #f3f4f6;
        }

        .accordion-item-custom:last-child {
            border-bottom: none;
        }

        .accordion-header-custom {
            padding: 0;
            margin: 0;
            background: none;
            border: none;
        }

        .accordion-button-custom {
            width: 100%;
            padding: 14px 20px;
            background: transparent;
            border: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: #374151;
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: left;
        }

        .accordion-button-custom:hover {
            background: #f9fafb;
            color: #1f2937;
        }

        .accordion-button-custom .accordion-icon {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .accordion-button-custom .accordion-icon i {
            width: 20px;
            text-align: center;
            font-size: 1.1rem;
            background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .accordion-button-custom .accordion-chevron {
            transition: transform 0.3s ease;
            opacity: 0.6;
            font-size: 0.9rem;
        }

        .accordion-button-custom:not(.collapsed) .accordion-chevron {
            transform: rotate(180deg);
        }

        .accordion-button-custom:not(.collapsed) {
            background: linear-gradient(135deg, rgba(102,126,234,.06), rgba(118,75,162,.06));
            border-left: 3px solid #667eea;
        }

        .accordion-collapse-custom {
            display: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .accordion-collapse-custom.show {
            display: block;
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

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

        .accordion-body-custom {
            padding: 4px 0 8px 0;
            background: #f9fafb;
        }

        .accordion-body-custom .dropdown-item {
            padding: 10px 20px;
            color: #374151;
            font-size: 0.9rem;
            transition: all 0.2s ease;
            border-radius: 0;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .accordion-body-custom .dropdown-item:hover {
            background: #f3f0ff;
            color: #667eea;
            padding-left: 24px;
            border-left: 3px solid #667eea;
        }

        .accordion-body-custom .dropdown-item i {
            font-size: 0.9rem;
            color: #667eea;
            opacity: 0.7;
            width: 18px;
            margin-right: 10px;
        }

        .dropdown-footer-actions {
            padding: 12px 20px;
            border-top: 1px solid #e5e7eb;
            background: #f9fafb;
        }

        .dropdown-footer-actions form {
            margin: 0;
        }

        .dropdown-footer-actions .btn-logout {
            width: 100%;
            padding: 10px;
            background: #fff;
            border: 1px solid #e5e7eb;
            color: #374151;
            border-radius: 8px;
            font-weight: 600;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
        }

        .dropdown-footer-actions .btn-logout:hover {
            background: #fef2f2;
            border-color: #fca5a5;
            color: #ef4444;
            transform: translateY(-1px);
        }

        /* Mobile Create Button in Accordion */
        .mobile-create-btn {
            display: none;
        }

        @media (max-width: 1199.98px) {
            .mobile-create-btn {
                display: block;
                padding: 12px 20px;
                border-top: 1px solid #e5e7eb;
            }

            .mobile-create-btn a {
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 8px;
                padding: 10px;
                background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
                border-radius: 8px;
                color: white;
                font-weight: 600;
                text-decoration: none;
                transition: all 0.3s ease;
            }

            .mobile-create-btn a:hover {
                transform: translateY(-2px);
                box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
            }
        }

        .btn-netflix-primary {
            background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
            border: none;
            border-radius: 25px;
            padding: 8px 20px;
            font-weight: 600;
            color: white;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
        }

        .btn-netflix-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
            filter: brightness(1.1);
        }

        .btn-netflix-outline {
            background: transparent;
            border: 2px solid rgba(255, 255, 255, 0.6);
            border-radius: 25px;
            padding: 6px 18px;
            font-weight: 600;
            color: white;
            transition: all 0.3s ease;
        }

        .btn-netflix-outline:hover {
            background: white;
            color: var(--primary-blue);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.3);
            transition: all 0.3s ease;
        }

        .user-avatar:hover {
            border-color: white;
            transform: scale(1.1);
        }

        /* 🔔 Sino de notificações na navbar */
        .nav-notif-bell {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            color: rgba(255, 255, 255, 0.85) !important;
            font-size: 1.05rem;
            transition: all 0.2s ease;
        }
        .nav-notif-bell:hover {
            color: #fff !important;
            background: rgba(255, 255, 255, 0.12);
        }
        .nav-notif-badge {
            position: absolute;
            top: 2px;
            right: 0;
            min-width: 17px;
            height: 17px;
            padding: 0 4px;
            border-radius: 999px;
            background: #ef4444;
            color: #fff;
            font-size: 0.62rem;
            font-weight: 800;
            line-height: 17px;
            text-align: center;
            border: 2px solid #141414;
            box-sizing: content-box;
        }

        /* Username truncation */
        .nav-link.dropdown-toggle .d-none.d-sm-inline {
            max-width: 120px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: inline-block;
            vertical-align: middle;
        }

        /* Navbar Toggler - Mobile Menu Button */
        .navbar-toggler {
            border: 2px solid rgba(255, 255, 255, 0.3) !important;
            border-radius: 8px !important;
            padding: 8px 12px !important;
            transition: all 0.3s ease !important;
        }

        .navbar-toggler:hover {
            border-color: rgba(255, 255, 255, 0.6) !important;
            background: rgba(255, 255, 255, 0.1) !important;
        }

        .navbar-toggler:focus {
            box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
        }

        .navbar-toggler-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
            width: 24px !important;
            height: 24px !important;
        }

        /* ===== Sticky footer ===== */
        /* Garante que o footer fica colado no fundo da viewport quando o
           conteúdo é curto, e desce normalmente quando o conteúdo é longo.
           Resolve também o "espaço em branco" sob o flashcard: o wrapper
           principal cresce para preencher o espaço disponível, então o
           footer não flutua quando o card muda de altura por animação. */
        html, body { height: 100%; }
        body {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
        body > .container.mt-4 {
            flex: 1 0 auto;
        }
        body > footer.footer-netflix {
            flex-shrink: 0;
        }

        /* Netflix-style Footer */
        .footer-netflix {
            background: linear-gradient(135deg, #1a1a1a 0%, #0d1421 100%);
            color: rgba(255, 255, 255, 0.8);
            padding: 40px 0 20px;
            margin-top: 60px;
            position: relative;
            overflow: hidden;
        }

        .footer-netflix::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--primary-blue), var(--primary-purple), transparent);
        }

        .footer-social-links {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 30px;
        }

        .social-link {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 50%;
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            font-size: 1.2rem;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(10px);
        }

        .social-link:hover {
            background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
            color: white;
            transform: translateY(-5px) scale(1.1);
            box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
        }

        .footer-copyright {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.9rem;
        }

        .footer-links {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .footer-link {
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            font-size: 0.85rem;
            transition: color 0.3s ease;
            display: inline-flex;
            align-items: center;
        }

        .footer-link:hover {
            color: #667eea;
            text-decoration: underline;
        }

        .footer-separator {
            color: rgba(255, 255, 255, 0.3);
            font-size: 0.85rem;
        }

        /* ==================== Cookie Banner & Modal Styles ==================== */
        #cookieConsentBanner {
            display: none !important;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
            padding: 20px;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
            z-index: 9999;
            border-top: 2px solid rgba(229, 9, 20, 0.3);
        }

        #cookieConsentBanner.show {
            display: block !important;
            animation: slideUp 0.4s ease-out;
        }

        @keyframes slideUp {
            from {
                transform: translateY(100%);
                opacity: 0;
            }

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

        .cookie-banner-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .cookie-banner-icon {
            font-size: 2.5rem;
            flex-shrink: 0;
        }

        .cookie-banner-text {
            flex: 1;
            min-width: 250px;
        }

        .cookie-banner-text h4 {
            color: #fff;
            margin: 0 0 8px 0;
            font-size: 1.1rem;
            font-weight: 600;
        }

        .cookie-banner-text p {
            color: rgba(255, 255, 255, 0.8);
            margin: 0;
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .cookie-banner-text a {
            color: #e50914;
            text-decoration: underline;
            transition: color 0.3s;
        }

        .cookie-banner-text a:hover {
            color: #ff1a1a;
        }

        .cookie-banner-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .btn-cookie {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-cookie-accept {
            background: linear-gradient(135deg, #16a34a, #15803d);
            color: white;
        }

        .btn-cookie-accept:hover {
            background: linear-gradient(135deg, #15803d, #166534);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
        }

        .btn-cookie-settings {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .btn-cookie-settings:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }

        .btn-cookie-reject {
            background: rgba(229, 9, 20, 0.1);
            color: #ff4444;
            border: 1px solid rgba(229, 9, 20, 0.3);
        }

        .btn-cookie-reject:hover {
            background: rgba(229, 9, 20, 0.2);
            transform: translateY(-2px);
        }

        /* Cookie Settings Modal */
        #cookieSettingsModal {
            display: none !important;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 10000;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        #cookieSettingsModal.show {
            display: flex !important;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .cookie-modal-content {
            background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
            border-radius: 16px;
            max-width: 600px;
            width: 100%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .cookie-modal-header {
            padding: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .cookie-modal-header h3 {
            color: #fff;
            margin: 0;
            font-size: 1.3rem;
        }

        .cookie-modal-close {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.3s;
        }

        .cookie-modal-close:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        .cookie-modal-body {
            padding: 20px;
        }

        .cookie-category {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 15px;
        }

        .cookie-category-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .cookie-category-title {
            color: #fff;
            font-weight: 600;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .cookie-category-description {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.85rem;
            line-height: 1.5;
        }

        .cookie-toggle {
            position: relative;
            width: 50px;
            height: 26px;
        }

        .cookie-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .cookie-toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.2);
            transition: 0.4s;
            border-radius: 34px;
        }

        .cookie-toggle-slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: 0.4s;
            border-radius: 50%;
        }

        .cookie-toggle input:checked+.cookie-toggle-slider {
            background-color: #16a34a;
        }

        .cookie-toggle input:checked+.cookie-toggle-slider:before {
            transform: translateX(24px);
        }

        .cookie-toggle input:disabled+.cookie-toggle-slider {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .cookie-modal-footer {
            padding: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .cookie-banner-content {
                flex-direction: column;
                text-align: center;
            }

            .cookie-banner-actions {
                width: 100%;
                flex-direction: column;
            }

            .btn-cookie {
                width: 100%;
                justify-content: center;
            }

            .cookie-modal-content {
                margin: 10px;
            }
        }

        /* ==================== End Cookie Styles ==================== */

        /* Mobile optimizations */
        @media (max-width: 1199.98px) {
            .navbar-brand-netflix {
                font-size: 1.3rem;
            }

            .navbar-collapse {
                background: rgba(20, 20, 20, 0.98);
                backdrop-filter: blur(20px);
                border-radius: 15px;
                margin-top: 15px;
                padding: 15px;
                border: 1px solid rgba(255, 255, 255, 0.1);
                box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            }

            .nav-link-netflix {
                padding: 12px 16px !important;
                margin: 4px 0;
                border-radius: 10px;
            }

            .navbar-nav {
                gap: 4px;
            }

            .navbar-nav.align-items-center {
                margin-top: 15px;
                padding-top: 15px;
                border-top: 1px solid rgba(255, 255, 255, 0.1);
            }

            .navbar-nav.align-items-center .nav-item {
                margin-right: 0.75rem !important;
            }

            .navbar-nav.align-items-center .nav-item:last-child {
                margin-right: 0 !important;
            }

            .btn-netflix-primary,
            .btn-netflix-outline {
                width: 100%;
                display: block;
                margin: 5px 0;
                padding: 10px 20px;
            }

            .dropdown-menu-netflix .dropdown-item-netflix {
                padding: 10px 20px;
            }

            .user-avatar {
                width: 40px;
                height: 40px;
            }

            /* Melhor visualização do username no mobile */
            .nav-link.dropdown-toggle {
                padding: 10px 15px !important;
                display: flex !important;
                align-items: center;
                justify-content: space-between;
                background: rgba(255, 255, 255, 0.05);
                border-radius: 10px;
            }

            .nav-link.dropdown-toggle .d-none.d-sm-inline {
                display: inline !important;
            }

            /* 📱 Melhorias no Dropdown Mobile */
            .dropdown-menu-netflix {
                width: 100%;
                max-width: 320px;
                border-radius: 15px;
                padding: 0.5rem 0;
                max-height: 75vh;
                overflow-y: auto;
                position: absolute !important;
                inset: 0px auto auto 0px !important;
                margin: 0px;
                transform: translate(0px, 40px) !important;
            }

            .dropdown-item-netflix {
                padding: 12px 20px;
                font-size: 0.95rem;
                display: flex;
                align-items: center;
                transition: all 0.2s ease;
            }

            .dropdown-item-netflix i {
                width: 24px;
                text-align: center;
                font-size: 1.1rem;
            }

            .dropdown-divider {
                margin: 0.5rem 0;
            }

            /* User Avatar no Dropdown Toggle */
            .user-avatar {
                width: 36px;
                height: 36px;
                border-radius: 50%;
                object-fit: cover;
                border: 2px solid rgba(255, 255, 255, 0.3);
            }
        }

        @media (max-width: 768px) {
            .navbar-brand-netflix {
                font-size: 1.2rem;
            }

            .navbar-brand-netflix span {
                display: inline-block;
                white-space: nowrap;
            }

            /* Dropdown mais largo em tablets */
            .dropdown-menu-netflix {
                max-width: 380px;
            }

            .footer-social-links {
                gap: 15px;
            }

            .social-link {
                width: 40px;
                height: 40px;
                font-size: 1rem;
            }
        }

        @media (min-width: 768px) and (max-width: 1199.98px) {
            .dropdown-menu-netflix {
                max-width: 340px;
            }

            .navbar-collapse {
                padding: 12px;
            }
        }

        @media (max-width: 576px) {
            .navbar-brand-netflix {
                font-size: 1.1rem;
                max-width: 220px;
            }

            .navbar-brand-netflix .fa-graduation-cap {
                font-size: 1.2rem;
            }

            .nav-link-netflix {
                font-size: 0.95rem;
            }

            .nav-link-netflix i {
                width: 20px;
                text-align: center;
            }

            /* Dropdown ocupa quase toda a tela em mobile */
            .dropdown-menu-netflix {
                max-width: calc(100vw - 30px);
                left: 50% !important;
                right: auto !important;
                transform: translateX(-50%);
                margin-top: 10px;
            }

            .dropdown-item-netflix {
                padding: 14px 20px;
                font-size: 1rem;
            }

            .dropdown-item-netflix i {
                width: 28px;
                font-size: 1.2rem;
            }

            /* Avatar maior em mobile */
            .user-avatar {
                width: 40px;
                height: 40px;
            }
        }

        @media (max-width: 375px) {
            .navbar-brand-netflix {
                font-size: 1rem;
                max-width: 200px;
            }

            .navbar-brand-netflix .fa-graduation-cap {
                font-size: 1.1rem;
                margin-right: 0.25rem !important;
            }

            .navbar-collapse {
                padding: 10px;
            }

            .navbar-nav.align-items-center .nav-item {
                margin-right: 0.5rem !important;
            }

            .nav-link-netflix {
                font-size: 0.9rem;
                padding: 10px 12px !important;
            }

            .user-avatar {
                width: 36px;
                height: 36px;
            }

            .dropdown-menu-netflix {
                max-width: calc(100vw - 20px);
                max-height: 70vh;
                left: 50% !important;
                right: auto !important;
                transform: translate(-50%, 40px) !important;
                margin-top: 0;
            }

            .accordion-button-custom {
                padding: 12px 16px;
                font-size: 0.9rem;
            }

            .accordion-body-custom .dropdown-item {
                padding: 8px 16px;
                font-size: 0.85rem;
            }

            .user-header {
                padding: 12px 16px;
            }

            .user-header-avatar {
                width: 42px;
                height: 42px;
            }

            .user-header-details h6 {
                font-size: 0.95rem;
            }

            .user-header-details p {
                font-size: 0.8rem;
            }

            .btn-logout {
                padding: 8px;
                font-size: 0.9rem;
            }
        }

        @media (max-width: 360px) {
            .navbar-brand-netflix {
                font-size: 0.95rem;
                max-width: 190px;
            }

            .navbar-toggler {
                padding: 6px 10px !important;
            }

            .navbar-toggler-icon {
                width: 20px !important;
                height: 20px !important;
            }

            .navbar-nav.align-items-center .nav-item {
                margin-right: 0.4rem !important;
            }

            .nav-link-netflix i {
                font-size: 1.1rem !important;
            }

            .badge-notificacao {
                font-size: 0.65rem;
                padding: 1px 5px;
                min-width: 16px;
                height: 16px;
            }

            .user-avatar {
                width: 32px;
                height: 32px;
            }

            .accordion-button-custom {
                padding: 10px 14px;
                font-size: 0.85rem;
            }

            .accordion-button-custom .accordion-icon i {
                font-size: 1rem;
            }

            .accordion-body-custom .dropdown-item {
                padding: 7px 14px;
                font-size: 0.8rem;
            }
        }

        /* ===== Off-canvas drawer (mobile/tablet < 1200px) =====
           #navbarNav é um .offcanvas-xl: drawer abaixo de xl, navbar normal no
           desktop. Tema claro p/ combinar com o menu do usuário (avatar). */
        @media (max-width: 1199.98px) {
            /* Painel do drawer */
            #navbarNav.offcanvas {
                width: min(88vw, 360px);
                background: #fff;
                color: #1f2937;
            }
            #navbarNav .offcanvas-body {
                padding: 0.75rem 0.9rem 1.25rem;
            }

            /* Links da nav principal em texto escuro */
            #navbarNav .nav-link-netflix {
                color: #1f2937 !important;
            }
            #navbarNav .nav-link-netflix:hover,
            #navbarNav .nav-link-netflix.active {
                color: #111827 !important;
                background: #f3f0ff;
                border: 1px solid #e5e7eb;
                box-shadow: none;
                transform: none;
            }

            /* Separador entre nav e bloco do usuário visível no fundo claro */
            #navbarNav .navbar-nav.align-items-center {
                border-top-color: #e5e7eb;
                align-items: stretch !important;
            }
            #navbarNav .navbar-nav.align-items-center .nav-item {
                width: 100%;
                margin-right: 0 !important;
            }
            #navbarNav .nav-notif-bell {
                width: 100%;
                min-height: 44px;
                height: auto;
                justify-content: flex-start;
                gap: 0.75rem;
                padding: 0.65rem 1rem !important;
                border-radius: 10px;
                color: #1f2937 !important;
            }
            #navbarNav .nav-notif-bell:hover,
            #navbarNav .nav-notif-bell:focus {
                background: #f3f0ff;
            }
            #navbarNav .nav-notif-badge {
                position: static;
                margin-left: auto;
                border-color: #fff;
            }
            #navbarNav #userMenu {
                min-height: 48px;
                justify-content: flex-start !important;
                padding: 0.4rem 1rem !important;
                color: #1f2937 !important;
            }
            #navbarNav .nav-mobile-label {
                color: #1f2937;
                font-weight: 600;
            }

            /* Submenu "Estudar" inline, em texto escuro */
            #navbarNav .dropdown-menu-estudar .dropdown-item {
                color: #374151 !important;
            }
            #navbarNav .dropdown-menu-estudar .dropdown-item i {
                color: #667eea !important;
            }
            #navbarNav .dropdown-menu-estudar .dropdown-item:hover,
            #navbarNav .dropdown-menu-estudar .dropdown-item:focus {
                background: #f3f0ff;
                color: #667eea !important;
            }

            /* Menu do usuário (avatar): abre INLINE dentro do drawer,
               não mais como folha fixa em tela cheia */
            #navbarNav .dropdown-menu-netflix {
                position: static !important;
                inset: auto !important;
                transform: none !important;
                width: 100% !important;
                max-width: 100% !important;
                max-height: none !important;
                margin: 0.5rem 0 0 !important;
                border: 0 !important;
                border-top: 1px solid #e5e7eb !important;
                border-radius: 0 !important;
                box-shadow: none !important;
                overflow: visible !important;
                background: transparent !important;
                animation: none !important;
            }

            /* Botão fechar próprio do avatar é redundante (offcanvas já tem X) */
            #navbarNav .dropdown-menu-netflix .mobile-close-btn {
                display: none !important;
            }
        }

        /* Header do off-canvas (só aparece < lg) */
        .offcanvas-header .offcanvas-title {
            color: #1f2937;
            font-weight: 700;
        }
        .btn-close-offcanvas {
            background: #f3f4f6;
            border: 1px solid #e5e7eb;
            color: #374151;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 1.1rem;
            transition: all 0.2s ease;
        }
        .btn-close-offcanvas:hover {
            background: #e5e7eb;
            transform: scale(1.05);
        }

        /* Animação de entrada do topo */
        @keyframes slideInFromTop {
            from {
                opacity: 0;
                transform: translateY(-100%);
            }

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

        /* Botão fechar - oculto em desktop */
        .dropdown-menu-netflix .mobile-close-btn {
            display: none;
            position: sticky;
            top: 0;
            z-index: 100;
            background: #fff;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid #e5e7eb;
            align-items: center;
            justify-content: space-between;
        }

        .dropdown-menu-netflix .mobile-close-btn .close-title {
            color: #1f2937;
            font-weight: 700;
            font-size: 1.1rem;
            margin: 0;
        }

        .dropdown-menu-netflix .mobile-close-btn .btn-close-menu {
            background: #f3f4f6;
            border: 1px solid #e5e7eb;
            color: #374151;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1.2rem;
        }

        .dropdown-menu-netflix .mobile-close-btn .btn-close-menu:hover {
            background: #e5e7eb;
            transform: scale(1.1);
        }

        @media (max-width: 320px) {
            .navbar-brand-netflix {
                font-size: 0.85rem;
                max-width: 170px;
            }

            .navbar-brand-netflix .fa-graduation-cap {
                font-size: 1rem;
                margin-right: 0.15rem !important;
            }

            .navbar-collapse {
                padding: 8px;
                margin-top: 10px;
            }

            .nav-link-netflix {
                font-size: 0.85rem;
                padding: 8px 10px !important;
            }

            .navbar-nav.align-items-center .nav-item {
                margin-right: 0.3rem !important;
            }

            .dropdown-menu-netflix {
                max-width: calc(100vw - 16px);
            }

            .user-header-avatar {
                width: 36px;
                height: 36px;
            }

            .accordion-button-custom {
                padding: 8px 12px;
                font-size: 0.8rem;
            }

            .accordion-body-custom .dropdown-item {
                padding: 6px 12px;
                font-size: 0.75rem;
            }
        }

        /* Landscape mobile */
        @media (max-height: 500px) and (orientation: landscape) {
            .dropdown-menu-netflix {
                max-height: 60vh !important;
            }

            .navbar-collapse {
                max-height: 70vh;
                overflow-y: auto;
            }

            .accordion-button-custom {
                padding: 8px 16px;
            }

            .accordion-body-custom .dropdown-item {
                padding: 6px 16px;
            }

            .user-header {
                padding: 10px 16px;
            }
        }

        /* Form styles */
        .card {
            margin-bottom: 20px;
        }

        textarea.form-control {
            min-height: 220px;
            width: 100% !important;
            max-width: 100% !important;
            border-radius: 8px;
            box-sizing: border-box;
            padding: 12px;
            font-size: 1rem;
            line-height: 1.6;
            margin-bottom: 10px;
        }

        @media (max-width: 768px) {
            textarea.form-control {
                min-height: 180px;
                font-size: 0.95rem;
            }
        }

        /* 📱 Tablet (769–1279) — Global container override */
        @media (min-width: 769px) and (max-width: 1279px) {
            .container { max-width: 100%; padding-left: 0.5rem; padding-right: 0.5rem; }
        }
        @media (min-width: 769px) and (max-width: 900px) {
            .container { padding-left: 0.2rem; padding-right: 0.2rem; }
        }
        @media (max-width: 768px) {
            .container { max-width: 100%; padding-left: 0.25rem; padding-right: 0.25rem; }
        }

        /* ═══════════════════════════════════════════════════════════ */
        /*  ONDAS 1+2+3 — Melhorias mobile/tablet (Abr 2026)            */
        /* ═══════════════════════════════════════════════════════════ */

        /* J — Brand responsivo: tablet/mobile (navbar colapsada, < 1200px) mostra "SO360" */
        .navbar-brand-netflix .brand-short { display: none; }
        @media (max-width: 1199.98px) {
            .navbar-brand-netflix .brand-full { display: none; }
            .navbar-brand-netflix .brand-short { display: inline; }
        }

        /* B — Ações mobile (WCoin pill compacto + busca) sempre visíveis */
        .navbar-mobile-actions { z-index: 1; }
        .wcoin-mobile-pill {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 999px;
            background: rgba(255, 215, 0, 0.18);
            border: 1px solid rgba(255, 215, 0, 0.45);
            color: #fff;
            font-size: 0.78rem;
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
        }
        .wcoin-mobile-pill i { color: #FFD700; font-size: 0.85rem; }
        @media (max-width: 360px) {
            .wcoin-mobile-pill { padding: 3px 7px; font-size: 0.7rem; }
        }

        .btn-icon-mobile {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            border: 1px solid rgba(255,255,255,0.2);
            background: rgba(255,255,255,0.08);
            color: #fff;
            transition: all .2s ease;
        }
        .btn-icon-mobile:hover, .btn-icon-mobile:focus {
            background: rgba(255,255,255,0.18);
            color: #fff;
            transform: scale(1.05);
        }

        /* G — Busca: botão desktop + overlay full-screen */
        .btn-search-desktop {
            background: transparent !important;
            border: none !important;
            color: rgba(255,255,255,0.9) !important;
            cursor: pointer;
            padding: 8px 14px !important;
        }
        .btn-search-desktop:hover { color: #fff !important; background: var(--glass-bg) !important; }

        .search-overlay {
            align-items: flex-start;
            backdrop-filter: blur(8px);
            background: rgba(15, 23, 42, .72);
            display: none;
            inset: 0;
            justify-content: center;
            padding: 76px 20px 20px;
            position: fixed;
            z-index: 2000;
        }
        .search-overlay.show { animation: fadeInOv .15s ease; display: flex; }
        @keyframes fadeInOv { from { opacity: 0; } to { opacity: 1; } }
        .search-overlay-box {
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 20px;
            box-shadow: 0 18px 50px rgba(31, 41, 55, .2);
            max-height: calc(100vh - 96px);
            max-height: calc(100dvh - 96px);
            max-width: 640px;
            overflow: hidden;
            width: 100%;
        }
        .search-overlay-header {
            align-items: center;
            border-bottom: 1px solid #e5e7eb;
            display: flex;
            gap: 10px;
            padding: 14px;
        }
        .search-overlay-header > i { color: #667eea; }
        .search-overlay-input {
            border: 0;
            color: #1f2937;
            flex: 1;
            font-size: 1.02rem;
            line-height: 1.5;
            min-height: 44px;
            min-width: 0;
            outline: 0;
            padding: 8px 4px;
        }
        .search-overlay-input::placeholder { color: #9ca3af; }
        .search-overlay-input:focus-visible { box-shadow: none; }
        .search-overlay-close {
            align-items: center;
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 9px;
            color: #6b7280;
            cursor: pointer;
            display: inline-flex;
            flex: 0 0 auto;
            font-size: 1.15rem;
            height: 44px;
            justify-content: center;
            padding: 0;
            width: 44px;
        }
        .search-overlay-close:hover { border-color: #bdc5ff; color: #545fcb; }
        .search-overlay-tabs {
            background: #f8fafc;
            border-bottom: 1px solid #e5e7eb;
            display: flex;
            gap: 8px;
            padding: 10px 14px;
        }
        .search-overlay-tab {
            align-items: center;
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 999px;
            color: #4b5563;
            cursor: pointer;
            display: inline-flex;
            font-size: .82rem;
            font-weight: 650;
            justify-content: center;
            min-height: 40px;
            padding: 7px 15px;
            transition: background-color .15s ease, border-color .15s ease, color .15s ease;
        }
        .search-overlay-tab.active { background: #667eea; border-color: #667eea; color: #fff; }
        .search-overlay-tab:hover:not(.active) { border-color: #bdc5ff; color: #545fcb; }
        .search-overlay-close:focus-visible,
        .search-overlay-tab:focus-visible,
        .search-overlay-result:focus-visible,
        .search-overlay-view-all:focus-visible {
            box-shadow: 0 0 0 3px rgba(102, 126, 234, .2);
            outline: 2px solid #667eea;
            outline-offset: 2px;
        }
        .search-overlay-status {
            color: #6b7280;
            font-size: .78rem;
            min-height: 38px;
            padding: 11px 16px 8px;
        }
        .search-overlay-results {
            display: grid;
            gap: 4px;
            max-height: min(420px, 50vh);
            overflow-x: hidden;
            overflow-y: auto;
            padding: 2px 10px 10px;
        }
        .search-overlay-results[hidden] { display: none; }
        .search-overlay-result {
            align-items: center;
            border: 1px solid transparent;
            border-radius: 14px;
            color: inherit;
            display: flex;
            gap: 12px;
            min-height: 64px;
            min-width: 0;
            padding: 9px 10px;
            text-decoration: none;
        }
        .search-overlay-result:hover,
        .search-overlay-result.is-active {
            background: #f0f1ff;
            border-color: #dfe2ff;
            color: inherit;
            text-decoration: none;
        }
        .search-overlay-result-icon {
            align-items: center;
            background: #f0f1ff;
            border: 1px solid #dfe2ff;
            border-radius: 9px;
            display: flex;
            flex: 0 0 auto;
            font-size: 1.1rem;
            height: 42px;
            justify-content: center;
            width: 42px;
        }
        .search-overlay-result-copy { flex: 1 1 auto; min-width: 0; }
        .search-overlay-result-title {
            color: #1f2937;
            display: block;
            font-size: .88rem;
            font-weight: 700;
            line-height: 1.35;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .search-overlay-result-title mark { background: #fef3c7; border-radius: 3px; color: inherit; padding: 0 1px; }
        .search-overlay-result-subtitle {
            color: #6b7280;
            display: block;
            font-size: .76rem;
            margin-top: 2px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .search-overlay-result-arrow { color: #9ca3af; margin-left: auto; }
        .search-overlay-empty {
            color: #6b7280;
            padding: 24px 16px 28px;
            text-align: center;
        }
        .search-overlay-empty i { color: #9ca3af; display: block; font-size: 1.4rem; margin-bottom: 8px; }
        .search-overlay-empty strong { color: #374151; display: block; font-size: .9rem; margin-bottom: 3px; }
        .search-overlay-loading { display: grid; gap: 8px; padding: 6px 12px 14px; }
        .search-overlay-loading span { animation: searchPulse 1s ease-in-out infinite alternate; background: #eef0f5; border-radius: 9px; display: block; height: 54px; }
        @keyframes searchPulse { from { opacity: .55; } to { opacity: 1; } }
        .search-overlay-footer {
            align-items: center;
            background: #f8fafc;
            border-top: 1px solid #e5e7eb;
            display: flex;
            gap: 12px;
            justify-content: space-between;
            min-height: 52px;
            padding: 9px 14px;
        }
        .search-overlay-hint { color: #6b7280; font-size: .75rem; }
        .search-overlay-view-all {
            align-items: center;
            color: #545fcb;
            display: inline-flex;
            font-size: .78rem;
            font-weight: 700;
            gap: 5px;
            min-height: 36px;
            padding: 4px 6px;
            text-decoration: none;
            white-space: nowrap;
        }
        .search-overlay-view-all[hidden] { display: none; }
        .search-overlay-view-all:hover { color: #3f4bb3; text-decoration: underline; }
        @media (max-width: 640px) {
            .search-overlay { align-items: flex-start; padding: 12px; }
            .search-overlay-box { border-radius: 14px; max-height: calc(100dvh - 24px); }
            .search-overlay-header { padding: 10px 12px; }
            .search-overlay-tabs { padding-inline: 12px; }
            .search-overlay-tab { flex: 1; }
            .search-overlay-results { max-height: calc(100dvh - 258px); }
            .search-overlay-footer { align-items: stretch; flex-direction: column; gap: 2px; }
            .search-overlay-hint { text-align: center; }
            .search-overlay-view-all { justify-content: center; }
        }
        @media (prefers-reduced-motion: reduce) {
            .search-overlay.show,
            .search-overlay-loading span { animation: none; }
            .search-overlay-tab { transition: none; }
        }

        /* I — Indicadores de página atual no accordion mobile */
        .quick-links {
            display: flex;
            flex-direction: column;
            border-bottom: 1px solid #e5e7eb;
            padding: 6px 0;
        }
        .dropdown-item.quick-link {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            font-weight: 600;
            color: #0f172a;
        }
        .dropdown-item.quick-link i { color: #6f42c1; width: 18px; text-align: center; }
        .dropdown-item.quick-link:hover {
            background: linear-gradient(90deg, rgba(0,123,255,.06), transparent);
            color: #007bff;
        }
        .dropdown-item.active,
        .dropdown-item.quick-link.active {
            background: linear-gradient(90deg, rgba(229,9,20,.08), transparent) !important;
            color: #e50914 !important;
            border-left: 3px solid #e50914;
            padding-left: 13px;
            font-weight: 700;
        }
        .dropdown-menu-estudar .dropdown-item.active i,
        .accordion-body-custom .dropdown-item.active i,
        .dropdown-item.quick-link.active i { color: #e50914 !important; }

        /* E — "Estudar" como accordion inline no mobile */
        @media (max-width: 1199.98px) {
            .navbar-collapse .dropdown-menu-estudar {
                position: static !important;
                float: none !important;
                width: 100% !important;
                max-width: none !important;
                margin: 4px 0 8px !important;
                border: 0 !important;
                border-left: 3px solid rgba(255,255,255,.25) !important;
                border-radius: 0 !important;
                background: rgba(0,0,0,.18) !important;
                box-shadow: none !important;
                padding: 6px 0 !important;
                transform: none !important;
            }
            .navbar-collapse .dropdown-menu-estudar .dropdown-item {
                color: rgba(255,255,255,.92) !important;
                padding: 10px 18px !important;
            }
            .navbar-collapse .dropdown-menu-estudar .dropdown-item:hover,
            .navbar-collapse .dropdown-menu-estudar .dropdown-item.active {
                background: rgba(255,255,255,.10) !important;
                color: #fff !important;
            }
            .navbar-collapse .dropdown-menu-estudar .dropdown-item.active {
                border-left: 3px solid #e50914;
                padding-left: 15px !important;
            }
        }

        /* C — Drawer/off-canvas: o dropdown do usuário em mobile já abre como
           painel lateral. Reforçando bordas, sombra e largura coerente.    */
        @media (max-width: 1199.98px) {
            .dropdown-menu-netflix {
                box-shadow: -8px 0 30px rgba(0,0,0,.35) !important;
            }
        }

        /* A — BOTTOM NAVIGATION BAR (mobile/tablet, < 1200px) */
        .bottom-nav {
            display: none;
        }
        @media (max-width: 1199.98px) {
            .bottom-nav {
                display: flex;
                position: fixed;
                left: 0;
                right: 0;
                bottom: 0;
                z-index: 1040;
                background: rgba(20, 20, 22, 0.96);
                backdrop-filter: blur(14px);
                border-top: 1px solid rgba(255,255,255,0.08);
                padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
                justify-content: space-around;
                align-items: stretch;
                box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
            }
            .bottom-nav-item {
                flex: 1;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 2px;
                padding: 6px 2px;
                color: rgba(255,255,255,0.65);
                text-decoration: none;
                font-size: 0.65rem;
                font-weight: 600;
                line-height: 1;
                border-radius: 10px;
                transition: color .15s ease, background .15s ease, transform .15s ease;
                position: relative;
                min-width: 0;
            }
            .bottom-nav-item i { font-size: 1.15rem; }
            .bottom-nav-item span {
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                max-width: 100%;
            }
            .bottom-nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
            .bottom-nav-item.active {
                color: #fff;
            }
            .bottom-nav-item.active::before {
                content: '';
                position: absolute;
                top: -6px;
                left: 30%;
                right: 30%;
                height: 3px;
                border-radius: 0 0 4px 4px;
                background: linear-gradient(90deg, #e50914, #f59e0b);
            }
            .bottom-nav-item.active i {
                color: #e50914;
                transform: scale(1.1);
            }
            .bottom-nav-item-create {
                margin-top: -22px;
            }
            .bottom-nav-item-create .bn-create-btn {
                width: 54px;
                height: 54px;
                border-radius: 50%;
                background: linear-gradient(135deg, #e50914, #b91c1c);
                color: #fff !important;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 1.3rem;
                box-shadow: 0 8px 20px rgba(229,9,20,0.45);
                transition: transform .15s ease;
            }
            .bottom-nav-item-create:hover .bn-create-btn { transform: scale(1.06); }
            .bottom-nav-item-create span { color: #e50914; font-weight: 700; }

            /* K — Padding global pro conteúdo não ficar atrás da bottom-nav */
            body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
            .footer-netflix { margin-bottom: 0; }

            /* Esconder bottom-nav durante simulado em andamento (timer fixo) */
            body.no-bottom-nav .bottom-nav { display: none !important; }
            body.no-bottom-nav { padding-bottom: 0 !important; }

            /* Reposicionar toast de convites de competição acima da bottom-nav */
            #comp-invite-toast { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
        }

        /* Esconder em print */
        @media print {
            .bottom-nav, .search-overlay, .navbar-mobile-actions { display: none !important; }
        }

@keyframes slideInRight { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        @keyframes pulseBadge { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
        @media (max-width: 520px) { #comp-invite-toast { right: 10px; left: 10px; max-width: none; } }
