/* ================================
   PALETA — clara y con color
================================ */

:root {
    --violeta:  #7C3AED;
    --magenta:  #EC4899;
    --verde:    #16A34A;

    --tinta:    #241A3D;
    --apagado:  #6B6485;
    --tenue:    #9A93B0;

    --blanco:   #FFFFFF;
    --campo:    #F7F3FF;
    --borde:    #E6DDFB;

    --titulo: "Fredoka", "Segoe UI", Arial, sans-serif;
    --texto:  "Nunito", "Segoe UI", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    padding: 22px 16px;

    font-family: var(--texto);
    font-size: 16px;
    line-height: 1.55;
    color: var(--tinta);

    background:
        radial-gradient(circle at 12% 8%, rgba(124, 58, 237, 0.22), transparent 42%),
        radial-gradient(circle at 88% 92%, rgba(236, 72, 153, 0.22), transparent 45%),
        linear-gradient(160deg, #F6F0FF 0%, #FFF7FC 100%);
    background-attachment: fixed;
}

:focus-visible {
    outline: 3px solid var(--violeta);
    outline-offset: 3px;
}


/* ================================
   TARJETA
================================ */

.tarjeta {
    width: 100%;
    max-width: 440px;
    margin: auto;

    display: flex;
    flex-direction: column;
    gap: 18px;

    padding: 26px 22px 20px;

    background: var(--blanco);
    border-radius: 26px;
    box-shadow: 0 24px 60px rgba(70, 30, 130, 0.18);
}

.cabecera {
    text-align: center;
}

.cabecera h1 {
    font-family: var(--titulo);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;

    background: linear-gradient(90deg, var(--violeta), var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cabecera p {
    margin-top: 6px;
    color: var(--apagado);
    font-size: 15px;
}


/* ================================
   PASOS
================================ */

.paso {
    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 18px 16px;

    background: var(--campo);
    border: 2px solid var(--borde);
    border-radius: 18px;
}

.paso-cabeza {
    display: flex;
    align-items: center;
    gap: 10px;
}

.numero {
    flex-shrink: 0;

    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;

    background: linear-gradient(135deg, var(--violeta), var(--magenta));
    border-radius: 50%;

    color: var(--blanco);
    font-family: var(--titulo);
    font-size: 18px;
    font-weight: 700;
}

.paso h2 {
    flex: 1;

    font-family: var(--titulo);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
}

.tilde {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;

    background: var(--verde);
    border-radius: 50%;

    color: var(--blanco);
    font-size: 16px;
    font-weight: 700;
}

.tilde[hidden] {
    display: none;
}

.paso-texto {
    color: var(--apagado);
    font-size: 15px;
}

.paso-texto strong {
    color: var(--tinta);
    font-weight: 700;
}


/* ================================
   PASO 1 — ENLACE
================================ */

.enlace {
    width: 100%;
    padding: 13px 14px;

    background: var(--blanco);
    border: 2px solid var(--borde);
    border-radius: 12px;

    color: var(--tinta);
    font-family: var(--texto);
    font-size: 14px;
    font-weight: 600;
}

.boton {
    width: 100%;
    padding: 15px 18px;

    background: linear-gradient(135deg, var(--violeta), var(--magenta));
    border: none;
    border-radius: 14px;

    color: var(--blanco);
    font-family: var(--titulo);
    font-size: 18px;
    font-weight: 600;

    cursor: pointer;
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.boton:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(124, 58, 237, 0.45);
}

.boton:active {
    transform: translateY(0);
}

.aviso {
    min-height: 20px;

    color: var(--verde);
    font-size: 14px;
    font-weight: 700;
    text-align: center;

    opacity: 0;
    transform: translateY(-4px);
    transition: 0.25s;
}

.aviso.mostrar {
    opacity: 1;
    transform: translateY(0);
}


/* ================================
   PASO 2 — TUTORIAL
================================ */

.media-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 120px;
    padding: 12px;
    overflow: hidden;

    background: var(--blanco);
    border: 2px solid var(--borde);
    border-radius: 14px;

    cursor: pointer;
    transition: border-color 0.2s;
}

.media-box:hover {
    border-color: var(--violeta);
}

.media {
    display: none;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.media.visible {
    display: block;
}

.media-lupa {
    position: absolute;
    right: 10px;
    bottom: 10px;

    padding: 5px 12px;

    background: var(--violeta);
    border-radius: 999px;

    color: var(--blanco);
    font-family: var(--texto);
    font-size: 11px;
    font-weight: 700;
}

.media-vacia[hidden] {
    display: none;
}

.media-vacia {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    min-height: 96px;

    color: var(--apagado);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.media-vacia small {
    color: var(--tenue);
    font-size: 12px;
    font-weight: 400;
}


/* ================================
   PASO 3 — EJEMPLO DEL CONTADOR
   No funciona: es una muestra de lo
   que aparece en la otra pestaña.
================================ */

.ejemplo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.contador-caja {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 14px 28px;

    background: radial-gradient(circle at 30% 20%, #2A1140 0%, #0B0714 75%);
    border-radius: 14px;

    box-shadow:
        0 0 0 1px rgba(232, 121, 249, 0.45),
        0 0 18px rgba(217, 70, 239, 0.45),
        0 0 42px rgba(56, 189, 248, 0.25);
}

.contador-numero {
    font-family: "Orbitron", "Courier New", monospace;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 4px;

    background: linear-gradient(90deg, #F472B6, #C084FC, #60A5FA);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    text-shadow:
        0 0 8px rgba(244, 114, 182, 0.85),
        0 0 18px rgba(192, 132, 252, 0.55);
}

.ejemplo figcaption {
    max-width: 30ch;

    color: var(--tenue);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}


/* ================================
   PIE
================================ */

.footer {
    text-align: center;
}

.footer p {
    color: var(--tenue);
    font-size: 12px;
}


/* ================================
   VISOR DEL TUTORIAL
================================ */

.visor {
    position: fixed;
    inset: 0;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;

    background: rgba(36, 26, 61, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.visor[hidden] {
    display: none;
}

.visor-caja {
    width: 100%;
    max-width: 1000px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.visor-scroll {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.visor-media {
    display: block;
    width: 100%;
    height: auto;
}

/* En pantalla chica el gif se agranda y se desliza */
.visor-pista {
    display: none;
    color: var(--blanco);
    font-size: 13px;
    font-weight: 700;
}

.visor-cerrar {
    padding: 13px 28px;

    background: var(--blanco);
    border: none;
    border-radius: 999px;

    color: var(--tinta);
    font-family: var(--titulo);
    font-size: 16px;
    font-weight: 600;

    cursor: pointer;
}

@media (max-width: 820px) {
    .visor-media {
        width: 760px;
        max-width: none;
    }

    .visor-pista {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
