/* ===== Risk Bankası - Kasa / Banka Estetiği ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --gold: #ffd23f;
    --gold-deep: #f4a800;
    --vault: #3a4252;
    --vault-dark: #232838;
    --green-ok: #19c37d;
    --green-deep: #0f9d63;
    --red: #ff4757;
    --red-deep: #d63447;
    --amber: #ffa726;
    --ink: #1a1e2c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at 50% 0%, #2a3142 0%, transparent 50%),
        linear-gradient(160deg, #1a1e2c 0%, #12151f 100%);
    min-height: 100vh; color: #fff; padding: 0 14px 40px; overflow-x: hidden;
}

/* Header */
.game-header {
    position: fixed; top: 0; left: 0; right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 20px; display: flex; justify-content: center; align-items: center;
    z-index: 10000; box-shadow: 0 2px 18px rgba(0,0,0,0.5);
    border-bottom: 2px solid var(--gold);
}
.header-logo {
    font-size: 1.6rem; color: var(--gold); letter-spacing: 2px;
    text-decoration: none; font-weight: 900;
    text-shadow: 0 0 12px var(--gold-deep), 0 0 24px rgba(255,210,63,0.4);
    transition: transform .3s;
}
.header-logo:hover { transform: scale(1.04); }

/* Disclaimer */
.disclaimer-bar {
    max-width: 620px; margin: 0 auto 18px; padding: 12px 18px;
    background: rgba(255, 210, 63, 0.1); border: 1px solid rgba(255, 210, 63, 0.35);
    border-radius: 12px; text-align: center; font-size: 0.86rem; line-height: 1.5; color: #ffe9a8;
}
.disclaimer-bar strong { color: var(--gold); }

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

/* Top panel */
.top-panel { display: flex; gap: 12px; margin-bottom: 22px; justify-content: center; flex-wrap: wrap; }
.stat-box {
    background: rgba(0,0,0,0.35); backdrop-filter: blur(8px);
    padding: 12px 24px; border-radius: 14px; text-align: center;
    border: 2px solid rgba(255,255,255,0.12); min-width: 100px;
}
.stat-box.bank { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,210,63,0.2); }
.stat-box.round { border-color: var(--green-ok); }
.stat-box.best { border-color: var(--amber); }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.85); margin-bottom: 4px; }
.stat-value { font-size: 1.8rem; font-weight: 900; }
.bank .stat-value { color: var(--gold); }
.round .stat-value { color: var(--green-ok); }
.best .stat-value { color: var(--amber); }
.stat-value.pop { animation: pop .4s ease; }
@keyframes pop { 0%{transform:scale(1)} 50%{transform:scale(1.3)} 100%{transform:scale(1)} }
.stat-value.flash-red { animation: flashRed .5s ease; }
@keyframes flashRed { 0%,100%{color:inherit} 50%{color:var(--red);transform:scale(1.2)} }

/* Kasa */
.vault-stage { margin-bottom: 18px; }
.vault {
    position: relative; border-radius: 22px; overflow: hidden;
    background: linear-gradient(160deg, var(--vault) 0%, var(--vault-dark) 100%);
    border: 4px solid #5a6275;
    box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 40px rgba(0,0,0,0.4);
    padding: 26px 22px; min-height: 280px;
}
.vault.danger { border-color: var(--red); box-shadow: 0 0 34px rgba(255,71,87,0.4), inset 0 0 40px rgba(0,0,0,0.4); }
.vault.danger::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(255,71,87,0.12) 100%);
    animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

