    :root {
        --color-light-beige: #F6F7ED;
        --color-yellow: #DBE64C;
        --color-medium-green: #74C365;
        --color-dark-green: #00804C;
        --color-medium-blue: #1E488F;
        --color-dark-blue: #001F3F;
        --color-header-purple: #7C59E7;
        --color-white: #FFFFFF;
        --color-dark-text: #333333;
        --color-gray-text: #666666;
    }

    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        color: var(--color-dark-text);
        background-color: var(--color-light-beige);
        position: relative;
        overflow-x: hidden;
    }

    /* Header Styles */
    header {
        background-color: var(--color-header-purple);
        padding: 15px 40px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .logo {
        color: var(--color-white);
        font-weight: bold;
        font-size: 20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .logo i {
        font-size: 24px;
        color: var(--color-yellow);
    }

    .nav-links {
        display: flex;
        gap: 30px;
    }

    .nav-links a {
        color: var(--color-white);
        text-decoration: none;
        font-weight: 600;
        transition: color 0.3s;
        padding: 5px 0;
        position: relative;
        font-size: 15px;
    }

    .nav-links a:hover {
        color: var(--color-yellow);
    }

    .nav-links a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: var(--color-yellow);
        transition: width 0.3s;
    }

    .nav-links a:hover::after {
        width: 100%;
    }

    .user-section {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #userName {
        color: var(--color-white);
        font-weight: 600;
        font-size: 14px;
        margin-right: 10px;
    }

    .header-login {
        background-color: var(--color-yellow);
        color: var(--color-dark-text);
        padding: 8px 20px;
        border-radius: 4px;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.3s;
        font-size: 15px;
        border: 2px solid transparent;
    }

    .header-login:hover {
        background-color: transparent;
        color: var(--color-yellow);
        border-color: var(--color-yellow);
    }

    /* Hamburger Menu Styles */
    .hamburger-menu {
        position: relative;
        cursor: pointer;
    }

    .hamburger-icon {
        width: 25px;
        height: 20px;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .hamburger-icon span {
        width: 100%;
        height: 3px;
        background-color: var(--color-white);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .hamburger-menu.active .hamburger-icon span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger-menu.active .hamburger-icon span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .hamburger-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hamburger-content {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--color-white);
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        min-width: 200px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1000;
        margin-top: 10px;
    }

    .hamburger-menu.active .hamburger-content {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .hamburger-content a {
        display: block;
        padding: 12px 20px;
        color: var(--color-dark-text);
        text-decoration: none;
        font-weight: 600;
        font-size: 14px;
        transition: background-color 0.3s;
        border-bottom: 1px solid #f0f0f0;
    }

    .hamburger-content a:last-child {
        border-bottom: none;
    }

    .hamburger-content a:hover {
        background-color: var(--color-yellow);
        color: var(--color-dark-text);
    }

    .hamburger-content a:first-child {
        border-radius: 8px 8px 0 0;
    }

    .hamburger-content a:last-child {
        border-radius: 0 0 8px 8px;
    }

    #logoutLink {
        color: #f44336 !important;
    }

    #logoutLink:hover {
        background-color: #f44336 !important;
        color: white !important;
    }

    /* Main Content Styles */
    .main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 80px - 200px); /* 100vh - header - footer */
        position: relative;
    }

    /* Quando o quiz está ativo, o main-content permite scroll normal */
    .main-content.quiz-active {
        min-height: auto;
    }

    /* Quando o quiz está ativo, o body deve permitir scroll */
    body.quiz-active {
        overflow-y: auto;
    }

    /* Homepage Styles */
    .homepage {
        display: none;
        width: 100%;
        background-color: var(--color-header-purple);
        flex: 1;
    }

    .banner {
        width: 100%;
        height: 400px;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
            url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
        background-size: cover;
        background-position: center;
    }

    .banner-content {
        text-align: center;
        max-width: 800px;
        padding: 20px;
    }

    .banner h2 {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .banner p {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

    .content-section {
        display: flex;
        max-width: 1200px;
        margin: 40px auto;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        overflow: hidden;
        background-color: var(--color-white);
    }

    .content-section.reverse {
        flex-direction: row-reverse;
    }

    .content-image {
        flex: 1;
        min-height: 300px;
        background-size: cover;
        background-position: center;
    }

    .content-text {
        flex: 1;
        padding: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .content-text h3 {
        font-size: 1.8rem;
        color: var(--color-medium-blue);
        margin-bottom: 20px;
    }

    .content-text p {
        margin-bottom: 30px;
        line-height: 1.6;
    }

    .play-btn {
        display: inline-block;
        padding: 12px 30px;
        background-color: var(--color-yellow);
        color: var(--color-dark-text);
        border: none;
        border-radius: 6px;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        text-align: center;
        text-decoration: none;
        transition: background-color 0.3s;
        align-self: flex-start;
    }

    .play-btn:hover {
        background-color: #d0db3a;
    }

    /* Auth Container Styles */
    .auth-container {
        width: 100%;
        display: none;
        justify-content: center;
        align-items: center;
        padding: 40px 20px;
        min-height: calc(100vh - 80px - 200px); /* 100vh - header - footer */
        flex: 1;
        position: relative;
    }

    .login-box {
        width: 100%;
        max-width: 350px;
        padding: 40px;
        background: var(--color-white);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        border-top: 5px solid var(--color-medium-green);
        margin: 0 auto;
    }

    .form-title {
        color: var(--color-medium-blue);
        text-align: center;
        margin-bottom: 35px;
        font-size: 28px;
        font-weight: 700;
    }

    .form-group {
        margin-bottom: 25px;
        position: relative;
    }

    label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 14px;
        color: var(--color-dark-blue);
    }

    .form-input {
        width: 100%;
        padding: 10px 10px 10px 35px;
        border: none;
        border-bottom: 2px solid var(--color-yellow);
        outline: none;
        font-size: 14px;
        background-color: transparent;
    }

    .form-input:focus {
        border-bottom-color: var(--color-medium-blue);
    }

    .input-icon {
        position: absolute;
        left: 10px;
        top: 35px;
        color: var(--color-medium-blue);
        font-size: 16px;
    }

    .submit-btn {
        display: block;
        width: 100%;
        padding: 14px;
        background-color: var(--color-dark-green);
        color: var(--color-white);
        border: none;
        border-radius: 6px;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        text-align: center;
        text-decoration: none;
        margin-top: 30px;
        transition: background-color 0.3s;
        letter-spacing: 0.5px;
    }

    .submit-btn:hover {
        background-color: var(--color-medium-green);
    }

    .toggle-form {
        text-align: center;
        margin-top: 25px;
        font-weight: 600;
        font-size: 14px;
        color: var(--color-medium-blue);
        cursor: pointer;
    }

    .toggle-form:hover {
        text-decoration: underline;
    }

    /* Form states */
    .form-panel {
        display: none;
    }

    .active {
        display: block;
    }

    /* Footer Styles */
    footer {
        background-color: var(--color-white);
        padding: 30px 20px;
        text-align: center;
        font-size: 13px;
        margin-top: auto;
        color: var(--color-dark-text);
        border-top: 1px solid #eaeaea;
        flex-shrink: 0;
        min-height: 200px;
        box-sizing: border-box;
        position: relative;
        bottom: 0;
        width: 100%;
    }

    /* Quando o quiz está ativo, o footer fica posicionado normalmente mas fora da área inicial */
    .main-content.quiz-active + footer {
        margin-top: 0;
        position: relative;
    }

    .footer-address {
        margin-bottom: 15px;
        line-height: 1.6;
        color: var(--color-gray-text);
    }

    .contact-info {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-bottom: 15px;
    }

    .contact-item {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--color-gray-text);
    }

    .contact-item i {
        color: var(--color-medium-blue);
    }

    .social-links {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin: 15px 0;
    }

    .social-link {
        color: var(--color-medium-blue);
        font-size: 20px;
        transition: color 0.3s;
    }

    .social-link:hover {
        color: var(--color-dark-blue);
    }

    .footer-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        margin: 20px 0;
        gap: 20px;
    }

    .footer-links a {
        color: var(--color-dark-text);
        text-decoration: none;
        font-weight: 600;
        font-size: 13px;
        transition: color 0.3s;
    }

    .footer-links a:hover {
        color: var(--color-medium-blue);
    }

    .copyright {
        margin-top: 20px;
        color: var(--color-gray-text);
    }

    /* Quiz Styles - Abordagem agressiva para alinhamento */
    .quiz-container {
        max-width: 500px;
        margin: 40px auto;
        background: var(--color-white);
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(124, 89, 231, 0.10);
        padding: 32px 24px 24px 24px;
        animation: fadeIn 0.7s;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    .quiz-header {
        width: 100%;
        text-align: center;
        margin-bottom: 24px;
    }

    .quiz-header h2 {
        color: var(--color-header-purple);
        font-size: 2rem;
        margin-bottom: 8px;
    }

    #quizProgress {
        color: var(--color-medium-blue);
        font-weight: 600;
        margin-bottom: 8px;
    }

    #quizContent {
        width: 100%;
        display: block;
    }

    .quiz-question {
        font-size: 1.3rem;
        color: var(--color-dark-blue);
        font-weight: 700;
        margin-bottom: 24px;
        text-align: center;
        width: 100%;
        display: block;
    }

    .quiz-options {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }

    .quiz-option {
        background: var(--color-yellow);
        color: var(--color-dark-text);
        border: none;
        border-radius: 8px;
        padding: 16px 20px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s, color 0.2s, transform 0.15s;
        box-shadow: 0 2px 8px rgba(124, 89, 231, 0.07);
        text-align: center;
        width: 100%;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        margin: 0;
        /* Forçar alinhamento */
        float: none;
        clear: both;
        position: static;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
    }

    .quiz-option:hover:not(:disabled) {
        background: var(--color-medium-green);
        color: var(--color-white);
        transform: scale(1.04);
    }

    #nextQuestionBtn {
        background: var(--color-header-purple);
        color: var(--color-white);
        border: none;
        border-radius: 8px;
        padding: 12px 32px;
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
        margin-top: 8px;
        transition: background 0.2s;
    }

    #nextQuestionBtn:hover {
        background: var(--color-medium-blue);
    }

    #quizResult {
    margin-top: 24px;
    text-align: center;
    color: var(--color-dark-green);
    font-size: 1.3rem;
    font-weight: 700;
}

