/* =============================================
   TAROT TRABAJO Y DINERO — styles.css
   Diseño: verde oscuro, dorado, negro profundo
   Transmite: prosperidad, solidez, ambición
   ============================================= */

:root {
    --black:       #080c0a;
    --deep:        #0d1410;
    --surface:     #111a14;
    --surface-2:   #182118;
    --border:      rgba(255,255,255,.06);
    --border-gold: rgba(180,140,50,.3);

    --green:       #2a6644;
    --green-light: #3d8f5f;
    --green-pale:  #7abf96;
    --gold:        #c9993a;
    --gold-light:  #e8c06a;
    --gold-pale:   #f5dfa0;
    --teal:        #1a7060;

    --text:        #e8ede9;
    --text-muted:  #7a917e;
    --text-dim:    #3a4f3d;

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

    --card-w:  84px;
    --card-h:  126px;
    --trio-w:  130px;
    --trio-h:  195px;
}

*, *::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 ── */
.step {
    display: none;
    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: 960px; margin: 0 auto; }

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

.hero-symbol {
    font-size: 2.4rem;
    color: var(--gold);
    display: block;
    margin-bottom: 12px;
    animation: glow-pulse 3s ease-in-out infinite;
}
@keyframes glow-pulse {
    0%, 100% { opacity: .75; text-shadow: 0 0 12px rgba(201,153,58,.3); }
    50%       { opacity: 1;   text-shadow: 0 0 28px rgba(201,153,58,.7); }
}

.hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.9rem, 5vw, 2.9rem);
    font-weight: 600;
    letter-spacing: .03em;
    background: linear-gradient(135deg, var(--gold-pale) 0%, var(--green-pale) 60%, 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: 500px;
    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: 16px; }

.pdot {
    width: 14px; height: 14px;
    border-radius: 3px;
    border: 1.5px solid var(--gold);
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    transform: rotate(45deg);
}
.pdot.filled {
    background: var(--gold);
    box-shadow: 0 0 12px rgba(201,153,58,.6);
    transform: rotate(45deg) scale(1.2);
}

.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(--gold), 0 0 20px rgba(201,153,58,.4);
}

.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(201,153,58,.15);
    border-radius: 4px;
}
.card-inner::after {
    content: '◈';
    font-size: 1.3rem;
    color: var(--gold);
    opacity: .2;
}

/* ── Tirada de 3 cartas ── */
.trio-wrap { max-width: 860px; margin: 0 auto; }
.trio-wrap.hidden { display: none; }

.trio-layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.trio-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--transition);
}
.trio-cell:hover  { background: rgba(201,153,58,.04); }
.trio-cell.active-card {
    background: rgba(201,153,58,.08);
    box-shadow: 0 0 0 1px rgba(201,153,58,.25);
}

.trio-divider {
    width: 1px;
    height: 160px;
    background: linear-gradient(to bottom, transparent, var(--border-gold), transparent);
    align-self: center;
    flex-shrink: 0;
}

.trio-card {
    width: var(--trio-w);
    height: var(--trio-h);
    border-radius: var(--radius-sm);
    transition: transform var(--transition);
}
.trio-cell:hover .trio-card { transform: translateY(-4px); }
.trio-cell.active-card .trio-card { transform: translateY(-6px); }

.trio-label {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    max-width: 110px;
    line-height: 1.35;
}

/* ── Flip ── */
.cflip { width: 100%; height: 100%; perspective: 900px; }
.cflip-inner {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .7s 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: 2rem; color: var(--gold); opacity: .2; }

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

/* ── Panel interpretación ── */
.interp-panel {
    background: var(--surface);
    border: 1px solid var(--border-gold);
    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: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.interp-pos-badge {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--gold);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.interp-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold-pale);
}

.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(--gold-light);
    border: 1px solid var(--gold);
    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);
    letter-spacing: .04em;
}
.btn-reset:hover { background: var(--gold); color: var(--black); }

.btn-modal-close {
    background: var(--gold);
    color: var(--black);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    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-symbol {
    font-size: 2.5rem;
    color: var(--gold);
    animation: glow-pulse 1.4s ease-in-out infinite;
    margin-bottom: 16px;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    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-gold);
    border-radius: var(--radius);
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    animation: fadeUp .3s ease;
}
.modal-icon { font-size: 2rem; color: var(--gold); margin-bottom: 16px; }
.modal-msg  { color: var(--text); line-height: 1.6; margin-bottom: 20px; }

/* ── Responsive ── */
@media (max-width: 680px) {
    :root { --trio-w: 100px; --trio-h: 150px; }
    .trio-layout   { gap: 0; }
    .trio-cell     { padding: 8px 10px; }
    .trio-divider  { height: 120px; }
    .trio-label    { font-size: .65rem; max-width: 90px; }
    .deck-grid     { grid-template-columns: repeat(4, 1fr); gap: 9px; }
    .interp-panel  { padding: 18px 16px; }
}

@media (max-width: 420px) {
    :root { --trio-w: 82px; --trio-h: 123px; }
    .trio-layout { flex-direction: column; align-items: center; gap: 20px; }
    .trio-divider { display: none; }
}

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