/* ═══════════════════════════════════════════
   coinFlip.css — Pile ou Face
   ═══════════════════════════════════════════ */

#app { max-width: 480px; margin: 0 auto; padding: 0 0 40px; }
header {
    padding: 20px 20px 14px;
    display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 100;
}
.header-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; color: var(--text); }
.header-title span { color: var(--accent); }
.header-sub { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* ── Coin area ── */
.coin-page { text-align: center; padding: 32px 20px; }
.coin-page-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem; font-weight: 900;
    color: var(--text); margin-bottom: 6px;
}
.coin-page-sub {
    font-size: 0.82rem; color: var(--muted); margin-bottom: 28px;
}

.coin-stage {
    perspective: 600px;
    width: 160px; height: 160px;
    margin: 0 auto 24px;
}
.coin {
    width: 160px; height: 160px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 0.1s;
}
.coin-face {
    position: absolute; inset: 0;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    box-shadow: 0 6px 28px rgba(0,0,0,0.35), inset 0 2px 6px rgba(255,255,255,0.2);
}
.coin-heads {
    background: linear-gradient(145deg, #f5c542, #d4a017, #f5c542, #b8860b);
    color: #5a3e00;
}
.coin-tails {
    background: linear-gradient(145deg, #d0d0d0, #999, #d0d0d0, #777);
    color: #333;
    transform: rotateX(180deg);
}
.coin-inner-ring {
    position: absolute; inset: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25);
    pointer-events: none;
}
.coin-label {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem; font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.coin-detail { font-size: 1rem; margin-top: 4px; opacity: 0.5; }

.coin-result {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem; font-weight: 900;
    color: var(--accent);
    min-height: 44px;
    opacity: 0; transform: scale(0.8);
    transition: all 0.3s;
    margin-bottom: 16px;
}
.coin-result.show { opacity: 1; transform: scale(1); }

.coin-launch-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 14px 40px;
    border-radius: 16px; border: 1.5px solid var(--accent);
    background: rgba(245,197,66,0.1);
    color: var(--accent);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: all 0.15s;
}
.coin-launch-btn:active { transform: scale(0.95); background: rgba(245,197,66,0.2); }

/* ── History ── */
.coin-history {
    padding: 0 20px; margin-top: 28px;
}
.coin-history-title {
    font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--muted); margin-bottom: 10px;
}
.coin-history-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.coin-history-item {
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.78rem; font-weight: 600;
    border: 1px solid var(--border);
}
.coin-history-item.heads {
    color: var(--accent);
    background: rgba(245,197,66,0.08);
    border-color: rgba(245,197,66,0.25);
}
.coin-history-item.tails {
    color: var(--muted);
    background: var(--glass-subtle);
}
.coin-stats {
    display: flex; justify-content: center; gap: 20px;
    margin-top: 14px; font-size: 0.78rem; color: var(--muted);
}
.coin-stats strong { color: var(--text); font-weight: 700; }