/* ==========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL    
   ========================================== */
:root {
    --bg-color: #050505;
    /* Negro abisal */
    --card-bg: rgba(9, 9, 14, 0.85);
    /* Obsidiana translúcida */
    --border-color: rgba(255, 255, 255, 0.1);
    /* Bordes de cristal sutiles */
    --text-bright: #f8fafc;
    /* Blanco fantasma */

    /* Colores del Hechizo */
    --accent: #38bdf8;
    /* Azul alma / Etéreo */
    --correct: #10b981;
    /* Esmeralda oscuro */
    --incorrect: #e11d48;
    /* Carmesí / Sangre */
    --partial: #f59e0b;
    /* Ámbar / Fuego dorado */
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: url('img/fondo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--bg-color);
    color: var(--text-bright);
    display: flex;
    justify-content: center;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
}

/* ==========================================
   2. CONTENEDORES Y NAVEGACIÓN
   ========================================== */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    z-index: 2;
}

header h1 {
    font-size: 3.8rem;
    font-weight: 900;
    color: var(--text-bright);
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 25px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 1), 0 0 15px rgba(56, 189, 248, 0.3);
}

.mode-menu {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
    padding-top: 10px;
}

.mode-menu button {
    background: rgba(5, 5, 5, 0.8);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color);
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.mode-menu button:hover {
    color: var(--text-bright);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.mode-menu button.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

/* ==========================================
   3. MENÚ PRINCIPAL (LANDING PAGE)
   ========================================== */
.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
    text-align: center;
    width: 100%;
    flex: 1;
}

.landing-container .subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 50px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 1);
}

.mode-cards {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 600px;
}

.mode-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.mode-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s;
}

.mode-card:hover::after {
    left: 150%;
}

.mode-card h2 {
    color: var(--accent);
    font-size: 2.2rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.mode-card p {
    margin: 0;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.mode-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(56, 189, 248, 0.1);
}

.mode-card.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
}

/* ==========================================
   4. COMPONENTES UI (BUSCADORES, BOTONES, SELECTS)
   ========================================== */
.volume-selector {
    margin-bottom: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.volume-selector label {
    font-size: 1.1rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 1);
}

.volume-selector select {
    background-color: var(--card-bg);
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 18px 55px 18px 25px;
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9), inset 0 0 15px rgba(56, 189, 248, 0.15);
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.volume-selector select:hover,
.volume-selector select:focus {
    background-color: rgba(15, 18, 25, 0.95);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 1), 0 0 25px rgba(56, 189, 248, 0.4), inset 0 0 20px rgba(56, 189, 248, 0.2);
    transform: translateY(-3px);
}

.volume-selector select option {
    background-color: #050505;
    color: var(--text-bright);
    font-weight: bold;
    font-size: 1.1rem;
    padding: 15px;
}

.input-section {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.input-container {
    position: relative;
    flex-grow: 1;
}

#searchInput {
    width: 100%;
    padding: 18px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-bright);
    font-size: 1.1rem;
    outline: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    transition: border-color 0.3s;
}

#searchInput:focus {
    border-color: var(--accent);
}

#guessButton {
    padding: 0 35px;
    background: rgba(5, 5, 5, 0.8);
    color: var(--text-bright);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}

#guessButton:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

#guessButton:active {
    transform: scale(0.95);
}

.suggestions-box {
    position: absolute;
    top: 105%;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 12, 0.98);
    border: 1px solid var(--accent);
    border-radius: 8px;
    z-index: 1000;
    display: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    overflow: hidden;
}

.suggestion-item {
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-bright) !important;
    font-weight: 600;
    letter-spacing: 1px;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent) !important;
}

.hint-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    animation: reveal 0.5s ease;
}

.btn-hint {
    background: transparent;
    color: var(--partial);
    border: 2px solid var(--partial);
    padding: 10px 30px;
    border-radius: 6px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.btn-hint:hover {
    background: var(--partial);
    color: #000;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
    transform: scale(1.05);
}

.hint {
    font-size: 1rem;
    color: var(--text-bright);
    background: rgba(5, 5, 5, 0.95);
    padding: 15px 25px;
    border-radius: 8px;
    border: 1px solid var(--partial);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.9);
    animation: reveal 0.5s ease;
}

