/* =================================================
   FLIP A COIN - FULL GÖRSEL GÜNCELLEME
   ================================================= */
:root {
  --bg1: #1b1b3a;
  --bg2: #0b1026;
  --card: rgba(255, 255, 255, .10);
  --card2: rgba(255, 255, 255, .06);
  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .72);
  --shadow: 0 26px 70px rgba(0, 0, 0, .40);
  --btn1: #ff4fd8;
  --btn2: #7c5cff;
  --r: 40px;
  --scene-perspective: 2500px; 
}

.coin-flip-container {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: ui-rounded, system-ui, -apple-system, sans-serif;
    width: 95%;
    max-width: 520px;
    margin: 40px auto;
    padding: 30px 25px 25px;
    border-radius: var(--r);
    background: linear-gradient(180deg, var(--card), var(--card2));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--text);
    overflow: visible;
}

.coin-flip-container::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(53,211,255,0.18), transparent 60%),
    radial-gradient(760px 520px at 85% 18%, rgba(255,79,216,0.18), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* --- İSTATİSTİK TABLOSU --- */
.live-stats-table {
    width: 100%;
    margin-bottom: 35px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.stats-header {
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 1.2px;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.stat-box.total-wide {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(255, 79, 216, 0.08), rgba(124, 92, 255, 0.08));
    border: 1px solid rgba(124, 92, 255, 0.2);
    border-radius: 14px;
    margin-bottom: 6px;
    order: 1;
}

.stats-grid.top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    order: 2;
}

.stat-box {
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.stat-box .label {
    font-size: 9px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
}

.stat-box .value {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
}

#reset-stats-btn {
    align-self: flex-end; 
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    font-size: 8px;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    order: 3;
}

/* --- PARA SAHNESİ --- */
.coin-scene {
    width: 180px;
    height: 180px;
    perspective: var(--scene-perspective);
    margin: 0 auto 40px;
}

#coin-object {
    width: 100%; 
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 2s cubic-bezier(0.4, 0.1, 0.2, 1);
}

.coin-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

/* TURA - Atatürk Görseli */
.side-heads { 
    background-image: url('https://sekilliyaziyazma.com.tr/images/tura.png') !important; 
    z-index: 2;
}

/* YAZI - 1 TL Görseli */
.side-tails { 
    background-image: url('https://sekilliyaziyazma.com.tr/images/yazi.png') !important; 
    transform: rotateX(180deg); 
}

/* --- BUTON VE DURUM --- */
#status-text {
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 13px;
}

#flip-action-btn {
    width: 100%;
    max-width: 240px;
    background: linear-gradient(135deg, var(--btn1), var(--btn2));
    color: white;
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: 900;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(124, 92, 255, 0.3);
}

.animate-up { animation: coinBounce 2s ease-in-out; }
@keyframes coinBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-120px); }
}