/* =============================================
   TAROT DEL AMOR — styles.css
   Diseño propio: romántico, oscuro, elegante
   ============================================= */

:root {
    --black:        #0c0a0e;
    --deep:         #130f18;
    --surface:      #1a1520;
    --surface-2:    #221b2a;
    --border:       rgba(255,255,255,.07);
    --border-rose:  rgba(210,100,140,.35);

    --rose:         #c0547a;
    --rose-light:   #e07a9e;
    --rose-pale:    #f2b8ce;
    --burgundy:     #7a2040;
    --gold:         #c9993a;
    --gold-light:   #e8c06a;
    --text:         #ede8f0;
    --text-muted:   #8a7890;
    --text-dim:     #4a3858;

    --radius:       14px;
    --radius-sm:    8px;
    --transition:   .25s ease;

    --card-w:       84px;
    --card-h:       126px;
    --cross-card-w: 100px;
    --cross-card-h: 150px;
    --cross-card-center-w: 116px;
    --cross-card-center-h: 174px;
}

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

body {
    background: var(--black);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
}

/* ── Steps ── */
.app { position: relative; min-height: 100vh; }

.step {
    display: none;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 40px 20px 80px;
    animation: fadeUp .4s ease both;
}
.step.active { display: block; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.container { max-width: 1080px; margin: 0 auto; }

/* ── Hero ── */
.hero { text-align: center; margin-bottom: 36px; }
.hero-sm { margin-bottom: 28px; }

.hero-symbol {
    font-size: 2.8rem;
    color: var(--rose);
    display: block;
    margin-bottom: 12px;
    animation: pulse-heart 2.5s ease-in-out infinite;
}
@keyframes pulse-heart {
    0%, 100% { transform: scale(1);    opacity: .85; }
    50%       { transform: scale(1.15); opacity: 1;   }
}

.hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    letter-spacing: .03em;
    background: linear-gradient(135deg, var(--rose-pale) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.hero-sub {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
    max-width: 480px;
    margin: 0 auto;
}

/* ── Pick status ── */
.pick-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.pick-dots {
    display: flex;
    gap: 12px;
}

.pdot {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 1.5px solid var(--rose);
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.pdot.filled {
    background: var(--rose);
    box-shadow: 0 0 10px rgba(192,84,122,.65);
    transform: scale(1.15);
}

.pick-hint {
    font-size: .85rem;
    color: var(--text-muted);
    font-style: italic;
    min-height: 1.2em;
}

/* ── Mazo ── */
.deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr));
    gap: 12px;
    justify-items: center;
}
@media (min-width: 560px)  { .deck-grid { grid-template-columns: repeat(7, 1fr); } }
@media (min-width: 900px)  { .deck-grid { grid-template-columns: repeat(9, 1fr); } }

.tarot-card {
    width: var(--card-w);
    height: var(--card-h);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.tarot-card:hover:not(.selected) {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 10px 28px rgba(0,0,0,.5);
}
.tarot-card.selected {
    transform: scale(1.06);
    box-shadow: 0 0 0 2px var(--rose-light), 0 0 20px rgba(192,84,122,.45);
}

.card-inner {
    width: 100%; height: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
}
.card-inner::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(192,84,122,.2);
    border-radius: 4px;
}
.card-inner::after {
    content: '♥';
    font-size: 1.4rem;
    color: var(--rose);
    opacity: .25;
}

/* ── Cruz del amor ── */
.cross-wrap { max-width: 900px; margin: 0 auto; }
.cross-wrap.hidden { display: none; }

.cross-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 28px;
}

/* Fila central: izq + centro + der */
.cross-row-mid {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

/* Carta de la cruz */
.cross-card {
    width: var(--cross-card-w);
    height: var(--cross-card-h);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}
.cross-card:hover {
    transform: scale(1.04);
}
.cross-card.active-card {
    box-shadow: 0 0 0 2px var(--rose-light), 0 0 22px rgba(192,84,122,.5);
    transform: scale(1.05);
}

/* Carta central más grande */
.center-card {
    width: var(--cross-card-center-w);
    height: var(--cross-card-center-h);
}

.cross-label {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rose);
    text-align: center;
    max-width: 90px;
    line-height: 1.3;
}
.center-label {
    color: var(--gold);
}

/* ── Flip de la cruz ── */
.cflip {
    width: 100%; height: 100%;
    perspective: 900px;
}
.cflip-inner {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .65s cubic-bezier(.4,0,.2,1);
}
.cflip.flipped .cflip-inner { transform: rotateY(180deg); }

.cflip-back, .cflip-front {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-sm);
    backface-visibility: hidden;
}
.cflip-back {
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}
.cflip-back::after { content: '♥'; font-size: 1.8rem; color: var(--rose); opacity: .25; }

.cflip-front {
    transform: rotateY(180deg);
    overflow: hidden;
    border: 1px solid var(--border-rose);
    box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
.cflip-front img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.ccard-name {
    display: none;
}

/* ── Panel de interpretación ── */
.interp-panel {
    background: var(--surface);
    border: 1px solid var(--border-rose);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 24px;
    display: none;
    animation: fadeUp .35s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.interp-panel.visible { display: block; }

.interp-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.interp-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--rose-pale);
}
.interp-pos-name {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rose);
}

.interp-text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
}

/* ── Botones ── */
.result-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.btn-reset {
    background: transparent;
    color: var(--rose-light);
    border: 1px solid var(--rose);
    border-radius: var(--radius-sm);
    padding: 12px 32px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.btn-reset:hover { background: var(--rose); color: #fff; }

.btn-modal-close {
    background: var(--rose);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition);
    margin-top: 8px;
}
.btn-modal-close:hover { opacity: .85; }

/* ── Loading ── */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-style: italic;
}
.loading-heart {
    font-size: 2.5rem;
    color: var(--rose);
    animation: pulse-heart 1.2s ease-in-out infinite;
    margin-bottom: 16px;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-box {
    background: var(--surface-2);
    border: 1px solid var(--border-rose);
    border-radius: var(--radius);
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    animation: fadeUp .3s ease;
}
.modal-icon { font-size: 2.2rem; color: var(--rose); margin-bottom: 16px; }
.modal-msg  { color: var(--text); line-height: 1.6; margin-bottom: 20px; }

/* ── Responsive ── */
@media (max-width: 600px) {
    :root {
        --card-w: 72px;
        --card-h: 108px;
        --cross-card-w: 76px;
        --cross-card-h: 114px;
        --cross-card-center-w: 90px;
        --cross-card-center-h: 135px;
    }
    .deck-grid    { grid-template-columns: repeat(4, 1fr); gap: 9px; }
    .cross-row-mid { gap: 8px; }
    .cross-label  { font-size: .65rem; max-width: 72px; }
    .interp-panel { padding: 18px 16px; }
}

@media (max-width: 380px) {
    :root {
        --cross-card-w: 64px;
        --cross-card-h: 96px;
        --cross-card-center-w: 76px;
        --cross-card-center-h: 114px;
    }
}

/* ── Accesibilidad ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
