/* ================================
   PALETA DE COLORES ESTILO MARIO
   ================================ */
:root {
    --sky-blue: #75c9ff;
    --deep-sky: #4ba3ff;
    --mario-red: #e62b2b;
    --mario-dark-red: #b01515;
    --block-orange: #f5b041;
    --block-brown: #b5651d;
    --pipe-green: #00a651;
    --coin-gold: #ffd447;
    --cloud-white: #fdfdfd;
    --night-blue: #171c3f;
    --text-main: #0b1b2a;
    --text-soft: #203040;
    --panel-bg: rgba(255, 255, 255, 0.9);
}

/* Reset muy básico */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    color: var(--text-main);
    letter-spacing: 0.2px;
    /* mejora lectura */
}

/* Fondo estilo videojuego: cielo degradado */
.page-bg {
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--sky-blue), #ffffff 55%, #e0c397 55%, #c57a33 100%);
}

/* Contenedor general */
.game-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.75rem 0.75rem 2.5rem;
}

/* ================================
   HEADER
   ================================ */
.game-header {
    padding: 0.75rem 0.5rem;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, var(--deep-sky), var(--sky-blue));
    border-radius: 1.2rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 8px 0 #2f5f97;
    border: 3px solid #fff;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: var(--cloud-white);
    object-fit: cover;
}


/* NAV */

.logo-text h1 {
    font-family: "Press Start 2P", system-ui;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #ffffff;
    text-shadow: 2px 2px #2f5f97;
}

.subtitle {
    font-size: 0.7rem;
    color: #f0f8ff;
}

/* Menú tipo barra de juego */
.game-menu {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.menu-link {
    font-family: "Press Start 2P", system-ui;
    font-size: 0.55rem;
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    background: var(--block-orange);
    border: 3px solid #fff;
    border-radius: 0.6rem;
    color: #5a2d0c;
    box-shadow: 0 4px 0 #b66f1e;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.menu-link:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #b66f1e;
}

.menu-link.active {
    background: var(--coin-gold);
}

/* ================================
   MAIN / HERO
   ================================ */
.game-main {
    margin-top: 1rem;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1rem;
}

.hero-left,
.hero-right {
    background: var(--panel-bg);
    border-radius: 1.2rem;
    padding: 1rem;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 0 #b1b1b1;
}

.hero-title {
    font-family: "Press Start 2P", system-ui;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--mario-red);
    text-shadow: 2px 2px var(--mario-dark-red);
    margin-bottom: 0.75rem;
}

