:root {
    --neon-yellow: #facc15;
    --neon-yellow-glow: rgba(250, 204, 21, 0.4);
}

/* ================= CONTAINERS & BASE ================= */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 40px;
    overflow-x: hidden;
}

#container {
    position: relative;
    background: var(--card-bg, rgba(13, 20, 36, 0.88));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(250, 204, 21, 0.25);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(250, 204, 21, 0.15);
    padding: 30px 40px;
    width: 480px;
    max-width: 95vw;
    text-align: center;
    transition: width 0.3s ease;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ================= TELAS E TEXTOS ================= */
.screen {
    display: none;
    width: 100%;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 3px;
    margin: 0 0 5px 0;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* ================= BOTÕES ================= */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.btn {
    background: rgba(250, 204, 21, 0.05);
    border: 1px solid rgba(250, 204, 21, 0.3);
    color: var(--text-main);
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    text-transform: uppercase;
}

.btn:hover {
    background: rgba(250, 204, 21, 0.15);
    border-color: var(--neon-yellow);
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.3);
    color: var(--neon-yellow);
}

.btn-danger {
    border-color: rgba(255, 0, 85, 0.5) !important;
    color: var(--primary-magenta) !important;
}

.btn-danger:hover {
    background: rgba(255, 0, 85, 0.15) !important;
    border-color: var(--primary-magenta) !important;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.4) !important;
    color: var(--primary-magenta) !important;
}

/* ================= RANKINGS E MODAIS ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--card-bg, rgba(13, 20, 36, 0.95));
    padding: 30px;
    border: 1px solid var(--neon-yellow);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
}

.rank-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
    margin-top: 15px;
    font-family: 'Rajdhani', sans-serif;
}

.rank-table th {
    border-bottom: 1px solid var(--neon-yellow);
    padding: 5px;
    color: var(--neon-yellow);
    font-size: 14px;
}

.rank-table td {
    padding: 8px 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rank-first {
    font-size: 1.25em;
    font-weight: 900;
    background: rgba(250, 204, 21, 0.08);
}

.rank-first td {
    border-bottom: 1px solid rgba(250, 204, 21, 0.3);
}

/* ================= CORREÇÃO DOS ÍCONES / SVG ================= */
svg.icon {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    flex: 0 0 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    overflow: visible !important;
}

button.btn svg.icon,
a.btn svg.icon {
    margin-right: 8px !important;
}

/* ================= MEMORIZE (ESPECÍFICO) ================= */
.flash-char {
    font-family: 'Orbitron', sans-serif;
    font-size: 110px;
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow: 0 0 35px var(--neon-yellow-glow);
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    margin: 20px 0;
}

.flash-char.show {
    opacity: 1;
    transform: scale(1.1);
}

.placeholders {
    display: flex;
    justify-content: center;
    gap: 12px;
    height: 50px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.char-slot {
    width: 28px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
    font-family: 'Orbitron', sans-serif;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    color: rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s, color 0.2s, text-shadow 0.2s;
    line-height: 35px;
}

/* Quando o usuário digita (Fica branco/cinza) */
.char-slot.typed {
    border-bottom-color: var(--text-main);
    color: var(--text-main);
    text-shadow: none;
}

/* Animação de validação rodando */
.char-slot.validating {
    opacity: 0.7;
    transform: scale(1.1);
}

/* Quando valida que está CERTO (Amarelo) */
.char-slot.filled {
    border-bottom-color: var(--neon-yellow);
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow-glow);
    transform: scale(1);
}

/* Quando valida que está ERRADO (Vermelho) */
.char-slot.error {
    border-bottom-color: var(--primary-magenta);
    color: var(--primary-magenta);
    text-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
    animation: errShake 0.35s cubic-bezier(.36, .07, .19, .97) both;
}

/* ================= MODO FLASH ================= */
.flash-string {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    /* Reduzido de 45px para caber os 10 numéricos */
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    letter-spacing: 6px;
    margin: 30px 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}

.flash-feedback-row {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 12px;
    display: flex;
    justify-content: center;
}

.feedback-char {
    margin: 0 4px;
}

.feedback-char.correct {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.feedback-char.wrong {
    color: var(--primary-magenta);
    text-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
}

.feedback-char.correction {
    color: var(--neon-yellow);
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}

.feedback-char.empty {
    visibility: hidden;
}

/* Animação Dourada para quebra de Recorde Global */
.record-gold {
    color: var(--gold) !important;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 10px #fff !important;
    transform: scale(1.1);
}

.status-msg {
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    color: var(--text-muted);
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    min-height: 24px;
}

@keyframes errShake {

    10%,
    90% {
        transform: translate3d(-2px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(4px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-8px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(8px, 0, 0);
    }
}

/* Inputs do MODO: PISQUEI */
.pisquei-input-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(250, 204, 21, 0.3);
    color: var(--neon-yellow);
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    padding: 8px 10px;
    border-radius: 8px;
    outline: none;
    text-align: center;
    box-sizing: border-box;
    text-transform: uppercase;
    transition: all 0.2s;
}

.pisquei-input-field:focus {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}