/* Kasa kapısı (kapalıyken) */
.vault-door {
    position: absolute; inset: 0; z-index: 4;
    background: linear-gradient(145deg, #4a5468 0%, #2e3545 100%);
    display: flex; align-items: center; justify-content: center;
    transition: transform .6s cubic-bezier(.6,-0.2,.3,1.4); transform-origin: left center;
}
.vault.open .vault-door { transform: perspective(800px) rotateY(-105deg); }
.vault-ring {
    position: absolute; width: 150px; height: 150px; border-radius: 50%;
    border: 8px solid #5a6478; box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 0 12px rgba(0,0,0,0.4);
}
.vault-ring::after {
    content: ''; position: absolute; inset: 14px; border-radius: 50%;
    border: 4px dashed #6b7488;
}
.vault-handle { font-size: 3rem; z-index: 2; animation: spin-handle 0s; }

/* Kasa içi */
.vault-inside { position: relative; z-index: 1; opacity: 0; transition: opacity .4s .3s; }
.vault.open .vault-inside { opacity: 1; }
.multiplier-display { text-align: center; margin-bottom: 18px; }
.mult-label { font-size: 0.9rem; color: rgba(255,255,255,0.7); letter-spacing: 1px; }
.mult-value {
    font-size: 4rem; font-weight: 900; line-height: 1; color: var(--gold);
    text-shadow: 0 0 18px rgba(255,210,63,0.5); transition: transform .3s;
}
.mult-value.grow { animation: grow .4s ease; }
@keyframes grow { 0%{transform:scale(1)} 50%{transform:scale(1.25)} 100%{transform:scale(1)} }

.pot-display { text-align: center; font-size: 1.4rem; margin-bottom: 20px; }
.pot-label { color: rgba(255,255,255,0.8); }
.pot-value { color: var(--green-ok); font-weight: 900; }

.risk-meter { max-width: 380px; margin: 0 auto; }
.risk-label { font-size: 0.88rem; text-align: center; margin-bottom: 8px; color: rgba(255,255,255,0.9); }
.risk-label span { font-weight: 800; color: var(--amber); }
.risk-bar-wrap { height: 14px; background: rgba(0,0,0,0.4); border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.12); }
.risk-bar {
    height: 100%; width: 10%; border-radius: 8px; transition: width .4s ease, background .4s ease;
    background: linear-gradient(90deg, var(--green-ok), var(--amber));
}

/* Patlama */
.boom-overlay {
    position: absolute; inset: 0; z-index: 6; display: none;
    align-items: center; justify-content: center; font-size: 7rem;
    background: radial-gradient(circle, rgba(255,71,87,0.5), rgba(0,0,0,0.7));
}
.boom-overlay.show { display: flex; animation: boom .6s ease; }
@keyframes boom { 0%{transform:scale(0);opacity:0} 40%{transform:scale(1.3);opacity:1} 100%{transform:scale(1);opacity:1} }

/* Sonuç mesajı */
.result-msg { text-align: center; min-height: 28px; margin: 16px 0; font-size: 1.2rem; font-weight: 800; }
.result-msg.win { color: var(--gold); text-shadow: 0 0 12px rgba(255,210,63,0.5); }
.result-msg.lose { color: var(--red); }
.result-msg.info { color: var(--green-ok); }