.hero-text {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-bottom: 0.75rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Botones estilo Mario */
.btn {
    font-family: "Press Start 2P", system-ui;
    font-size: 1rem;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    border: 3px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 0 #333;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--mario-red), var(--mario-dark-red));
    color: #fff7e6;
    box-shadow: 0 5px 0 #5b0909;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--pipe-green), #006d35);
    color: #f3ffe8;
    box-shadow: 0 5px 0 #024722;
}

.btn-tercero {
    background: linear-gradient(135deg, var(--deep-sky), #0abaff);
    color: #f3ffe8;
    box-shadow: 0 5px 0 #0e66ca;
}

.btn:hover {
    transform: translateY(2px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.6);
    filter: brightness(1.05);
}

.hero-list {
    list-style: none;
    font-size: 0.8rem;
    color: var(--text-soft);
    display: grid;
    gap: 0.2rem;
}

/* Tarjeta pixel-art derecha */
.pixel-card {
    border-radius: 1rem;
    padding: 0.8rem;
    background: linear-gradient(180deg, var(--night-blue), #2b346f);
    color: #fafdff;
    border: 3px solid #fff;
    box-shadow: 0 8px 0 #101439;
    position: relative;
    overflow: hidden;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    font-family: "Press Start 2P", system-ui;
    font-size: 0.45rem;
    margin-bottom: 0.6rem;
}

.coin-row {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.coin {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fffad1, var(--coin-gold));
    border: 3px solid #f3b831;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
}

.blocks-row {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
}

.brick-block,
.question-block {
    width: 32px;
    height: 32px;
    border-radius: 0.2rem;
    border: 3px solid #4b2506;
    box-shadow: 0 4px 0 #4b2506;
}

.brick-block {
    background: repeating-linear-gradient(135deg,
            var(--block-brown),
            var(--block-brown) 6px,
            #d07b34 6px,
            #d07b34 12px);
}

.question-block {
    background: var(--block-orange);
    position: relative;
}

.question-block::after {
    content: "?";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Press Start 2P", system-ui;
    font-size: 0.85rem;
    color: #fffbe0;
    text-shadow: 1px 1px #8b4a0c;
}

.card-text {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ================================
   FOOTER - suelo de ladrillos
   ================================ */
.game-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.brick-row {
    height: 32px;
    background: repeating-linear-gradient(90deg,
            var(--block-brown),
            var(--block-brown) 32px,
            #8c4a17 32px,
            #8c4a17 34px);
    border-top: 4px solid #4b2506;
}

.footer-text {
    margin-top: 0.35rem;
    font-size: 0.7rem;
    color: #4f2c10;
}

/* ================================
   RESPONSIVE
   ================================ */
/* =====================================
   RESPONSIVE MEJORADO (tablet/desktop)
   =====================================*/
@media (min-width: 768px) {

    .header-inner {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }

    .menu-scroll {
        overflow-x: visible;
    }

    .hero-section {
        grid-template-columns: 1.2fr 1fr;
    }

    .btn {
        width: auto;
    }

    .levels-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .levels-section {
        padding: 1.2rem 1.4rem;
    }

}


/* =====================================
   MOBILE FIRST – base para celulares
   =====================================*/
.game-wrapper {
    padding: 0.5rem;
}

.logo-img {
    width: 60px;
    height: 60px;
}

.game-header .header-inner {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
}

/* Menú horizontal desplazable */
.menu-scroll {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    scrollbar-width: none;
}

.menu-scroll::-webkit-scrollbar {
    display: none;
}

/* Menú */
.menu-link {
    flex: 0 0 auto;
    padding: 0.45rem 0.75rem;
    font-size: 1rem;
}

/* Sección hero en 1 columna siempre */
.hero-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Cards mejor adaptadas */
.mobile-card {
    padding: 1.2rem;
}

/* Botones grandes */
.btn {
    width: 100%;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
}

/* Texto más grande y legible en celular */
.hero-text,
.card-text {
    font-size: 0.95rem;
    line-height: 1.55;
}


/* =====================================
   SELECCIÓN DE NIVELES / DÍAS
   =====================================*/
.levels-section {
    margin-top: 1.5rem;
    background: var(--panel-bg);
    border-radius: 1.2rem;
    padding: 1rem;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 0 #b1b1b1;
}

.levels-title {
    font-family: "Press Start 2P", system-ui;
    font-size: 1.3rem;
    color: var(--mario-red);
    text-align: center;
    /* text-shadow: 2px 2px var(--mario-dark-red); */
    margin-bottom: 0.4rem;
}

.levels-subtitle {
    font-size: 0.85rem;
    color: var(--text-soft);
    text-align: center;
    margin-bottom: 0.9rem;
}

.levels-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
}

/* Tarjetas estilo bloque de Mario */
.level-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.9rem;
    border: 3px solid #ffffff;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

/* Días = estilo ladrillo / pregunta */
.level-day {
    background: linear-gradient(130deg, var(--block-orange), #f8cf7a);
}

/* Extras (horario / cancionero) = verde tubo y azul cielo */
.level-extra {
    background: linear-gradient(135deg, var(--pipe-green), #00c46c);
}

/* Etiqueta pequeña tipo HUD */
.level-tag {
    font-family: "Press Start 2P", system-ui;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.85);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    align-self: flex-start;
    color: #333;
}

.level-name {
    font-family: "Press Start 2P", system-ui;
    font-size: 1rem;
    text-transform: uppercase;
    text-shadow: 1px 1px rgba(0, 0, 0, 0.3);
}

.level-desc {
    font-size: 0.8rem;
    color: #3a2a16;
}

.level-cta {
    margin-top: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.level-cta::after {
    content: "▶";
    font-size: 0.6rem;
}

/* Efecto presionar / saltar */
.level-card:active,
.level-card:hover {
    transform: translateY(2px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
    filter: brightness(1.03);
}