@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@700&display=swap');

 /* Variáveis */
 :root {
     --bg-color: #121212;
     --card-bg: #1e1e1e;
     --primary-color: #FF0000;
     --text-color: #ffffff;
     --text-muted: #b3b3b3;
     --border-radius: 12px;
     --base-font-size: 16px;
 }

 body.light-theme {
     --bg-color: #f5f5f5;
     --card-bg: #ffffff;
     --text-color: #121212;
     --text-muted: #737373;
 }

 /* Geral */
 html {
     font-size: var(--base-font-size);
     overflow-x: hidden;
 }

 body {
     background-color: var(--bg-color);
     color: var(--text-color);
     font-family: 'Inter', sans-serif;
     margin: 0;
     font-size: 1rem;
     overflow-x: hidden;
     /* Padding será ajustado no JS após login ou via classe */
     transition: padding 0.3s;
 }

 /* TELA DE LOGIN */
 #login-screen {
     width: 100%;
     min-height: 100vh;
     background: #000;
     z-index: 9999;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .login-container {
     width: 90%;
     max-width: 400px;
     padding: 40px;
     text-align: center;
 }

 .login-logo {
     font-size: 2.5rem;
     font-weight: 800;
     color: var(--primary-color);
     margin-bottom: 40px;
     letter-spacing: 2px;
     display: block;
 }

 .login-input {
     background: #333 !important;
     border: none !important;
     border-radius: 4px !important;
     color: white !important;
     padding: 0 15px !important;
     box-sizing: border-box !important;
     height: 50px !important;
     margin-bottom: 20px !important;
 }

 .login-input:focus {
     background: #444 !important;
     box-shadow: none !important;
 }

 .login-btn {
     width: 100%;
     height: 50px;
     background: var(--primary-color);
     color: #ffffff;
     border: 1px solid var(--primary-color);
     border-radius: 4px;
     font-weight: 700;
     font-size: 1rem;
     cursor: pointer;
     text-transform: uppercase;
     letter-spacing: 1px;
     margin-top: 10px;
     transition: all 0.3s ease;
 }

 .login-btn:hover {
     background: #ffffff;
     color: var(--primary-color);
 }

 .btn, .btn-large, .btn-small {
     background-color: var(--primary-color) !important;
     color: #ffffff !important;
     border: 1px solid var(--primary-color) !important;
     transition: all 0.3s ease !important;
 }

 .btn:hover, .btn-large:hover, .btn-small:hover {
     background-color: #ffffff !important;
     color: var(--primary-color) !important;
 }

 .login-help {
     display: flex;
     justify-content: space-between;
     margin-top: 15px;
     font-size: 0.85rem;
     color: #737373;
 }

 .login-help a {
     color: #b3b3b3;
     text-decoration: none;
 }

 .login-help a:hover {
     text-decoration: underline;
 }

 /* CONTEÚDO DA APLICAÇÃO */
 /* GLOBAL FETCH LOADER */
 #global-fetch-loader {
     position: fixed;
     top: 0;
     left: 0;
     height: 3px;
     background: var(--primary-color);
     z-index: 999999;
     transition: width 0.3s ease, opacity 0.3s ease;
     width: 0%;
     opacity: 1;
     box-shadow: 0 0 10px var(--primary-color);
     pointer-events: none;
 }

 #app-content {
     display: block;
     opacity: 1;
     overflow-x: hidden;
     width: 100%;
     min-height: 100vh;
 }

 /* Quando app ativo, aplicamos padding no body se for mobile */
 body.app-active {
     padding-bottom: 90px;
     /* Ajustado para acomodar o menu fixo + safe area */
 }

 @media (min-width: 993px) {
     body.app-active {
         padding-bottom: 0;
     }
 }

 ::-webkit-scrollbar {
     width: 8px;
 }

 ::-webkit-scrollbar-track {
     background: #121212;
 }

 ::-webkit-scrollbar-thumb {
     background: #333;
     border-radius: 4px;
 }

 /* Nav */
 nav {
     background-color: transparent !important;
     box-shadow: none !important;
     height: 64px;
     line-height: 64px;
 }

 nav .nav-wrapper {
     background-color: #000;
     padding: 0 20px;
 }

 body.light-theme nav .nav-wrapper {
     background-color: #ffffff;
     border-bottom: 1px solid #ddd;
 }

 body.light-theme .brand-logo {
     color: var(--primary-color) !important;
 }

 body.light-theme nav ul a {
     color: #333;
 }

 body.light-theme .dropdown-content {
     background-color: #ffffff !important;
 }

 body.light-theme .dropdown-content li>a {
     color: #333 !important;
 }

 .brand-logo {
     color: var(--primary-color) !important;
     font-weight: 800;
     font-size: 1.5rem !important;
 }

 nav ul a {
     font-weight: 500;
     color: #e5e5e5;
     position: relative;
 }

 nav ul a:hover {
     color: var(--primary-color);
     background-color: transparent;
 }

 .container {
     width: 90%;
     max-width: 1200px;
     margin: 0 auto;
 }

 .footer-wide-container {
     width: 100%;
     max-width: none;
     padding: 0 40px;
     margin: 0 auto;
 }

 /* Pulse Animation for Timer */
 @keyframes pulse-timer {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
 }

 .pulse {
    animation: pulse-timer 1s infinite;
 }

 /* Quiz Styles Específicos */
 .progress-bar-container {
     width: 100%;
     height: 8px;
     background: rgba(255, 255, 255, 0.1);
     border-radius: 4px;
     margin: 20px 0;
     overflow: hidden;
 }

 .progress-bar-fill {
     height: 100%;
     background: var(--primary-color);
     width: 0%;
     transition: width 0.3s ease;
 }

 .quiz-option {
     background: var(--card-bg);
     border: 1px solid rgba(255, 255, 255, 0.05);
     border-radius: var(--border-radius);
     padding: 16px;
     margin-bottom: 12px;
     cursor: pointer;
     transition: all 0.3s ease;
     position: relative;
 }

 .quiz-option:hover {
     background: #2a2a2a;
     transform: translateX(5px);
 }

 .quiz-option.correct {
     background: rgba(76, 175, 80, 0.15) !important;
     border: 1px solid #4CAF50 !important;
 }

 .quiz-option.wrong {
     background: rgba(244, 67, 54, 0.15) !important;
     border: 1px solid #F44336 !important;
 }

 .quiz-justification {
     margin-top: 10px;
     padding-top: 10px;
     border-top: 1px solid rgba(255, 255, 255, 0.1);
     font-size: 0.85rem;
     color: #ddd;
     font-style: italic;
     display: block;
     animation: fadeIn 0.5s;
 }

 .expand-btn-inner {
     position: absolute;
     top: 16px;
     right: 16px;
     background: none;
     border: none;
     color: var(--text-muted);
     cursor: pointer;
     padding: 0;
     display: none;
 }

 .expand-btn-inner:hover {
     color: var(--primary-color);
 }

 /* NOTIFICAÇÕES (POP-UP EXPANDIDO) */
 .notification-list-item {
     background: var(--card-bg);
     border-left: 4px solid var(--primary-color);
     padding: 20px;
     margin-bottom: 15px;
     border-radius: 4px;
     cursor: pointer;
     transition: all 0.3s;
     display: flex;
     justify-content: space-between;
     align-items: center;
     position: relative;
 }

 .notification-list-item:hover {
     background: #252525;
     transform: scale(1.02);
 }

 /* Estilo para lidas */
 .notification-list-item.read {
     opacity: 0.6;
     border-left-color: #555;
     background: #181818;
 }

 .notification-list-item.read:hover {
     opacity: 0.8;
     background: #202020;
 }

 .notification-list-item .meta {
     font-size: 0.8rem;
     color: var(--text-muted);
 }

 .unread-dot-quiz {
     width: 10px;
     height: 10px;
     background: var(--primary-color);
     border-radius: 50%;
     position: absolute;
     top: 15px;
     right: 15px;
     display: none;
     /* Controlled via JS */
 }

 /* Indicador de não lida (ponto azul/vermelho) dentro do item */
 .unread-dot {
     width: 8px;
     height: 8px;
     background: var(--primary-color);
     border-radius: 50%;
     margin-right: 10px;
     display: inline-block;
     vertical-align: middle;
 }

 /* Modal de Notificação */
 #notifModal {
     background: #1e1e1e;
     color: white;
     border-radius: 16px;
     max-height: 80%;
 }

 #notifModal .modal-content {
     padding: 30px;
 }

 #notifModal h4 {
     color: var(--primary-color);
     font-weight: 700;
     margin-top: 0;
 }

 #notifModal p {
     line-height: 1.6;
     font-size: 1.1rem;
     color: #ddd;
 }

 #notifModal .modal-footer {
     background: #121212;
     padding: 10px 20px;
 }

 /* Dashboard & Carrossel Styles */
 #homeTab .carousel {
     height: 350px;
     margin-top: 20px;
 }

 #homeTab .carousel .carousel-item {
     width: 400px !important;
     height: 250px !important;
 }

 #homeTab .carousel .carousel-item img {
     width: 100%;
     height: 100%;
     border-radius: 12px;
     object-fit: cover;
 }

 .play-btn {
     position: absolute;
     left: 50%;
     top: 50%;
     transform: translate(-50%, -50%);
     background: var(--primary-color);
     border: none;
     width: 60px;
     height: 60px;
     border-radius: 50%;
     color: #121212;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     font-size: 24px;
     box-shadow: 0 0 20px rgba(253, 207, 109, 0.4);
     z-index: 10;
 }

 /* VIEW SWITCHER & GRID */
 .view-switcher {
     display: flex;
     justify-content: flex-end;
     align-items: center;
     gap: 10px;
     margin-bottom: 10px;
 }

 .view-btn {
     background: transparent;
     border: 1px solid rgba(255, 255, 255, 0.2);
     color: var(--text-muted);
     border-radius: 8px;
     padding: 5px 10px;
     cursor: pointer;
     transition: all 0.3s;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .view-btn:hover {
     background: rgba(255, 255, 255, 0.1);
     color: white;
 }

 .view-btn.active {
     background: var(--primary-color);
     border-color: var(--primary-color);
     color: #000;
 }

 .video-grid {
     display: none;
     /* Oculto por padrão */
     grid-template-columns: repeat(3, 1fr);
     gap: 20px;
 }

 .video-card {
     background: var(--card-bg);
     border-radius: 12px;
     overflow: hidden;
     position: relative;
     cursor: pointer;
     transition: transform 0.3s;
 }

 .video-card:hover {
     transform: translateY(-5px);
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
 }

 .video-card img {
     width: 100%;
     height: 180px;
     object-fit: cover;
     display: block;
 }

 .video-card .play-btn-small {
     position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     background: rgba(0, 0, 0, 0.6);
     color: white;
     border-radius: 50%;
     width: 40px;
     height: 40px;
     display: flex;
     align-items: center;
     justify-content: center;
     backdrop-filter: blur(2px);
 }

 .video-card-content {
     padding: 15px;
 }

 .video-card h6 {
     margin: 0;
     font-size: 1rem;
     font-weight: 600;
     color: #fff;
 }


 .dashboard-cards {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
     gap: 20px;
     margin: 30px 0;
 }

 .dashboard-card {
     background: var(--card-bg);
     padding: 24px;
     border-radius: 12px;
     text-align: center;
     border: 1px solid rgba(255, 255, 255, 0.05);
 }

 .dashboard-card p {
     font-size: 2rem;
     font-weight: 700;
     margin: 0;
 }

 .dashboard-card h6 {
     margin: 0 0 10px 0;
     color: var(--text-muted);
     font-size: 0.9rem;
     text-transform: uppercase;
 }

 /* Tabs & Mobile Nav */
 .tab-content {
     display: none;
     animation: fadeIn 0.4s;
 }

 .tab-content.active {
     display: block;
 }

 @keyframes fadeIn {
     from {
         opacity: 0;
         transform: translateY(10px);
     }

     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 .mobile-bottom-nav {
     position: fixed !important;
     bottom: 0 !important;
     left: 0;
     right: 0;
     background: rgba(18, 18, 18, 0.85);
     backdrop-filter: blur(20px) saturate(180%);
     -webkit-backdrop-filter: blur(20px) saturate(180%);
     display: flex;
     justify-content: space-around;
     padding: 10px 0;
     padding-bottom: calc(10px + env(safe-area-inset-bottom));
     border-top: 1px solid rgba(255, 255, 255, 0.08);
     z-index: 9999 !important;
     height: 75px;
     box-sizing: border-box;
 }

 .mobile-bottom-nav a {
     color: var(--text-muted);
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     font-size: 0.65rem;
     font-weight: 500;
     position: relative;
     flex: 1;
     height: 100%;
     transition: all 0.2s ease;
 }

 .mobile-bottom-nav a.active-nav {
     color: var(--primary-color);
 }

 .mobile-bottom-nav a.active-nav i {
     color: var(--primary-color);
     transform: translateY(-2px);
 }

 .mobile-bottom-nav i {
     font-size: 24px;
     margin-bottom: 2px;
     transition: transform 0.2s ease;
 }

 /* Course Preview Modal (Premium) */
 .course-preview-modal {
     background: #181818 !important;
     border-radius: 12px !important;
     width: 90% !important;
     max-width: 900px !important;
     top: 5% !important;
     max-height: 90% !important;
     overflow: hidden !important;
 }

 .preview-hero {
     position: relative;
     height: 350px;
 }

 .preview-hero img {
     width: 100%;
     height: 100%;
     object-fit: cover;
 }

 .preview-overlay {
     position: absolute;
     bottom: 0;
     left: 0;
     width: 100%;
     height: 80%;
     background: linear-gradient(0deg, #181818 0%, rgba(24, 24, 24, 0.8) 40%, transparent 100%);
     padding: 0 40px 40px 40px;
     display: flex;
     flex-direction: column;
     justify-content: flex-end;
 }

 .preview-close {
     position: absolute;
     top: 20px;
     right: 20px;
     background: rgba(0, 0, 0, 0.5);
     color: white;
     padding: 8px;
     border-radius: 50%;
     cursor: pointer;
     backdrop-filter: blur(5px);
     z-index: 10;
 }

 .preview-lessons-list {
     margin: 0;
     padding: 0;
 }

 .preview-lesson-item {
     display: flex;
     align-items: center;
     padding: 15px;
     border-radius: 8px;
     cursor: pointer;
     transition: background 0.3s;
     border-bottom: 1px solid rgba(255, 255, 255, 0.05);
 }

 .preview-lesson-item:hover {
     background: rgba(255, 255, 255, 0.05);
 }

 .preview-lesson-item.active {
     background: rgba(253, 207, 109, 0.1);
 }

 .lesson-number {
     font-size: 1.5rem;
     font-weight: 700;
     color: #444;
     width: 40px;
 }

 .lesson-info {
     flex-grow: 1;
 }

 .lesson-info h6 {
     margin: 0;
     font-size: 0.95rem;
     font-weight: 600;
 }

 .lesson-info span {
     font-size: 0.8rem;
     color: #888;
 }

 .preview-activity-badge {
     display: flex;
     align-items: center;
     background: #2a2a2a;
     padding: 10px 15px;
     border-radius: 8px;
     margin-bottom: 10px;
 }

 .preview-activity-badge i {
     margin-right: 12px;
     color: var(--primary-color);
 }

 .preview-activity-badge div h6 {
     margin: 0;
     font-size: 0.85rem;
     font-weight: 700;
 }

 .preview-activity-badge div p {
     margin: 0;
     font-size: 0.75rem;
     color: #888;
 }

 /* Badge de Notificação Geral */
 .notification-badge-nav {
     position: absolute;
     top: -2px;
     right: -6px;
     background: var(--primary-color);
     color: #000;
     min-width: 14px;
     height: 14px;
     border-radius: 50%;
     border: 1px solid #000;
     display: none;
     align-items: center;
     justify-content: center;
     font-size: 9px;
     font-weight: 800;
     padding: 0 2px;
 }

 /* Para desktop também */
 .desktop-badge {
     position: absolute;
     top: 10px;
     right: -8px;
     min-width: 18px;
     height: 18px;
     background: var(--primary-color);
     color: #000;
     border-radius: 50%;
     display: none; /* Controlled via JS */
     align-items: center;
     justify-content: center;
     font-size: 11px;
     font-weight: 800;
     padding: 0 4px;
     border: 1px solid #000;
     box-shadow: 0 2px 5px rgba(0,0,0,0.5);
 }


 /* Carousel Item Enhancements */
 .carousel {
     overflow: visible !important;
 }

 .carousel .carousel-item {
     display: flex !important;
     flex-direction: column;
     justify-content: center;
     align-items: center;
     overflow: visible !important;
     z-index: 1;
 }

 .carousel .carousel-item.active {
     z-index: 100;
 }

 .carousel-item-content {
     display: flex;
     flex-direction: column;
     align-items: center;
     width: 100%;
 }

 .carousel-item-title {
     color: var(--text-color);
     font-weight: 700;
     font-size: 1.2rem;
     margin: 0 0 15px 0;
     text-align: center;
     text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
     width: 100%;
 }

 .carousel-thumbnail-wrapper {
     position: relative;
     width: 100%;
     border-radius: 12px;
     overflow: hidden;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
 }

 .carousel-thumbnail-wrapper img {
     display: block;
     width: 100%;
     height: auto;
 }

 .carousel-item-progress-container {
     width: 100%;
     height: 6px;
     background: rgba(255, 255, 255, 0.1);
     border-radius: 3px;
     margin-top: 15px;
     overflow: hidden;
 }

 .carousel-item-progress-bar {
     height: 100%;
     background: var(--primary-color);
     border-radius: 3px;
 }

 /* Responsividade */
 @media (min-width: 993px) {
     .mobile-bottom-nav {
         display: none !important;
     }

     .sidenav-trigger {
         display: none;
     }

     #homeTab .carousel {
         height: 550px;
         perspective: 1000px;
     }

     #homeTab .carousel .carousel-item {
         width: 450px !important;
         height: 450px !important;
     }
 }

 @media (max-width: 992px) {
     .brand-logo {
         font-size: 1.5rem !important;
     }

     .hide-on-med-and-down {
         display: none !important;
     }

     /* Global bottom padding for the fixed nav */
     #app-content {
         padding-bottom: 75px;
     }

     #homeTab .carousel {
         height: 400px;
     }

     #homeTab .carousel .carousel-item {
         width: 85% !important;
         height: 350px !important;
     }

     .container {
         width: 95%;
     }

     /* HEADER REFINEMENT */
     nav .brand-logo.left {
         left: 0 !important;
         transform: none !important;
         display: flex;
         align-items: center;
         height: 100%;
     }

     .sidenav-trigger.right {
         float: right !important;
         margin: 0 !important;
         height: 56px;
         display: flex;
         align-items: center;
         justify-content: center;
     }

     .sidenav-trigger i {
         font-size: 2.2rem !important;
     }

     .dashboard-card {
         padding: 15px;
     }

     .dashboard-card p {
         font-size: 1.5rem;
     }

     .video-grid {
         grid-template-columns: 1fr !important;
     }

     .ad-cards-container {
         grid-template-columns: 1fr;
         gap: 20px;
     }

     .quiz-selection-grid {
         grid-template-columns: 1fr;
         gap: 15px;
     }
 }

 /* Grid vira Lista no mobile */

 /* TRENDING STYLES */
 .trending-item {
     display: flex;
     align-items: center;
     background: var(--card-bg);
     margin-bottom: 15px;
     border-radius: 8px;
     padding: 10px;
     transition: transform 0.2s;
     cursor: pointer;
 }

 .trending-item:hover {
     transform: translateX(5px);
     background: #252525;
 }

 .trending-item img {
     width: 120px;
     height: 68px;
     object-fit: cover;
     border-radius: 6px;
     margin-right: 15px;
 }

 .trending-info {
     flex: 1;
 }

 .trending-info h5 {
     font-size: 1rem;
     font-weight: 600;
     margin: 0 0 5px 0;
 }

 .trending-info .author {
     color: var(--text-muted);
     font-size: 0.85rem;
     margin: 0;
 }

 .trending-info .views {
     color: #777;
     font-size: 0.75rem;
     margin: 0;
 }

 .btn-clean {
     background: none;
     border: none;
     color: var(--text-muted);
     cursor: pointer;
 }

 .btn-clean:hover {
     color: white;
 }

 /* COURSES STYLES (Horizontal Card) */
 .course-card-horizontal {
     display: flex;
     background: var(--card-bg);
     border-radius: 12px;
     overflow: hidden;
     margin-bottom: 20px;
     border: 1px solid rgba(255, 255, 255, 0.05);
 }

 .course-card-horizontal img {
     width: 160px;
     object-fit: cover;
 }

 .course-info {
     padding: 20px;
     flex: 1;
     display: flex;
     flex-direction: column;
     justify-content: center;
 }

 .course-info h5 {
     margin: 0 0 15px 0;
     font-size: 1.1rem;
     font-weight: 700;
 }

 .progress-wrapper {
     margin-bottom: 15px;
 }

 .progress-text {
     font-size: 0.8rem;
     color: var(--text-muted);
     display: block;
     margin-top: 5px;
     text-align: right;
 }

 .course-actions {
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .last-access {
     font-size: 0.8rem;
     color: #666;
     align-items: center;
     gap: 4px;
 }

 @media (max-width: 600px) {
     body {
         overflow-x: hidden !important;
         width: 100vw !important;
         max-width: 100vw !important;
     }

     .container {
         width: 100% !important;
         max-width: 100vw !important;
         padding: 0 15px !important;
         box-sizing: border-box !important;
         overflow-x: hidden !important;
     }

     #homeTab .carousel {
         width: 100% !important;
         max-width: 100% !important;
         overflow: hidden !important;
     }

     .preview-hero {
         height: 200px;
     }

     .preview-overlay {
         padding: 0 20px 20px 20px;
     }

     .preview-overlay h4 {
         font-size: 1.5rem !important;
     }

     .course-card-horizontal {
         flex-direction: column;
     }

     .course-card-horizontal img {
         width: 100%;
         height: 150px;
     }

     .trending-item img {
         width: 100px;
         height: 56px;
     }

     .ad-card-banner {
         height: 150px;
     }

     .quiz-card-icon i {
         font-size: 2.5rem;
     }

     .quiz-type-card {
         padding: 15px 12px;
     }

     h5 {
         font-size: 1.2rem;
     }

     h6 {
         font-size: 1rem;
     }

     /* Redundant styles removed - handled by main .mobile-bottom-nav class */
 }

 /* NAVBAR AVATAR & DROPDOWN */
 /* NAVBAR AVATAR & DROPDOWN */
 .nav-wrapper ul li {
     margin-left: 20px;
     /* Mais espaço entre itens */
 }

 .nav-avatar {
     width: 35px;
     height: 35px;
     border-radius: 50%;
     object-fit: cover;
     border: 2px solid var(--primary-color);
     vertical-align: middle;
 }

 .dropdown-content {
     border-radius: 8px !important;
     min-width: 200px !important;
     z-index: 9999 !important;
     /* Garantir que apareça no mobile */
     top: 56px !important;
     /* Ajuste para não cobrir a navbar no mobile */
 }

 .dropdown-content li>a,
 .dropdown-content li>span {
     font-size: 14px;
     padding: 14px 16px;
 }

 .dropdown-content li>a>i {
     margin-right: 10px;
     height: inherit;
     line-height: inherit;
 }

 /* PROFILE STYLES */
 .profile-header {
     display: flex;
     flex-direction: column;
     align-items: center;
     margin-bottom: 30px;
 }

 .profile-avatar-container {
     position: relative;
     width: 100px;
     height: 100px;
     margin-bottom: 15px;
 }

 .profile-avatar {
     width: 100%;
     height: 100%;
     border-radius: 50%;
     object-fit: cover;
     border: 3px solid var(--primary-color);
 }

 .profile-edit-btn {
     position: absolute;
     bottom: 0;
     right: 0;
     background: var(--primary-color);
     color: white;
     border-radius: 50%;
     width: 30px;
     height: 30px;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     border: 2px solid #121212;
 }

 /* AD CARDS STYLES */
 .ad-section {
     margin-top: 40px;
     margin-bottom: 60px;
 }

 .ad-cards-container {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
     gap: 30px;
 }

 .ad-card {
     background: var(--card-bg);
     border-radius: 16px;
     overflow: hidden;
     border: 1px solid rgba(255, 255, 255, 0.05);
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     position: relative;
 }

 .ad-card:hover {
     transform: translateY(-8px);
     border-color: rgba(229, 9, 20, 0.3);
     box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
 }

 .ad-card-banner {
     position: relative;
     height: 180px;
     overflow: hidden;
 }

 .ad-card-banner img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     transition: transform 0.5s;
 }

 .ad-card:hover .ad-card-banner img {
     transform: scale(1.05);
 }

 .ad-price {
     position: absolute;
     top: 15px;
     right: 15px;
     background: var(--primary-color);
     color: #000;
     padding: 6px 12px;
     border-radius: 8px;
     font-weight: 700;
     font-size: 0.9rem;
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
 }

 .ad-card-content {
     padding: 20px;
 }

 .ad-card-content h6 {
     margin: 0 0 10px 0;
     font-size: 1.2rem;
     font-weight: 700;
 }

 .ad-card-expandable {
     max-height: 0;
     overflow: hidden;
     transition: all 0.4s ease-out;
     opacity: 0;
 }

 .ad-card.expanded .ad-card-expandable {
     max-height: 250px;
     /* Suficiente para o conteúdo */
     opacity: 1;
     margin-top: 10px;
     padding-bottom: 10px;
 }

 .ad-expand-btn {
     background: transparent;
     border: none;
     color: var(--text-muted);
     font-family: 'Inter', sans-serif;
     font-size: 0.85rem;
     font-weight: 600;
     display: flex;
     align-items: center;
     gap: 5px;
     cursor: pointer;
     margin-top: 15px;
     padding: 5px 0;
     transition: color 0.3s;
 }

 .ad-expand-btn:hover {
     color: var(--primary-color);
 }

 .ad-expand-btn i {
     transition: transform 0.3s;
 }

 .ad-card.expanded .ad-expand-btn i {
     transform: rotate(180deg);
 }

 .profile-form {
     background: var(--card-bg);
     padding: 30px;
     border-radius: 12px;
     border: 1px solid rgba(255, 255, 255, 0.05);
     max-width: 600px;
     margin: 0 auto;
 }

 .input-field input,
 .input-field textarea {
     color: white;
 }

 .input-field label {
     color: #999;
 }

 .input-field input:focus+label,
 .input-field textarea:focus+label {
     color: var(--primary-color) !important;
 }

 .input-field input:focus,
 .input-field textarea:focus {
     border-bottom: 1px solid var(--primary-color) !important;
     box-shadow: 0 1px 0 0 var(--primary-color) !important;
 }

 /* QUIZ SELECTION STYLES */
 .quiz-selection-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
     gap: 25px;
     margin-top: 20px;
 }

 .quiz-type-card {
     background: var(--card-bg);
     border: 1px solid rgba(255, 255, 255, 0.05);
     border-radius: 16px;
     padding: 30px 20px;
     text-align: center;
     cursor: pointer;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     display: flex;
     flex-direction: column;
     align-items: center;
 }

 .quiz-type-card:hover {
     transform: translateY(-8px);
     border-color: var(--primary-color);
     box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
 }

 .quiz-card-icon {
     margin-bottom: 20px;
 }

 .quiz-card-icon i {
     font-size: 4rem;
 }

 .quiz-card-content h6 {
     font-size: 1.3rem;
     font-weight: 700;
     margin: 0 0 10px 0;
     color: white;
 }

 .quiz-card-content p {
     font-size: 0.9rem;
     color: var(--text-muted);
     margin-bottom: 20px;
     min-height: 40px;
 }

 .quiz-card-badge {
     background: rgba(255, 255, 255, 0.1);
     color: white;
     padding: 4px 12px;
     border-radius: 20px;
     font-size: 0.8rem;
     font-weight: 600;
 }

 /* FOOTER STYLES */
 .app-footer {
     background-color: #000;
     padding-top: 50px;
     border-top: 1px solid rgba(255, 255, 255, 0.1);
     margin-top: 80px;
     color: white;
 }

 .app-footer .footer-title {
     font-size: 1.1rem;
     font-weight: 700;
     margin-bottom: 20px;
     color: var(--primary-color);
     text-transform: uppercase;
     letter-spacing: 1px;
 }

 .app-footer ul li {
     margin-bottom: 10px;
 }

 .app-footer ul a {
     color: var(--text-muted);
     transition: color 0.3s;
     font-size: 0.95rem;
 }

 .app-footer ul a:hover {
     color: white;
 }

 .social-icons {
     display: flex;
     gap: 15px;
     margin-top: 20px;
 }

 .social-icons a {
     color: white;
     background: rgba(255, 255, 255, 0.1);
     width: 40px;
     height: 40px;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.3s;
 }

 .social-icons a:hover {
     background: var(--primary-color);
     transform: translateY(-3px);
 }

 .footer-copyright {
     margin-top: 40px;
     padding: 20px 0;
     border-top: 1px solid rgba(255, 255, 255, 0.05);
     background-color: #080808;
     color: var(--text-muted);
     font-size: 0.85rem;
 }

 /* SETTINGS PAGE STYLES */
 .settings-section {
     background: var(--card-bg);
     padding: 24px;
     border-radius: 12px;
     margin-bottom: 20px;
     border: 1px solid rgba(255, 255, 255, 0.05);
 }

 body.light-theme .settings-section {
     border-color: #ddd;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
 }

 .settings-row {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 15px 0;
     border-bottom: 1px solid rgba(255, 255, 255, 0.1);
 }

 body.light-theme .settings-row {
     border-bottom-color: #eee;
 }

 .settings-row:last-child {
     border-bottom: none;
 }

 .settings-info h6 {
     margin: 0;
     font-weight: 600;
 }

 .settings-info p {
     margin: 5px 0 0 0;
     font-size: 0.85rem;
     color: var(--text-muted);
 }

 .font-size-controls {
     display: flex;
     gap: 10px;
 }

 .font-btn {
     background: rgba(255, 255, 255, 0.1);
     border: 1px solid rgba(255, 255, 255, 0.1);
     color: var(--text-color);
     width: 40px;
     height: 40px;
     border-radius: 8px;
     cursor: pointer;
     transition: all 0.3s;
     font-weight: 700;
 }

 body.light-theme .font-btn {
     background: #eee;
     border-color: #ddd;
 }

 .font-btn.active {
     background: var(--primary-color);
     border-color: var(--primary-color);
     color: white;
 }

 .theme-switch-container {
     display: flex;
     gap: 20px;
 }

 .theme-option {
     display: flex;
     flex-direction: column;
     align-items: center;
     gap: 8px;
     cursor: pointer;
 }

 .theme-preview {
     width: 60px;
     height: 40px;
     border-radius: 8px;
     border: 2px solid transparent;
     transition: all 0.3s;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .theme-preview.dark {
     background: #121212;
     color: white;
 }

 .theme-preview.light {
     background: white;
     color: #121212;
     border: 1px solid #ddd;
 }

 .theme-option.active .theme-preview {
     border-color: var(--primary-color);
 }

 @media (max-width: 600px) {
     .settings-row {
         flex-direction: column;
         align-items: flex-start;
         gap: 15px;
     }

     .settings-info {
         margin-bottom: 5px;
     }

     .font-size-controls,
     .theme-switch-container {
         width: 100%;
         justify-content: flex-start;
     }

     .theme-switch-container {
         gap: 30px;
     }
 }

 /* BACK BUTTON */
 .btn-back {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     width: 32px;
     height: 32px;
     background: rgba(255, 255, 255, 0.1);
     color: var(--text-color);
     border-radius: 50%;
     margin-right: 12px;
     cursor: pointer;
     transition: all 0.3s;
     vertical-align: middle;
     border: none;
     flex-shrink: 0;
 }

 .btn-back:hover {
     background: var(--primary-color);
     color: white;
     transform: translateX(-3px);
 }

 .btn-back i {
     font-size: 20px !important;
 }

 body.light-theme .btn-back {
     background: #e0e0e0;
     color: #333;
 }

 .tab-header-inline {
     display: flex;
     align-items: center;
     margin-bottom: 20px;
 }

 /* QUIZ ENHANCEMENTS */
 .quiz-option.force-correct {
     border-color: #4caf50;
     background: rgba(76, 175, 80, 0.1);
 }

 .quiz-option.force-correct::after {
     content: "✓ Corretíssima";
     position: absolute;
     right: 40px;
     font-size: 0.7rem;
     color: #4caf50;
     font-weight: 700;
 }

 .quiz-btn-prev {
     background: rgba(255, 255, 255, 0.1);
     color: var(--text-color);
     border-radius: 20px;
     padding: 0 20px;
     margin-right: 10px;
     color: #000;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
     box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
     position: relative;
     z-index: 2;
 }

 .record-btn i {
     font-size: 40px !important;
 }

 .record-btn:active {
     transform: scale(0.9);
 }

 .record-btn.recording-active {
     background: #f44336;
     color: #fff;
     animation: pulse-red 1.5s infinite;
 }

 @keyframes pulse-red {
     0% {
         transform: scale(1);
         box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
     }

     70% {
         transform: scale(1.1);
         box-shadow: 0 0 0 20px rgba(244, 67, 54, 0);
     }

     100% {
         transform: scale(1);
         box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
     }
 }

 .wave-container {
     display: flex;
     align-items: center;
     gap: 3px;
     height: 30px;
     margin-top: 20px;
     opacity: 0;
     transition: opacity 0.3s;
 }

 .wave-container.active {
     opacity: 1;
 }

 .wave-bar {
     width: 3px;
     height: 100%;
     background: var(--primary-color);
     border-radius: 3px;
 }

 .recording-active+.wave-container .wave-bar {
     animation: wave-animation 1s ease-in-out infinite;
 }

 @keyframes wave-animation {

     0%,
     100% {
         height: 10%;
     }

     50% {
         height: 100%;
     }
 }

 .wave-bar:nth-child(2) {
     animation-delay: 0.1s;
 }

 .wave-bar:nth-child(3) {
     animation-delay: 0.2s;
 }

 .wave-bar:nth-child(4) {
     animation-delay: 0.3s;
 }

 .wave-bar:nth-child(5) {
     animation-delay: 0.4s;
 }

 .timer-display {
     font-family: 'Courier New', Courier, monospace;
     font-size: 1.5rem;
     font-weight: bold;
     margin-top: 10px;
     color: var(--text-color);
 }

 .theme-preview.light {
     background: white;
     color: #121212;
     border: 1px solid #ddd;
 }

 .theme-option.active .theme-preview {
     border-color: var(--primary-color);
 }

 @media (max-width: 600px) {
     .settings-row {
         flex-direction: column;
         align-items: flex-start;
         gap: 15px;
     }

     .settings-info {
         margin-bottom: 5px;
     }

     .font-size-controls,
     .theme-switch-container {
         width: 100%;
         justify-content: flex-start;
     }

     .theme-switch-container {
         gap: 30px;
     }
 }

 /* BACK BUTTON */
 .btn-back {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     width: 32px;
     height: 32px;
     background: rgba(255, 255, 255, 0.1);
     color: var(--text-color);
     border-radius: 50%;
     margin-right: 12px;
     cursor: pointer;
     transition: all 0.3s;
     vertical-align: middle;
     border: none;
     flex-shrink: 0;
 }

 .btn-back:hover {
     background: var(--primary-color);
     color: white;
     transform: translateX(-3px);
 }

 .btn-back i {
     font-size: 20px !important;
 }

 body.light-theme .btn-back {
     background: #e0e0e0;
     color: #333;
 }

 .tab-header-inline {
     display: flex;
     align-items: center;
     margin-bottom: 20px;
 }

 /* QUIZ ENHANCEMENTS */
 .quiz-option.force-correct {
     border-color: #4caf50;
     background: rgba(76, 175, 80, 0.1);
 }

 .quiz-option.force-correct::after {
     content: "✓ Corretíssima";
     position: absolute;
     right: 40px;
     font-size: 0.7rem;
     color: #4caf50;
     font-weight: 700;
 }

 .quiz-btn-prev {
     background: rgba(255, 255, 255, 0.1);
     color: var(--text-color);
     border-radius: 20px;
     padding: 0 20px;
     margin-right: 10px;
     color: #000;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
     box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
     position: relative;
     z-index: 2;
 }

 .record-btn i {
     font-size: 40px !important;
 }

 .record-btn:active {
     transform: scale(0.9);
 }

 .record-btn.recording-active {
     background: #f44336;
     color: #fff;
     animation: pulse-red 1.5s infinite;
 }

 @keyframes pulse-red {
     0% {
         transform: scale(1);
         box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
     }

     70% {
         transform: scale(1.1);
         box-shadow: 0 0 0 20px rgba(244, 67, 54, 0);
     }

     100% {
         transform: scale(1);
         box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
     }
 }

 .wave-container {
     display: flex;
     align-items: center;
     gap: 3px;
     height: 30px;
     margin-top: 20px;
     opacity: 0;
     transition: opacity 0.3s;
 }

 .wave-container.active {
     opacity: 1;
 }

 .wave-bar {
     width: 3px;
     height: 100%;
     background: var(--primary-color);
     border-radius: 3px;
 }

 .recording-active+.wave-container .wave-bar {
     animation: wave-animation 1s ease-in-out infinite;
 }

 @keyframes wave-animation {

     0%,
     100% {
         height: 10%;
     }

     50% {
         height: 100%;
     }
 }

 .wave-bar:nth-child(2) {
     animation-delay: 0.1s;
 }

 .wave-bar:nth-child(3) {
     animation-delay: 0.2s;
 }

 .wave-bar:nth-child(4) {
     animation-delay: 0.3s;
 }

 .wave-bar:nth-child(5) {
     animation-delay: 0.4s;
 }

 .timer-display {
     font-family: 'Courier New', Courier, monospace;
     font-size: 1.5rem;
     font-weight: bold;
     margin-top: 10px;
     color: var(--text-color);
 }

 /* Robust hiding of footer on quiz tab */
 #app-content.on-quiz-tab .app-footer {
     display: none !important;
 }

 /* SKELETON LOADERS */

 /* BLOCK SCROLL ON OPEN MODAL */
 body.modal-open {
     overflow: hidden !important;
     touch-action: none !important;
 }
 
 body.modal-open .modal {
     touch-action: auto !important;
     overflow-y: auto !important;
 }