.voltar-trilhas-btn {
    background: var(--color-header-purple);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

.voltar-trilhas-btn:hover {
    background: var(--color-medium-blue);
}

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(30px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* ========================================
       NOVAS FUNCIONALIDADES - TRILHAS, RANKING E PROGRESSO
       ======================================== */

    /* Trilhas Container */
    .trilhas-container {
        max-width: 1200px;
        margin: 40px auto;
        padding: 20px;
        background: var(--color-white);
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(124, 89, 231, 0.10);
        animation: fadeIn 0.7s;
    }

    .trilhas-header {
        text-align: center;
        margin-bottom: 40px;
    }

    .trilhas-header h2 {
        color: var(--color-header-purple);
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .trilhas-header p {
        color: var(--color-gray-text);
        font-size: 1.1rem;
    }

    .trilhas-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 24px;
        margin-top: 30px;
    }

    .trilha-card {
        background: linear-gradient(135deg, var(--color-white) 0%, #f8f9fa 100%);
        border-radius: 16px;
        padding: 30px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        cursor: pointer;
        border: 2px solid transparent;
        position: relative;
        overflow: hidden;
    }

    .trilha-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        border-color: var(--color-yellow);
    }

    .trilha-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--trilha-color, var(--color-header-purple));
    }

    .trilha-header {
        display: flex;
        align-items: center;
        margin-bottom: 20px;
        gap: 20px;
    }

    .trilha-info {
        flex: 1;
        min-width: 0;
    }

    .trilha-icon {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: var(--trilha-color, var(--color-header-purple));
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 20px;
        color: white;
        font-size: 24px;
        flex-shrink: 0;
    }

    .trilha-info h3 {
        color: var(--color-dark-blue);
        font-size: 1.3rem;
        margin-bottom: 5px;
        word-wrap: break-word;
        hyphens: auto;
    }

    .trilha-dificuldade {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    .dificuldade-iniciante {
        background: #e8f5e8;
        color: #2e7d32;
    }

    .dificuldade-intermediario {
        background: #fff3e0;
        color: #f57c00;
    }

    .dificuldade-avancado {
        background: #ffebee;
        color: #c62828;
    }

    .trilha-descricao {
        color: var(--color-gray-text);
        line-height: 1.6;
        margin-bottom: 20px;
    }

    .trilha-footer {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        gap: 20px;
    }

    .trilha-stats {
        display: flex;
        flex-direction: column;
        gap: 8px;
        font-size: 0.9rem;
        color: var(--color-gray-text);
    }

    .trilha-stats span {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .play-trilha-btn {
        background: var(--trilha-color, var(--color-header-purple));
        color: white;
        border: none;
        border-radius: 8px;
        padding: 10px 20px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .play-trilha-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    /* Ranking Container */
    .ranking-container {
        max-width: 800px;
        margin: 40px auto;
        padding: 40px;
        background: var(--color-white);
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(124, 89, 231, 0.10);
        animation: fadeIn 0.7s;
    }

    .ranking-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .ranking-header h2 {
        color: var(--color-header-purple);
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .ranking-tabs {
        display: flex;
        justify-content: center;
        margin-bottom: 30px;
    }

    .ranking-tab {
        background: var(--color-header-purple);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 12px 24px;
        font-weight: 600;
        cursor: default;
    }

    .ranking-content {
        min-height: 400px;
    }

    .ranking-item {
        display: flex;
        align-items: center;
        padding: 15px;
        margin-bottom: 10px;
        background: #f8f9fa;
        border-radius: 12px;
        transition: all 0.3s ease;
    }

    .ranking-item:hover {
        background: #e9ecef;
        transform: translateX(5px);
    }

    .ranking-posicao {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        margin-right: 20px;
        font-size: 1.2rem;
    }

    .ranking-posicao.ouro {
        background: linear-gradient(135deg, #ffd700, #ffed4e);
        color: #b8860b;
    }

    .ranking-posicao.prata {
        background: linear-gradient(135deg, #c0c0c0, #e5e5e5);
        color: #696969;
    }

    .ranking-posicao.bronze {
        background: linear-gradient(135deg, #cd7f32, #daa520);
        color: #8b4513;
    }

    .ranking-posicao.outros {
        background: var(--color-light-gray);
        color: var(--color-gray-text);
    }

    .ranking-info {
        flex: 1;
    }

    .ranking-nome {
        font-weight: 600;
        color: var(--color-dark-blue);
        margin-bottom: 5px;
    }

    .ranking-stats {
        display: flex;
        gap: 20px;
        font-size: 0.9rem;
        color: var(--color-gray-text);
    }

    .ranking-pontos {
        font-weight: 600;
        color: var(--color-header-purple);
        font-size: 1.1rem;
    }

    /* Progresso Container */
    .progresso-container {
        max-width: 1000px;
        margin: 40px auto;
        padding: 40px;
        background: var(--color-white);
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(124, 89, 231, 0.10);
        animation: fadeIn 0.7s;
    }

    .progresso-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .progresso-header h2 {
        color: var(--color-header-purple);
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .progresso-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-bottom: 40px;
    }

    .stat-card {
        background: linear-gradient(135deg, var(--color-white) 0%, #f8f9fa 100%);
        border-radius: 12px;
        padding: 25px;
        text-align: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    .stat-card i {
        font-size: 2.5rem;
        color: var(--color-header-purple);
        margin-bottom: 15px;
    }

    .stat-card h3 {
        font-size: 2rem;
        color: var(--color-dark-blue);
        margin-bottom: 5px;
    }

    .stat-card p {
        color: var(--color-gray-text);
        font-weight: 600;
    }

    .progresso-sections {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .progresso-section {
        background: #f8f9fa;
        border-radius: 12px;
        padding: 25px;
    }

    .progresso-section h3 {
        color: var(--color-dark-blue);
        margin-bottom: 20px;
        font-size: 1.3rem;
    }

    .conquistas-list, .historico-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .conquista-item {
        display: flex;
        align-items: center;
        padding: 15px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .conquista-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--color-yellow);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
        color: var(--color-dark-text);
        font-size: 1.2rem;
    }

    .conquista-info h4 {
        color: var(--color-dark-blue);
        margin-bottom: 5px;
    }

    .conquista-info p {
        color: var(--color-gray-text);
        font-size: 0.9rem;
    }

    .historico-item {
        display: flex;
        align-items: center;
        padding: 15px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .historico-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--color-medium-green);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
        color: white;
        font-size: 1.2rem;
    }

    .historico-info h4 {
        color: var(--color-dark-blue);
        margin-bottom: 5px;
    }

    .historico-info p {
        color: var(--color-gray-text);
        font-size: 0.9rem;
    }

    .historico-pontos {
        margin-left: auto;
        font-weight: 600;
        color: var(--color-header-purple);
    }

    /* Responsividade */
    @media (max-width: 768px) {
        .trilhas-grid {
            grid-template-columns: 1fr;
        }
        
        .progresso-sections {
            grid-template-columns: 1fr;
        }
        
        .progresso-stats {
            grid-template-columns: repeat(2, 1fr);
        }
        
        .ranking-tabs {
            flex-direction: column;
            align-items: center;
        }
        
        .ranking-stats {
            flex-direction: column;
            gap: 5px;
        }
    }

    @media (max-width: 480px) {
        .progresso-stats {
            grid-template-columns: 1fr;
        }
        
        .trilha-footer {
            flex-direction: column;
            gap: 15px;
            align-items: stretch;
        }
        
        .trilha-stats {
            justify-content: center;
        }
    }