:root {
    --neon-purple: #b829ff;
    --neon-purple-glow: rgba(184, 41, 255, 0.4);
    --neon-purple-dim: rgba(184, 41, 255, 0.1);
}

/* ================= 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(184, 41, 255, 0.25);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(184, 41, 255, 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(184, 41, 255, 0.05);
    border: 1px solid rgba(184, 41, 255, 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(184, 41, 255, 0.15);
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(184, 41, 255, 0.3);
    color: var(--neon-purple);
}

.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-purple);
    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-purple);
    padding: 5px;
    color: var(--neon-purple);
    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(184, 41, 255, 0.08);
}

.rank-first td {
    border-bottom: 1px solid rgba(184, 41, 255, 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;
}

/* ================= COMPONENTES GLOBAIS DE JOGO ================= */
.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;
}

/* ================= ACHEI (ESPECÍFICO) ================= */

#achei-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 15px auto;
    width: 100%;
    max-width: 350px;
    box-sizing: border-box;
}

.letter-slot {
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s, background 0.15s, border-color 0.15s;
    text-transform: uppercase;
}

.letter-slot:hover {
    border-color: var(--neon-purple);
    background: var(--neon-purple-dim);
}

/* Letra selecionada para movimentar */
.letter-slot.selected {
    border-color: var(--neon-purple);
    background: var(--neon-purple-glow);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--neon-purple-glow);
    z-index: 5;
}

/* Quando forma a palavra certa */
.letter-slot.correct {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.2);
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
    transform: scale(1.05);
    z-index: 10;
    animation: correctPulse 0.5s ease-out;
}



@keyframes correctPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 255, 136, 0); }
    50% { transform: scale(1.15); box-shadow: 0 0 20px rgba(0, 255, 136, 0.6); }
    100% { transform: scale(1.05); box-shadow: 0 0 10px rgba(0, 255, 136, 0.2); }
}

