:root {
    --primary-color: #7c83fd;
    --bg-color: #f8f9ff;
    --card-bg: #ffffff;
    --text-color: #1a1c2c;
    --easy-color: #008f39; /* Verde mais forte */
    --medium-color: #ff9900; /* Amarelo/Laranja mais intenso */
    --hard-color: #cc0000; /* Vermelho mais intenso */
    --border-radius: 25px;
    --shadow-defined: 0 20px 60px rgba(0, 0, 0, 0.25);
    --border-gold: #d4af37;
    --border-blue: #1e3a8a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: linear-gradient(135deg, #f3efc2d9 0%, #ffffff 100%);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow-y: auto;
}

.container {
    width: 100%;
    max-width: 500px;
    max-height: 87vh; /* Limite de 87% da altura da tela solicitado */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px;
    margin: auto; /* Centralização perfeita */
}

/* Telas do Quiz */
.screen {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    position: relative;
    z-index: 5;
}

.screen.active {
    display: flex;
}

#difficulty-screen.active {
    z-index: 500;
}

/* CARD COM BORDA DUPLA CONTRASTANTE */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-defined);
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid var(--border-blue);
    outline: 2px solid var(--border-gold);
    outline-offset: -6px;
    width: 100%;
}

/* Home Layout V2 */
.home-layout-v2 {
    padding: 0 !important;
    border: 6px solid var(--border-blue) !important;
    outline: 6px solid var(--border-gold) !important; /* Aumentado para 6px */
    outline-offset: -9px !important;
}

.hero-container-v2 {
    width: 100%;
    border-bottom: 4px solid var(--border-gold);
    line-height: 0;
}

.banner-img-v2 {
    width: 100%;
    display: block;
}

.home-content-v2 {
    padding: 20px;
}

.main-title-v2 {
    font-size: 24px;
    font-weight: 900;
    color: var(--border-blue);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.subtitle-v2 {
    font-size: 14px;
    color: #4e4b66;
    margin-bottom: 15px;
    font-weight: 600;
}

.input-group-v2 {
    margin-bottom: 15px;
    text-align: left;
}

.input-group-v2 label {
    display: block;
    margin-bottom: 5px;
    font-weight: 800;
    color: var(--border-blue);
    font-size: 14px;
}

.input-group-v2 input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #eff0f6;
    font-size: 15px;
    outline: none;
}

.btn-primary-v2 {
    width: 100%;
    padding: 15px;
    background: var(--border-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer !important;
    margin-bottom: 15px;
    transition: transform 0.2s;
}

.info-box-v2 {
    background: #f8f9ff;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d9dbe9;
}

.info-box-v2 p {
    font-size: 12px;
    font-weight: 700;
    color: #6e7191;
    margin: 0;
    text-align: left;
}

/* Dificuldade */
.diff-card {
    padding: 25px;
}

.welcome-mascotes-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.welcome-mascotes {
    height: clamp(100px, 20vh, 150px); /* Tamanho normal e responsivo */
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
    object-fit: contain;
}

.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    position: relative;
    z-index: 9999; /* Força os botões para a frente */
}

.diff-btn {
    padding: 16px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    color: white;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 10000;
    pointer-events: auto !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Sombra leve e espalhada */
}

.diff-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.diff-btn.easy { background: var(--easy-color); }
.diff-btn.medium { background: var(--medium-color); }
.diff-btn.hard { background: var(--hard-color); }

/* Status Header */
.status-header {
    background: white;
    padding: 8px 12px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 2px solid var(--border-gold);
    position: relative;
    margin-top: 35px; /* Espaço aumentado para o mascote */
    z-index: 10;
}

.header-mascotes {
    position: absolute;
    top: 50%; /* Centraliza verticalmente em relação ao header */
    left: 50%;
    transform: translate(-50%, -50%); /* Centralização perfeita horizontal e vertical */
    z-index: 100;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.mini-mascotes { 
    height: clamp(100px, 18vh, 135px); /* Tamanho maior para garantir sobreposição top/bottom */
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.45)); /* Sombra 3D marcante */
    object-fit: contain;
    display: block;
}

/* Removido estilo antigo */
.player-info h3 { font-size: 14px; font-weight: 800; color: var(--border-blue); }
.player-info p { font-size: 11px; font-weight: 600; color: #6e7191; }
.score-value { font-size: 20px; font-weight: 900; color: var(--medium-color); }

/* Progresso */
.progress-container { background: #eff0f6; height: 8px; border-radius: 4px; border: 1px solid #d9dbe9; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--border-blue), var(--primary-color)); border-radius: 4px; }

/* Question Card */
.question-card { padding: 0 !important; }
.card-img-container { width: 100%; position: relative; padding-top: 56.25%; background: #000; border-bottom: 3px solid var(--border-gold); }
.card-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.question-content { padding: 12px; }
.question-card h2 { font-size: 16px; margin-bottom: 12px; color: var(--border-blue); font-weight: 800; }

.options-list { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-top: 10px; /* Margem para não ficar grudado no texto da pergunta */
}
.option-btn {
    padding: 12px;
    background: white;
    border: 2px solid #eff0f6;
    border-radius: 12px;
    font-size: clamp(12px, 3vw, 15px);
    font-weight: 700;
    cursor: pointer !important;
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 50;
    pointer-events: all !important;
    /* Sombra de destaque evidente */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.option-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    border-color: var(--border-blue);
}

.option-btn.correct {
    background-color: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724 !important;
}

.option-btn.incorrect {
    background-color: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}

/* Navegação - AGORA PRÓXIMO AO CARD */
.navigation-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
    height: 4vh; /* Reduzido pela metade para 4% da altura da tela */
    margin-top: 10px; /* Margem aumentada para não ficar feio grudado */
}

.btn-nav, .btn-primary-nav {
    height: 100%; /* Ocupa a altura total do container de 8vh */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-weight: 900;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-nav {
    background: white;
    border: 3px solid var(--border-blue);
    color: var(--border-blue);
    flex: 1;
    font-size: clamp(10px, 2.5vw, 14px); /* Fonte responsiva */
    cursor: pointer !important;
}

.btn-primary-nav {
    background: var(--border-blue);
    color: white;
    flex: 2;
    font-size: clamp(12px, 3vw, 16px); /* Fonte responsiva */
    border: none;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.btn-nav:hover, .btn-primary-nav:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Responsividade */
@media (max-width: 480px) {
    .container { padding: 10px; }
    .options-list { grid-template-columns: 1fr; }
    .main-title-v2 { font-size: 20px; }
    .question-card h2 { font-size: 14px; }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 500;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    border: 4px solid var(--border-gold);
    overflow: hidden;
}
.contrib-header-img { width: 100%; border-bottom: 3px solid var(--border-gold); }
.contrib-body { padding: 20px; }
.contrib-title { font-size: 16px; font-weight: 900; color: var(--border-blue); margin-bottom: 12px; }
.contrib-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-contrib-main {
    background: linear-gradient(135deg, #ff6b6b, #ee5253);
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
}
.btn-continue {
    background: #f8f9ff;
    color: #6e7191;
    padding: 12px;
    border-radius: 12px;
    border: 2px solid #d9dbe9;
    font-weight: 700;
    cursor: pointer !important;
}