.hint strong {
    color: var(--partial);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hint.hidden {
    display: none;
}

/* ==========================================
   5. MODAL & POPUPS
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(10, 10, 12, 0.98);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent);
    border-radius: 12px;
    padding: 40px 30px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 1);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-modal {
    background: rgba(15, 18, 25, 0.9) !important;
    border: 1px solid var(--accent) !important;
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.8) !important;
    border-radius: 16px !important;
    max-width: 450px;
}

.close,
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease-in-out, transform 0.2s;
}

.close:hover,
.close-btn:hover {
    color: var(--incorrect);
    transform: scale(1.1);
    text-decoration: none;
}

.modal-content h2,
.modal-glow-title {
    color: var(--text-bright);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.modal-glow-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.modal-subtitle {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 15px;
    background: rgba(56, 189, 248, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

/* ==========================================
   6. MODO CLASSIC (TABLERO BASE)
   ========================================== */
.game-area {
    width: 100%;
    /* Prepara el contenedor para el scroll lateral en móviles */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.board-header,
.row {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 10px;
    width: 100%;
}

.board-header {
    margin-bottom: 15px;
}

.board-header div {
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1);
}

.cell {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-bright);
    text-align: center;
    padding: 5px;
    line-height: 1.2;
    overflow-wrap: break-word;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    animation: reveal 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.correct {
    background: rgba(16, 185, 129, 0.2) !important;
    border: 2px solid var(--correct) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2), inset 0 0 20px rgba(16, 185, 129, 0.2) !important;
}

.incorrect {
    background: rgba(225, 29, 72, 0.2) !important;
    border: 2px solid var(--incorrect) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(225, 29, 72, 0.2), inset 0 0 20px rgba(225, 29, 72, 0.2) !important;
}

.higher,
.lower {
    background: rgba(245, 158, 11, 0.2) !important;
    border: 2px solid var(--partial) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2), inset 0 0 20px rgba(245, 158, 11, 0.2) !important;
    font-weight: 900;
}

/* ==========================================
   7. MODO TRUE NAME
   ========================================== */
.true-name-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent);
    border-radius: 12px;
    padding: 45px 20px;
    margin-bottom: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
}

.true-name-box .subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.true-name-box h2 {
    font-size: 3.5rem;
    color: var(--text-bright);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.4), 0 0 40px rgba(56, 189, 248, 0.2);
    font-weight: 900;
    font-style: italic;
    letter-spacing: 2px;
}

.true-name-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.tn-guess-row {
    padding: 18px 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    animation: reveal 0.4s ease-in-out;
}

/* ==========================================
   8. MODO BESTIARY
   ========================================== */
.lives-container {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 30px;
}

.flame {
    font-size: 2.2rem;
    filter: hue-rotate(180deg) saturate(150%) brightness(120%) !important;
    text-shadow: none !important;
    transition: all 0.5s ease-in-out;
}

.flame.extinguished {
    filter: grayscale(100%) opacity(30%) !important;
    transform: scale(0.5);
}

.beast-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 35px;
    margin-bottom: 35px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.beast-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--incorrect), transparent);
}

.beast-description {
    font-size: 1.2rem;
    font-style: italic;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 25px;
    padding: 20px;
    border-left: 4px solid var(--incorrect);
    background: rgba(225, 29, 72, 0.05);
}

.beast-hints {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bestiary-inputs {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 35px;
}

.select-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.select-group label {
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

.bestiary-inputs select {
    background: rgba(5, 5, 5, 0.9);
    color: var(--text-bright);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    outline: none;
    cursor: pointer;
    width: 160px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.bestiary-inputs select:focus {
    border-color: var(--incorrect);
    box-shadow: 0 0 15px rgba(225, 29, 72, 0.3);
}

.btn-bestiary {
    padding: 14px 35px;
    background: var(--incorrect);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.3);
    transition: all 0.2s;
}

.btn-bestiary:hover {
    background: #f43f5e;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(225, 29, 72, 0.4);
}

.bestiary-header,
.bestiary-board .row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 450px;
    margin: 0 auto;
}

/* ==========================================
   9. MODO SHADOW GRID
   ========================================== */
.shadow-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 650px;
    margin: 30px auto;
    opacity: 1 !important;
    filter: none !important;
}

.grid-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1);
    padding: 10px;
    letter-spacing: 1px;
}

.grid-cell {
    height: 100px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    padding: 0;
}

.grid-cell:hover {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
    transform: scale(1.02);
}

.grid-cell.solved {
    background: rgba(16, 185, 129, 0.2) !important;
    border: 2px solid var(--correct) !important;
    color: #ffffff !important;
    cursor: default;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2) !important;
}

.grid-cell.revealed {
    background: rgba(248, 81, 73, 0.15) !important;
    color: var(--incorrect) !important;
    border: 1px solid var(--incorrect) !important;
    pointer-events: none;
    animation: revealPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grid-cell.editing {
    display: block !important;
}

.cell-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
    outline: none;
    font-family: inherit;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    padding: 38px 10px 10px 10px;
    box-sizing: border-box;
}

.cell-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: normal;
}

