
:root {
    --fondo: #08080f;
    --panel: #11111c;
    --morado: #b44aff;
    --azul: #388bff;
    --rojo: #ff365d;
    --texto: #f4f0ff;
    --secundario: #aaa5bd;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--texto);
    background:
        radial-gradient(ellipse at 15% 15%, #35104d66, transparent 45%),
        radial-gradient(ellipse at 85% 80%, #0c327766, transparent 45%),
        var(--fondo);
    font-family: "Segoe UI", Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        135deg,
        #b44aff08,
        transparent 45%,
        #ff365d08
    );
}

.contenedor {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.panel {
    position: relative;
    width: min(100%, 650px);
    padding: clamp(24px, 6vw, 48px);
    text-align: center;
    background: #11111ceF;
    border: 1px solid #b44aff55;
    border-radius: 24px;
    box-shadow:
        0 0 45px #852bff16,
        0 20px 70px #0008;
    animation: aparecer .8s ease both;
}

.etiqueta {
    color: var(--azul);
    font-size: 11px;
    letter-spacing: 3px;
    overflow-wrap: anywhere;
}

.simbolo {
    margin: 28px auto 12px;
    font-size: 60px;
    color: var(--morado);
    text-shadow: 0 0 28px var(--morado);
    animation: flotar 3s ease-in-out infinite;
}

h1 {
    font-size: clamp(28px, 6vw, 42px);
    margin: 16px 0;
}

p {
    color: var(--secundario);
    line-height: 1.8;
}

.formulario {
    display: grid;
    gap: 14px;
    margin-top: 28px;
    text-align: left;
}

.formulario label {
    font-size: 14px;
}

input {
    width: 100%;
    padding: 15px;
    color: white;
    background: #090912;
    border: 1px solid #51406d;
    border-radius: 10px;
    font-size: 16px;
}

input:focus {
    outline: 2px solid var(--morado);
    border-color: transparent;
}

.boton {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border: 0;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 650;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.principal {
    background: linear-gradient(
        110deg,
        #782dca,
        #305ff0 65%,
        #d42b66
    );
    box-shadow: 0 0 22px #853bff28;
}

.boton:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 26px #8a42ff55;
}

.error {
    color: #ff718d;
    margin-top: 20px;
}

.sobre {
    position: relative;
    width: min(100%, 320px);
    height: 210px;
    margin: 40px auto 28px;
    background: linear-gradient(145deg, #54208b, #171b45);
    border: 1px solid #b44aff;
    border-radius: 12px;
    box-shadow: 0 0 32px #7f35ff35;
    perspective: 800px;
    transition: margin-top .7s ease;
}

.carta {
    position: absolute;
    z-index: 1;
    inset: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
    color: #241534;
    background: linear-gradient(135deg, #fff5ff, #e9e3ff);
    border-radius: 5px;
    transition: transform .8s ease, opacity .5s;
}

.carta h2 {
    font-size: 19px;
}

.carta p {
    color: #665575;
    font-size: 13px;
}

.mini-corazon {
    color: #d62d72;
    font-size: 24px;
}

.solapa {
    position: absolute;
    z-index: 2;
    inset: 0;
    background: linear-gradient(145deg, #9e48dc, #3536a1);
    clip-path: polygon(0 0, 100% 0, 50% 60%);
    transform-origin: top center;
    transition: transform .7s ease;
}

.sobre.abierto .solapa {
    transform: rotateX(180deg);
    z-index: 0;
    transition: transform .7s ease, z-index 0s .35s;
}

.sobre.abierto {
    margin-top: 140px;
}

.sobre.abierto .carta {
    transform: translateY(-95px);
}

.mensaje {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #b44aff44;
    text-align: left;
    animation: aparecer .8s ease both;
}

.mensaje h2 {
    color: #d5a4ff;
    text-align: center;
}

.mensaje .firma {
    margin: 28px 0;
    color: #ff8ba7;
    font-style: italic;
}

.mensaje .boton {
    display: flex;
    margin-top: 24px;
}

.oculto {
    display: none;
}

.subtitulo {
    margin-bottom: 26px;
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flotar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@media (max-width: 480px) {
    .contenedor {
        padding: 14px;
    }

    .panel {
        border-radius: 18px;
    }

    .sobre {
        height: 190px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
/* Galería de videojuegos */

.galeria {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
}

.galeria > h1 {
    color: #b44aff;
    text-align: center;
    text-shadow: 0 0 15px #b44aff;
}

.galeria > .subtitulo {
    text-align: center;
    color: #aaa5bd;
    margin-bottom: 35px;
}

.rejilla-juegos,
.rejilla-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.tarjeta-juego {
    display: block;
    padding: 25px;
    text-decoration: none;
    text-align: center;
    color: #f4f0ff;
    background: #11111c;
    border: 1px solid #38304e;
    border-radius: 18px;
    transition: 0.25s ease;
}

.tarjeta-juego:hover {
    transform: translateY(-6px);
    border-color: #b44aff;
    box-shadow: 0 0 22px #b44aff55;
}

.icono-juego {
    font-size: 48px;
    margin-bottom: 12px;
}

.tarjeta-juego h2 {
    color: #b44aff;
    margin: 10px 0;
}

.tarjeta-juego p {
    color: #aaa5bd;
}

.abrir-juego {
    display: inline-block;
    margin-top: 10px;
    color: #388bff;
}

.tarjeta-video {
    padding: 15px;
    background: #11111c;
    border: 1px solid #38304e;
    border-radius: 15px;
    overflow: hidden;
}

.tarjeta-video video {
    width: 100%;
    display: block;
    border-radius: 10px;
    background: #08080f;
}

.tarjeta-video h2 {
    color: #b44aff;
    font-size: 18px;
}

.tarjeta-video p {
    color: #aaa5bd;
}

.boton-volver {
    display: inline-block;
    margin: 0 0 25px;
    color: #388bff;
    text-decoration: none;
}

.boton-volver:hover {
    color: #b44aff;
}

@media (max-width: 600px) {
    .galeria {
        width: 92%;
        margin: 25px auto;
    }

    .rejilla-juegos,
    .rejilla-videos {
        grid-template-columns: 1fr;
    }
}

/* ===== Barra de búsqueda ===== */

.buscador {
    position: relative;
    width: min(100%, 520px);
    margin: 0 auto;
}

.buscador input {
    padding: 15px 18px 15px 48px;
    background: #11111c;
    border: 1px solid #51406d;
    border-radius: 999px;
    transition: border-color .2s, box-shadow .2s;
}

.buscador input:focus {
    outline: none;
    border-color: var(--morado);
    box-shadow: 0 0 22px #b44aff44;
}

.buscador input::placeholder {
    color: #7d7894;
}

.buscador-icono {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    pointer-events: none;
}

.contador-resultados {
    min-height: 1.8em;
    margin: 10px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--secundario);
}

.sin-resultados {
    margin: 40px 0;
    text-align: center;
    color: #ff8ba7;
}

.centrar {
    margin-top: 35px;
    text-align: center;
}

/* Tarjetas ocultas por el buscador */
.tarjeta-juego[hidden],
.tarjeta-video[hidden] {
    display: none;
}

/* Marcador cuando el video aún no existe */
.video-vacio {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    aspect-ratio: 16 / 9;
    padding: 10px;
    text-align: center;
    background: repeating-linear-gradient(
        45deg,
        #0c0c16,
        #0c0c16 12px,
        #101020 12px,
        #101020 24px
    );
    border: 1px dashed #51406d;
    border-radius: 10px;
}

.video-vacio span {
    font-size: 34px;
}

.video-vacio p {
    margin: 0;
    color: #d5a4ff;
    line-height: 1.4;
}

.video-vacio small {
    color: #7d7894;
    font-size: 11px;
    overflow-wrap: anywhere;
}


/* ===== Bolsillo frontal del sobre ===== */

.sobre::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: 12px;
    background: linear-gradient(145deg, #4a1d7c, #1a1d4d);
    clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
    pointer-events: none;
}


/* ===== Iconos con imagen ===== */

.icono-juego {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 72px;
}

.icono-img {
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
}

.galeria > h1 .icono-img {
    max-height: 1.1em;
    vertical-align: middle;
}
