/* ============================================================
   ORÁCULO DE LOS ÁNGELES v1 — STYLES
   Tema: celestial — azul profundo + blanco etéreo + oro suave
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   VARIABLES
   ──────────────────────────────────────────────────────────── */
:root {
    --bg-heaven:      #0A1628;
    --bg-surface:     #0F1D33;
    --bg-card:        #152640;
    --bg-glass:       rgba(15, 29, 51, 0.72);

    --celestial:      #7EB8DA;
    --celestial-pale: #B8D9EB;
    --gold-warm:      #D4B96A;
    --gold-soft:      #E8D9A0;
    --gold-faint:     #A08940;
    --white-glow:     #F4F0E8;

    --text-light:     #ECE8E0;
    --text-mid:       #9CAABB;
    --text-dim:       #5E7085;

    --border-angel:   rgba(212, 185, 106, 0.12);
    --shadow-light:   rgba(126, 184, 218, 0.15);
    --shadow-gold:    rgba(212, 185, 106, 0.18);

    --font-display:   'Cormorant SC', 'Palatino', serif;
    --font-body:      'EB Garamond', 'Georgia', serif;

    --ease-soft:      cubic-bezier(0.25, 1, 0.5, 1);
    --ease-rise:      cubic-bezier(0.22, 1, 0.36, 1);
}

/* ────────────────────────────────────────────────────────────
   RESET / BASE
   ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.angeles-container {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-heaven);
    color: var(--text-light);
    font-family: var(--font-body);
    position: relative;
    overflow: hidden;
    padding: 24px 16px 64px;
}

/* ────────────────────────────────────────────────────────────
   PARTÍCULAS DE LUZ
   ──────────────────────────────────────────────────────────── */
.bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-particles::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(126, 184, 218, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 80%, rgba(212, 185, 106, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 60%, rgba(126, 184, 218, 0.03) 0%, transparent 45%);
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--white-glow);
    opacity: 0;
    animation: float-up ease-in-out infinite;
}

@keyframes float-up {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    30% {
        opacity: 0.6;
    }
    70% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
        transform: translateY(-90px) scale(0.2);
    }
}

.angeles-container > *:not(.bg-particles) {
    position: relative;
    z-index: 1;
}

/* ────────────────────────────────────────────────────────────
   HERO
   ──────────────────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 28px 16px 12px;
    max-width: 700px;
    margin: 0 auto;
}

.hero-halo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    color: var(--celestial);
    animation: halo-breathe 8s var(--ease-soft) infinite;
    filter: drop-shadow(0 0 20px var(--shadow-light));
}

.hero-halo svg {
    width: 100%;
    height: 100%;
}

@keyframes halo-breathe {
    0%, 100% { transform: scale(1);    opacity: 0.85; }
    50%      { transform: scale(1.06); opacity: 1; }
}

.app-title {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.25;
    margin-bottom: 12px;
    color: var(--white-glow);
    text-shadow: 0 0 30px rgba(126, 184, 218, 0.25);
}

.app-subtitle {
    font-size: clamp(0.95rem, 2.4vw, 1.15rem);
    color: var(--text-mid);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.4px;
}

/* ────────────────────────────────────────────────────────────
   PANTALLA INICIAL — INVOCACIÓN
   ──────────────────────────────────────────────────────────── */
.invoke-section {
    max-width: 460px;
    margin: 44px auto 0;
    text-align: center;
}

.card-altar {
    margin-bottom: 28px;
}

/* Carta dorso */
.altar-card {
    width: 185px;
    height: 278px;
    margin: 0 auto 18px;
    perspective: 1000px;
    cursor: pointer;
}

.altar-card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.85s var(--ease-rise), opacity 0.85s ease;
    transform-style: preserve-3d;
}

.altar-card.ascending .altar-card-inner {
    transform: translateY(-40px) scale(0.88);
    opacity: 0.3;
}

.altar-card-back {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    background: linear-gradient(170deg, #10243E 0%, #1A3558 40%, #10243E 100%);
    border: 1.5px solid var(--gold-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.45),
        0 0 50px var(--shadow-light);
    transition: box-shadow 0.4s ease, transform 0.4s var(--ease-soft);
    overflow: hidden;
}

.altar-card:hover .altar-card-back {
    box-shadow:
        0 14px 52px rgba(0, 0, 0, 0.50),
        0 0 70px var(--shadow-light),
        0 0 24px var(--shadow-gold);
    transform: translateY(-5px);
}

.card-back-ornament {
    position: absolute;
    inset: 9px;
    border: 1px solid var(--gold-faint);
    border-radius: 9px;
    opacity: 0.35;
}

.card-back-icon {
    font-size: 3.2rem;
    color: var(--gold-warm);
    opacity: 0.45;
    animation: cross-glow 5s ease-in-out infinite;
    text-shadow: 0 0 20px var(--shadow-gold);
    z-index: 1;
}

@keyframes cross-glow {
    0%, 100% { opacity: 0.3;  transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(1.06); }
}

.card-back-rays {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(126, 184, 218, 0.06) 0%, transparent 65%);
    pointer-events: none;
}