.cell-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 130%;
    margin-left: -15%;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid var(--accent);
    border-radius: 8px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.cell-suggestion-item {
    padding: 10px;
    font-size: 0.85rem;
    color: var(--text-bright);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.cell-suggestion-item:hover {
    background: rgba(56, 189, 248, 0.2);
}

/* ==========================================
   10. PANTALLA POST-JUEGO Y ESTADÍSTICAS
   ========================================== */
#error-msg {
    font-size: 1.4rem;
    font-weight: 900;
    text-align: center;
    margin: 25px auto;
    padding: 20px 35px;
    border-radius: 8px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
    width: fit-content;
    max-width: 90%;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#error-msg:empty {
    display: none;
}

/* ==========================================
   10. PANTALLA POST-JUEGO Y ESTADÍSTICAS
   ========================================== */
.post-game-section {
    margin: 30px auto 50px auto; /* Centra la caja horizontalmente */
    padding: 20px 30px; /* Más pequeñita y ajustada */
    max-width: 550px; /* Evita que se estire por toda la pantalla */
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--accent); /* Un toque azul arriba para que quede épico */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    animation: fadeIn 0.5s ease-in;
}

.post-buttons {
    display: flex;
    justify-content: center;
    gap: 15px; /* Botones un poco más juntos */
    flex-wrap: wrap;
}

.btn-post {
    padding: 12px 24px; 
    font-size: 1rem;
    font-weight: 900;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.post-game-section.hidden {
    display: none;
}
#openStatsBtn {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

#openStatsBtn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

.next-btn {
    background: var(--text-bright);
    color: #000;
}

.next-btn:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.stats-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.stat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    letter-spacing: 1px;
}

.activity-section {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.activity-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.activity-graph {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.activity-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.activity-box:hover {
    transform: scale(1.2);
}

.activity-box.win {
    background-color: var(--correct);
}

.activity-box.loss {
    background-color: var(--incorrect);
}

/* ==========================================
   11. ANUNCIOS Y FOOTER
   ========================================== */
.ad-sidebar {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    height: 550px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

.ad-left {
    left: 20px;
}

.ad-right {
    right: 20px;
}

.main-footer,
.credits {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.credits {
    position: fixed;
    bottom: 15px;
    right: 25px;
    text-shadow: 0 2px 4px black;
}

.main-footer {
    padding: 20px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   12. ANIMACIONES
   ========================================== */
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }

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

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

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

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalPop {
    0% {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes revealPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================
   13. RESPONSIVE Y MÓVILES (PROTECCIÓN SEO)
   ========================================== */
@media (max-width: 1150px) {
    .ad-sidebar {
        display: none;
    }

    header h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
        letter-spacing: 2px;
        margin-bottom: 15px;
    }

    .mode-menu {
        flex-wrap: wrap;
        gap: 10px;
    }

    .mode-menu button {
        padding: 8px 15px;
        font-size: 0.85rem;
        flex: 1 1 40%;
    }

    /* Solución de Scroll Horizontal para Tableros */
    .board-header div {
        font-size: 0.75rem;
        /* Tamaño seguro para lectura en móvil */
        letter-spacing: 0px;
    }

    .cell {
        height: 60px;
        font-size: 0.8rem;
        padding: 4px;
    }

    /* Obligamos al tablero Clásico a mantener un ancho mínimo para scroll */
    .board-header,
    .row {
        min-width: 500px !important;
    }

    /* El bestiario tiene menos columnas, lo ajustamos para que no desborde igual */
    .bestiary-header,
    .bestiary-board .row {
        min-width: 300px !important;
        max-width: 450px !important;
        margin: 0 auto;
    }

    /* Ajuste Shadow Grid para móviles */
    .shadow-grid-container {
        gap: 6px;
        margin: 15px auto;
    }

    .grid-cell {
        height: 70px;
        font-size: 0.85rem;
    }

    .grid-label {
        font-size: 0.65rem;
        padding: 5px;
    }

    .true-name-box h2 {
        font-size: 2.2rem;
    }

    .bestiary-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .bestiary-inputs select,
    .btn-bestiary {
        width: 100%;
    }

    .beast-box {
        padding: 20px 15px;
    }

    .modal-content {
        padding: 25px 15px;
        width: 95%;
    }

    .stat-num {
        font-size: 2rem;
    }
}

/* Añade esto a tu CSS si no lo tienes ya */
.partial {
    background-color: #f59e0b; /* Un naranja estilo 'warning' muy limpio */
    /* background-color: #ca8a04; Otra opción de naranja un poco más oscuro si prefieres */
    color: white;
}


/* ==========================================
   FOOTER Y BOTONES (ABOUT & KOFI)
   ========================================== */
.site-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 20px;
    z-index: 10;
}

.footer-btn {
    background: #1f2937; /* Gris oscuro elegante */
    color: #f3f4f6;
    border: 1px solid #374151;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-btn:hover {
    background: #374151;
    transform: translateY(-2px);
}

.kofi-btn {
    background: #FF5E5B; /* El rojo/coral característico de Ko-fi */
    color: #ffffff;
    border: none;
}

.kofi-btn:hover {
    background: #e04845;
}