/* Bahis aşaması */
.bet-phase { text-align: center; margin-bottom: 18px; }
.bet-phase.hidden { display: none; }
.bet-label { font-size: 0.95rem; opacity: 0.85; margin-bottom: 10px; }
.bet-options { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.bet-btn {
    min-width: 70px; padding: 14px 18px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08); color: #fff; font-weight: 800; font-size: 1.1rem; cursor: pointer;
    transition: transform .12s, border-color .2s, background .2s;
}
.bet-btn:hover { transform: translateY(-2px); }
.bet-btn.active { border-color: var(--gold); background: rgba(255,210,63,0.15); color: var(--gold); }
.open-btn {
    padding: 16px 46px; font-size: 1.3rem; font-weight: 900; letter-spacing: 1px;
    border: none; border-radius: 50px; cursor: pointer; color: var(--ink);
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    box-shadow: 0 6px 0 #b87d00, 0 8px 20px rgba(0,0,0,0.35); transition: transform .1s, box-shadow .1s;
}
.open-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b87d00; }
.open-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Karar aşaması */
.decision-phase { display: none; gap: 14px; margin-bottom: 18px; }
.decision-phase.show { display: flex; }
.decision-btn {
    flex: 1; padding: 20px 16px; border-radius: 16px; border: none; cursor: pointer;
    display: flex; flex-direction: column; gap: 6px; align-items: center;
    transition: transform .12s, box-shadow .15s; color: #fff;
}
.decision-btn:active { transform: translateY(3px); }
.decision-btn.cashout { background: linear-gradient(135deg, var(--green-ok), var(--green-deep)); box-shadow: 0 5px 0 #0a7a4d; }
.decision-btn.continue { background: linear-gradient(135deg, var(--red), var(--red-deep)); box-shadow: 0 5px 0 #a82838; }
.dec-title { font-size: 1.3rem; font-weight: 900; }
.dec-sub { font-size: 0.82rem; opacity: 0.92; }

/* Grafik */
.chart-section {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px; padding: 16px; margin-bottom: 18px;
}
.chart-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; color: rgba(255,255,255,0.9); }
#bankChart { width: 100%; height: auto; display: block; border-radius: 8px; }
.chart-caption { font-size: 0.82rem; color: rgba(255,255,255,0.65); text-align: center; margin-top: 8px; line-height: 1.4; }
.chart-caption strong { color: var(--gold); }

/* Bottom controls */
.game-controls { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.btn {
    padding: 12px 20px; border: 2px solid rgba(255,255,255,0.22); border-radius: 12px;
    background: rgba(255,255,255,0.07); color: #fff; cursor: pointer; font-size: 0.92rem;
    font-weight: 600; transition: background .2s, transform .12s;
}
.btn:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }
.best-score { text-align: center; opacity: 0.85; font-size: 0.92rem; }
.best-score span { color: var(--gold); font-weight: 800; }

/* Overlay / Menü */
.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center; z-index: 20000; padding: 20px;
}
.overlay.show { display: flex; }
.menu-card {
    background: linear-gradient(160deg, #2a3142, #1a1e2c); border: 3px solid var(--gold);
    border-radius: 22px; padding: 32px 26px; max-width: 460px; width: 100%;
    text-align: center; box-shadow: 0 0 40px rgba(255,210,63,0.25); max-height: 90vh; overflow-y: auto;
}
.menu-card h1 { font-size: 2rem; color: var(--gold); text-shadow: 0 0 14px rgba(255,210,63,0.5); }
.info-block { background: rgba(255,255,255,0.06); border-radius: 12px; padding: 16px; margin: 14px 0; text-align: left; }
.info-block.strategy { background: rgba(25,195,125,0.1); border: 1px solid rgba(25,195,125,0.3); }
.info-block h3 { color: var(--green-ok); margin-bottom: 8px; }
.info-block.strategy h3 { color: var(--green-ok); }
.info-text div { line-height: 1.9; color: rgba(255,255,255,0.92); }
.btn-primary {
    margin-top: 10px; padding: 15px 34px; border: none; border-radius: 50px; cursor: pointer;
    font-size: 1.1rem; font-weight: 900; color: var(--ink);
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    box-shadow: 0 5px 0 #b87d00; transition: transform .1s;
}
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 #b87d00; }

.edu-highlight {
    background: rgba(255,210,63,0.12); border: 1px solid rgba(255,210,63,0.3);
    border-radius: 12px; padding: 14px 18px; margin: 16px 0; font-size: 0.92rem;
    line-height: 1.5; color: #ffe9a8;
}
.edu-highlight strong { color: var(--gold); }

.win-stats { display: flex; gap: 14px; justify-content: center; margin: 20px 0; }
.win-stat { background: rgba(255,255,255,0.08); border-radius: 12px; padding: 14px 20px; }
.win-label { font-size: 0.8rem; opacity: 0.8; }
.win-value { font-size: 1.7rem; font-weight: 900; color: var(--gold); }

/* Confetti */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 19000; overflow: hidden; }
.confetti { position: absolute; width: 10px; height: 14px; top: -20px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0.2; } }

/* SEO */
.seo-content {
    max-width: 800px; margin: 40px auto 0; padding: 30px;
    background: rgba(0,0,0,0.3); border-radius: 15px; line-height: 1.8;
    border: 1px solid rgba(255,210,63,0.2);
}
.seo-content h2 { color: var(--gold); margin-bottom: 18px; }
.seo-content h3 { color: var(--green-ok); margin: 22px 0 12px; }
.seo-content ul { padding-left: 22px; }
.seo-content li { margin-bottom: 6px; }

/* Mobile */
@media (max-width: 520px) {
    .header-logo { font-size: 1.3rem; }
    .mult-value { font-size: 3.2rem; }
    .decision-btn { padding: 16px 10px; }
    .dec-title { font-size: 1.1rem; }
    .open-btn { padding: 14px 36px; font-size: 1.15rem; }
    .stat-box { min-width: 88px; padding: 10px 16px; }
    .stat-value { font-size: 1.5rem; }
    .vault { min-height: 260px; }
}
