* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    /* Altura ajustável */
    background: linear-gradient(to right, #f093fb, #9144dd, #667eea);
    display: flex;
    align-items: center;
    /* Centraliza na vertical */
    padding: 0 30px;
    box-sizing: border-box;
}

.navbar img {
    height: 45px;
    /* tamanho ajustável da logo */
    animation-composition: initial;
}

.navbar .logo-animada {
    animation: pulse 2s infinite, glow 3s ease-in-out infinite alternate;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 5px #fff);
    }
    to {
        filter: drop-shadow(0 0 20px #6a5acd);
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    /* espaço entre logo e nome */
}

.brand-name {
    font-size: 20px;
    font-weight: bold;
    color: #79049c;
    font-family: 'Times New Roman', Times, serif;
}


/* Telas */

.screen {
    min-height: 100vh;
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #9144dd 50%, #f093fb 100%);
    padding: 20px;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Container */

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.container-game {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}


/* Menu Layout com NPC */

.menu-layout {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}


/* NPC Animado */

.npc-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.npc-character {
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.npc-head {
    width: 80px;
    height: 80px;
    background: #fbbf24;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
}

.npc-eye {
    width: 12px;
    height: 100px;
    background: #581c87;
    border-radius: 50%;
    position: absolute;
    top: 30px;
    animation: blink 4s infinite;
}

@keyframes blink {
    0%,
    48%,
    52%,
    100% {
        height: 18px;
    }
    50% {
        height: 2px;
    }
}

.npc-eye.left {
    left: 25px;
}

.npc-eye.right {
    right: 25px;
}

.npc-mouth {
    width: 40px;
    height: 20px;
    border: 3px solid #581c87;
    border-top: none;
    border-radius: 0 0 40px 40px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.npc-body {
    width: 5px;
    height: 0px;
    background: #9144dd;
    border-radius: 0 0 40px 40px;
    margin: -10px auto 0;
    position: relative;
    box-shadow: 0 10px 20px rgba(145, 68, 221, 0.3);
}

.npc-arm {
    width: 30px;
    height: 50px;
    background: #9144dd;
    border-radius: 15px;
    position: absolute;
    top: 10px;
}

.npc-arm.left {
    left: -20px;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%,
    100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(-30deg);
    }
}

.npc-arm.right {
    right: -20px;
}

.npc-speech-bubble {
    position: absolute;
    top: -30px;
    left: 20%;
    transform: translateX(-50%);
    background: #f8d98a;
    color: #581c87;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: bounce 2s infinite;
}

.npc-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #f8d98a;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}


/* Cards */

.menu-card,
.gameover-card,
.ranking-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}


/* Header com ícone */

.header-icon {
    text-align: center;
    margin-bottom: 40px;
}

.trophy-icon,
.award-icon {
    width: 80px;
    height: 80px;
    color: #fbbf24;
    margin: 0 auto 20px;
    display: block;
    stroke-width: 2;
}

.award-icon {
    width: 64px;
    height: 64px;
}

h1 {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

h2 {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.subtitle {
    color: rgba(191, 219, 254, 1);
    font-size: 1.1rem;
}


/* Form */

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1rem;
}

input[type="text"] {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
}


/* Botões */

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
    margin-bottom: 12px;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(251, 191, 36, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.icon-inline {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}


/* Indicadores de Nível */

.level-indicators {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.level-card {
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.level-card.easy {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
}

.level-card.medium {
    background: rgba(234, 179, 8, 0.2);
    border-color: rgba(234, 179, 8, 0.3);
}

.level-card.hard {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

.level-card .icon {
    width: 24px;
    height: 24px;
    margin: 0 auto 8px;
    stroke-width: 2;
}

.level-card.easy .icon {
    color: #22c55e;
}

.level-card.medium .icon {
    color: #eab308;
}

.level-card.hard .icon {
    color: #ef4444;
}

.level-card p {
    color: white;
    font-size: 0.75rem;
    margin: 0;
}


/* Game Header */

.game-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.score-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.score-badge {
    background: #fbbf24;
    color: #581c87;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.multiplier {
    color: white;
}

.multiplier .label {
    opacity: 0.6;
    margin-right: 8px;
}

.multiplier .value {
    font-weight: bold;
    color: #fbbf24;
}

.streak-section {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: bold;
}

.streak-section .icon {
    width: 20px;
    height: 20px;
    color: #fbbf24;
    stroke-width: 2;
}


/* Progress Bar */

.progress-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    height: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    transition: width 0.3s;
    border-radius: 20px;
}

.level-badge {
    color: white;
    font-weight: 600;
    text-transform: capitalize;
}


/* Timer */

.timer-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.timer-icon {
    width: 32px;
    height: 32px;
    color: #60a5fa;
    stroke-width: 2;
}

.timer-icon.danger {
    color: #f87171;
    animation: pulse 1s infinite;
}

.timer-display {
    font-size: 3rem;
    font-weight: bold;
    color: white;
}

.timer-display.danger {
    color: #f87171;
}


/* Question Container */

.question-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.question-text {
    text-align: center;
    margin-bottom: 32px;
    color: white;
}

.answers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.answer-btn {
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.answer-btn:hover:not(.correct):not(.wrong):not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.answer-btn.selected {
    background: #fbbf24;
    color: #581c87;
}

.answer-btn.correct {
    background: #22c55e;
    color: white;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.3);
}

.answer-btn.wrong {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
}

.answer-btn:disabled {
    cursor: not-allowed;
}


/* Game Over */

.player-name {
    color: rgba(191, 219, 254, 1);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 24px;
}

.final-score {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
}

.score-value {
    font-size: 4rem;
    font-weight: bold;
    color: white;
    margin-bottom: 8px;
}

.score-label {
    font-size: 1.5rem;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}


/* Ranking */

.ranking-card {
    text-align: center;
}

.ranking-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 24px;
    padding-right: 8px;
}

.ranking-list::-webkit-scrollbar {
    width: 6px;
}

.ranking-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.ranking-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.ranking-item {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rank-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rank-position {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.rank-position.gold {
    background: #fbbf24;
    color: #581c87;
}

.rank-position.silver {
    background: #d1d5db;
    color: #581c87;
}

.rank-position.bronze {
    background: #fb923c;
    color: #581c87;
}

.rank-position.other {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.rank-info {
    text-align: left;
}

.rank-name {
    color: white;
    font-weight: bold;
    margin-bottom: 4px;
}

.rank-details {
    color: rgba(191, 219, 254, 1);
    font-size: 0.875rem;
    text-transform: capitalize;
}

.rank-score {
    color: #fbbf24;
    font-weight: bold;
    font-size: 1.5rem;
}

.empty-ranking {
    color: white;
    opacity: 0.6;
    padding: 40px 0;
}


/* Animações */

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}


/* Responsivo */

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    .answers-grid {
        grid-template-columns: 1fr;
    }
    .game-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .timer-display {
        font-size: 2.5rem;
    }
    .score-value {
        font-size: 3rem;
    }
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to right, #f093fb, #9144dd, #667eea);
    color: #79049c;
    text-align: center;
    padding: 5px 10px;
    display: flex;
    /* ativa flexbox */
    align-items: center;
    /* centraliza verticalmente */
    justify-content: center;
    /* centraliza horizontalmente */
    gap: 10px;
    /* espaço entre logo e texto */
}

.footer img {
    height: 30px;
    /* tamanho da logo */
}

.footer p {
    margin: 0;
    /* remove espaçamento extra do parágrafo */
    font-size: 0.9rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}