/* =========================================================
   GACHAPÓN DE GABRIEL
   ========================================================= */

#menu-misiones #ir-gachapon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 650px;
    margin: 0 auto 16px;
    padding: 15px 20px;
    color: #fff8e6;
    background: linear-gradient(135deg, #c58b3c, #e8b65a 50%, #b0762f);
    border: 1px solid #ffe3a3;
    border-radius: 999px;
    font-family: var(--f-ui, Arial, sans-serif);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    box-shadow: 0 0 22px rgba(255, 204, 50, 0.3);
    animation: gc-brillo 2.6s ease-in-out infinite;
}

#menu-misiones #ir-gachapon:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 0 30px rgba(255, 204, 50, 0.55);
}

/* ---------- Capa ---------- */

.gc-capa {
    position: fixed;
    inset: 0;
    z-index: 4500;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    color: #ece5d8;
    font-family: var(--f-ui, Arial, sans-serif);
    background:
            radial-gradient(ellipse at 70% 40%, rgba(255, 200, 110, 0.22), transparent 55%),
            radial-gradient(ellipse at 20% 80%, rgba(160, 120, 220, 0.25), transparent 60%),
            linear-gradient(160deg, #1d2a52, #0d1330 60%, #080b1c);
    animation: g-entrar 0.35s ease;
}

.gc-cabecera {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
}

.gc-titulo-app {
    color: #e8c77d;
    font-family: var(--f-titulo, Georgia, serif);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
}

.gc-destinos {
    margin-left: auto;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(232, 199, 125, 0.35);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.gc-cerrar {
    width: 36px;
    height: 36px;
    color: #3b4255;
    background: #ece5d8;
    border: none;
    border-radius: 50%;
    font-weight: 800;
    cursor: pointer;
}

/* ---------- Banner ---------- */

.gc-banner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 20px;
    width: min(94vw, 980px);
    margin: auto;
    padding: clamp(20px, 4vw, 44px);
    overflow: hidden;
    background:
            linear-gradient(100deg, rgba(236, 229, 216, 0.97) 0 46%, rgba(236, 229, 216, 0.2) 70%, transparent),
            linear-gradient(135deg, #e7b35f, #b5743a);
    border: 2px solid #ece5d8;
    border-radius: 6px 34px 6px 6px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}

.gc-banner-info {
    position: relative;
    z-index: 2;
    color: #3b4255;
}

.gc-banner-etiqueta {
    display: inline-block;
    padding: 4px 10px;
    color: #fff;
    background: #c58b3c;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.gc-banner-nombre {
    margin: 14px 0 6px;
    color: #3b3226;
    font-family: var(--f-titulo, Georgia, serif);
    font-size: clamp(24px, 4.2vw, 42px);
    line-height: 1.15;
}

.gc-banner-estrellas {
    margin: 0 0 12px;
    color: #e0a52c;
    font-size: 20px;
    letter-spacing: 2px;
}

.gc-banner-desc {
    max-width: 330px;
    margin: 0;
    color: #5b5446;
    font-size: 14px;
    line-height: 1.6;
}

.gc-banner-retrato {
    position: relative;
    justify-self: center;
    width: min(100%, 340px);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 50% 50% 12px 12px;
    background: radial-gradient(circle at 50% 35%, #fff2c8, #e3a44c 60%, #9d5f2c);
    box-shadow: 0 0 40px rgba(255, 210, 120, 0.55);
}

.gc-banner-retrato img,
.gc-retrato-grande img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gc-banner-retrato svg,
.gc-retrato-grande svg {
    width: 70%;
    height: 100%;
    display: block;
    margin: 0 auto;
}

.gc-botones {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 20px 20px 30px;
}

.gc-tirar {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 170px;
    padding: 10px 24px 12px;
    color: #3b4255;
    background: #ece5d8;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.gc-tirar small {
    color: #8a7b62;
    font-size: 11px;
    font-weight: 700;
}

.gc-tirar:hover {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 0 22px rgba(255, 230, 160, 0.45);
}

.gc-tirar-10 {
    color: #fff;
    background: linear-gradient(135deg, #c58b3c, #e8b65a);
}

.gc-tirar-10 small {
    color: #fff3d6;
}

.gc-tirar-10:hover {
    background: linear-gradient(135deg, #d59a49, #f3c76b);
}

.gc-aviso {
    position: absolute;
    top: 70px;
    left: 50%;
    z-index: 10;
    max-width: 90vw;
    padding: 10px 18px;
    transform: translateX(-50%);
    color: #3b4255;
    background: #ece5d8;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    animation: g-banner-suave 2.6s ease forwards;
}

/* ---------- Resultados ---------- */

.gc-resultado {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 20px;
    background: radial-gradient(ellipse at center, rgba(20, 28, 60, 0.96), rgba(6, 9, 22, 0.98));
    animation: g-entrar 0.3s ease;
}

.gc-pista {
    max-width: 320px;
    margin: 0;
    text-align: center;
    line-height: 1.6;
}

.gc-ok {
    padding: 10px 30px;
    color: #3b4255;
    background: #ece5d8;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}

.gc-fila {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
    width: min(96vw, 1100px);
}

.gc-carta {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-height: 260px;
    padding: 14px 6px;
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px 4px 40px 4px;
    font-family: inherit;
    text-align: center;
    opacity: 0;
    transform: translateY(30px) scaleY(0.4);
    animation: gc-carta 0.45s cubic-bezier(.2, .8, .2, 1) forwards;
}

.gc-simple .gc-carta {
    width: 170px;
    min-height: 240px;
}

.gc-r3 { background: linear-gradient(180deg, #3b5a8a, #4f7fb8 70%, #9fc3ea); }
.gc-r4 { background: linear-gradient(180deg, #4e3a78, #8a64b8 70%, #d1b3ff); box-shadow: 0 0 18px rgba(180, 130, 255, 0.4); }
.gc-r5 {
    background: linear-gradient(180deg, #8a5426, #d99a45 65%, #ffe2a0);
    box-shadow: 0 0 26px rgba(255, 204, 50, 0.7);
    cursor: pointer;
}

.gc-r5::before {
    content: "";
    position: absolute;
    inset: -50%;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%);
    animation: gc-reflejo 2.2s ease-in-out infinite;
}

.gc-carta-icono {
    position: relative;
    margin-bottom: auto;
    margin-top: 30px;
    font-size: 34px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.gc-carta-nombre {
    position: relative;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.gc-carta-estrellas {
    position: relative;
    color: #ffcc32;
    font-size: 11px;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.gc-carta-toca {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    animation: g-latir 1.4s ease-in-out infinite;
}

/* ---------- Meteoro dentro del gacha ---------- */

.gc-meteoro-capa {
    position: absolute;
    inset: 0;
    z-index: 7;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 30%, #2b3d73 0%, #121a36 55%, #070b18 100%);
    pointer-events: none;
}

/* ---------- Revelación ---------- */

.gc-revelar {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 40%, #3a2a55, #120d24 60%, #07050f);
    animation: g-entrar 0.5s ease;
}

.gc-revelar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 42%, rgba(255, 210, 120, 0.4), transparent 45%);
    pointer-events: none;
}

.gc-retrato-grande {
    position: relative;
    width: min(62vw, 320px);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 50% 50% 14px 14px;
    background: radial-gradient(circle at 50% 35%, #fff2c8, #e3a44c 60%, #9d5f2c);
    box-shadow: 0 0 60px rgba(255, 204, 80, 0.6);
    opacity: 0;
    animation: g-pop 0.8s ease 0.2s forwards;
}

.gc-revelar-textos {
    position: relative;
    margin-top: 18px;
    text-align: center;
}

.gc-revelar-nombre {
    margin: 0;
    color: #fff;
    font-family: var(--f-titulo, Georgia, serif);
    font-size: clamp(36px, 9vw, 70px);
    font-weight: 700;
    letter-spacing: 6px;
    text-shadow: 0 0 30px rgba(255, 204, 80, 0.7);
    opacity: 0;
    animation: g-deslizar 0.7s ease 0.7s forwards;
}

.gc-revelar-sub {
    margin: 4px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    animation: g-deslizar 0.7s ease 0.9s forwards;
}

.gc-revelar-estrellas {
    margin: 6px 0 0;
    color: #ffcc32;
    font-size: 26px;
    letter-spacing: 4px;
    text-shadow: 0 0 14px rgba(255, 204, 50, 0.9);
    opacity: 0;
    animation: g-deslizar 0.7s ease 1.1s forwards;
}

/* Cuando aparece el diálogo, el retrato sube y se hace más pequeño */
.gc-revelar.gc-con-dialogo {
    justify-content: flex-start;
    padding-top: 5vh;
}

.gc-revelar .gc-retrato-grande {
    transition: width 0.6s ease;
}

.gc-revelar.gc-con-dialogo .gc-retrato-grande {
    width: min(34vh, 260px);
}

/* ---------- Diálogo estilo Genshin ---------- */

.gc-dialogo {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 60px 8vw 40px;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.7) 60%, transparent);
    animation: g-entrar 0.4s ease;
}

.gc-dialogo-nombre {
    display: block;
    margin-bottom: 10px;
    color: #e8c77d;
    font-size: 15px;
    font-weight: 800;
}

.gc-dialogo-texto {
    min-height: 1.6em;
    margin: 0;
    color: #fff;
    font-size: clamp(17px, 3.4vw, 22px);
    line-height: 1.6;
}

.gc-opciones {
    position: absolute;
    right: 6vw;
    bottom: 170px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.gc-opciones.gc-visible {
    opacity: 1;
    pointer-events: auto;
}

.gc-opcion {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    padding: 12px 22px 12px 14px;
    color: #fff;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.45));
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transform-origin: right center;
    transition: transform 0.3s, background 0.2s, box-shadow 0.2s;
}

.gc-opcion::before {
    content: "💬";
    font-size: 16px;
}

.gc-opcion:hover {
    background: linear-gradient(90deg, rgba(60, 50, 30, 0.85), rgba(0, 0, 0, 0.5));
    box-shadow: 0 0 0 2px rgba(232, 199, 125, 0.6);
}

.gc-opcion-si::before {
    content: "💛";
}

/* ---------- Final ---------- */

.gc-final {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    padding: 50px 8vw 40px;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.7) 65%, transparent);
    animation: g-entrar 0.6s ease;
}

.gc-final-logro {
    color: #ffcc32;
    font-family: var(--f-titulo, Georgia, serif);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
}

.gc-final-titulo {
    margin: 8px 0 0;
    color: #fff;
    font-family: var(--f-titulo, Georgia, serif);
    font-size: clamp(30px, 7vw, 50px);
    font-weight: 700;
    text-shadow: 0 0 24px rgba(255, 210, 120, 0.6);
}

.gc-final-texto {
    max-width: 560px;
    margin: 16px auto 0;
    color: #ece5d8;
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-line;
}

.gc-confeti {
    position: absolute;
    top: -20px;
    z-index: 6;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    pointer-events: none;
    animation: gc-caer-confeti linear forwards;
}

/* ---------- Animaciones ---------- */

@keyframes gc-brillo {
    0%, 100% { box-shadow: 0 0 16px rgba(255, 204, 50, 0.25); }
    50% { box-shadow: 0 0 30px rgba(255, 204, 50, 0.55); }
}

@keyframes gc-carta {
    to { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes gc-reflejo {
    0% { transform: translateX(-60%); }
    100% { transform: translateX(60%); }
}

@keyframes gc-caer-confeti {
    to { transform: translateY(110vh) rotate(var(--giro)); }
}

@keyframes g-banner-suave {
    0% { opacity: 0; }
    12% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

/* ---------- Móvil ---------- */

@media (max-width: 700px) {
    .gc-banner {
        grid-template-columns: 1fr;
        background:
                linear-gradient(180deg, rgba(236, 229, 216, 0.97) 0 52%, rgba(236, 229, 216, 0.25) 75%, transparent),
                linear-gradient(135deg, #e7b35f, #b5743a);
    }

    .gc-banner-retrato {
        width: min(60vw, 220px);
    }

    .gc-titulo-app {
        display: none;
    }

    .gc-tirar {
        min-width: 0;
        flex: 1;
    }

    .gc-fila {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .gc-carta {
        min-height: 150px;
        padding: 8px 3px;
        border-radius: 4px 4px 22px 4px;
    }

    .gc-carta-icono {
        margin-top: 18px;
        font-size: 24px;
    }

    .gc-carta-nombre {
        font-size: 9.5px;
    }

    .gc-carta-estrellas {
        font-size: 8px;
    }

    .gc-revelar.gc-con-dialogo .gc-retrato-grande {
        width: min(26vh, 190px);
    }

    .gc-opciones {
        left: 6vw;
        right: 6vw;
        bottom: 150px;
        align-items: stretch;
    }

    .gc-opcion {
        transform-origin: center;
    }
}