.invoke-hint {
    font-size: 0.95rem;
    color: var(--text-dim);
    font-style: italic;
    letter-spacing: 0.3px;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Botón */
#angeles-form {
    margin-top: 10px;
}

.invoke-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 330px;
    background: linear-gradient(135deg, var(--celestial) 0%, #5A9BBF 100%);
    color: var(--bg-heaven);
    border: none;
    border-radius: 12px;
    padding: 17px 34px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: transform 0.3s var(--ease-soft), box-shadow 0.3s ease;
    box-shadow: 0 4px 24px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.invoke-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.invoke-btn:hover::after { opacity: 1; }

.invoke-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 36px var(--shadow-light);
}

.invoke-btn:active { transform: translateY(0); }

.btn-text,
.btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    font-size: 1.15em;
}

/* ────────────────────────────────────────────────────────────
   PANTALLA DE RESULTADO
   ──────────────────────────────────────────────────────────── */
.revelation-section {
    max-width: 620px;
    margin: 36px auto 0;
    text-align: center;
}

/* Carta revelada */
.angel-card-reveal {
    margin-bottom: 36px;
}

.angel-card {
    display: inline-block;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1.5px solid var(--gold-faint);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.45),
        0 0 60px var(--shadow-light),
        0 0 24px var(--shadow-gold);
}

/* Degradado que difumina el texto top/bottom de la imagen */
.angel-card::before,
.angel-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 22%;
    z-index: 1;
    pointer-events: none;
}

.angel-card::before {
    top: 0;
    background: linear-gradient(to bottom, var(--bg-heaven) 30%, transparent 100%);
}

.angel-card::after {
    bottom: 0;
    background: linear-gradient(to top, var(--bg-heaven) 40%, transparent 100%);
}

.angel-card-img {
    width: 230px;
    max-width: 62vw;
    height: auto;
    display: block;
    border-radius: 12px;
}

.angel-name {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 4.2vw, 1.85rem);
    color: var(--white-glow);
    margin-top: 22px;
    letter-spacing: 2px;
    text-shadow: 0 0 24px rgba(126, 184, 218, 0.2);
}

.angel-symbolism {
    font-size: 1rem;
    color: var(--celestial-pale);
    font-style: italic;
    font-weight: 400;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

/* Caja de mensaje */
.message-box {
    background: var(--bg-glass);
    border: 1px solid var(--border-angel);
    border-radius: 18px;
    padding: 34px 30px;
    margin: 0 auto 34px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 8px 36px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(126, 184, 218, 0.06);
    text-align: left;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.message-icon {
    font-size: 1.5rem;
}

.message-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--celestial);
    letter-spacing: 1.5px;
    font-weight: 600;
}

.message-body {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-light);
}

/* Botón nueva invocación */
.new-invoke-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: var(--celestial);
    border: 1.5px solid rgba(126, 184, 218, 0.35);
    border-radius: 12px;
    padding: 15px 36px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s var(--ease-soft);
}

.new-invoke-btn:hover {
    background: linear-gradient(135deg, var(--celestial) 0%, #5A9BBF 100%);
    color: var(--bg-heaven);
    border-color: var(--celestial);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px var(--shadow-light);
}

.new-invoke-btn:active { transform: translateY(0); }

/* ────────────────────────────────────────────────────────────
   UTILITY
   ──────────────────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .angeles-container {
        padding: 16px 12px 48px;
    }

    .hero {
        padding: 20px 12px 10px;
    }

    .hero-halo {
        width: 90px;
        height: 90px;
        margin-bottom: 16px;
    }

    .altar-card {
        width: 155px;
        height: 232px;
    }

    .card-back-icon {
        font-size: 2.6rem;
    }

    .invoke-btn {
        font-size: 1rem;
        padding: 15px 28px;
    }

    .angel-card-img {
        width: 190px;
    }

    .message-box {
        padding: 26px 20px;
    }

    .message-body {
        font-size: 1.02rem;
        line-height: 1.75;
    }

    .new-invoke-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 380px) {
    .hero-halo {
        width: 72px;
        height: 72px;
    }

    .altar-card {
        width: 135px;
        height: 202px;
    }

    .angel-card-img {
        width: 160px;
    }
}
