/* ═══════════════════════════════════════════════
   ROYALBET — Luxury Casino Design System
   Fonts: Playfair Display (display) + DM Sans (body)
   Palette: Deep noir + liquid gold + crimson accent
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Core palette */
  --noir:       #05050a;
  --noir2:      #0b0b14;
  --noir3:      #12121f;
  --noir4:      #1a1a2e;
  --gold:       #c9a84c;
  --gold-light: #f0d080;
  --gold-glow:  rgba(201,168,76,0.25);
  --crimson:    #c0272d;
  --crimson2:   #8b0000;
  --green:      #1db954;
  --green-dim:  rgba(29,185,84,0.15);
  --red-dim:    rgba(192,39,45,0.15);
  --text:       #e8e0d0;
  --text-dim:   #8a7f6e;
  --border:     rgba(201,168,76,0.15);
  --border2:    rgba(255,255,255,0.06);

  /* Gradients */
  --grad-gold:  linear-gradient(135deg, #c9a84c 0%, #f0d080 50%, #c9a84c 100%);
  --grad-dark:  linear-gradient(180deg, #0b0b14 0%, #05050a 100%);
  --grad-card:  linear-gradient(145deg, #12121f 0%, #0d0d18 100%);
  --grad-crimson: linear-gradient(135deg, #c0272d, #8b0000);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { scroll-behavior:smooth; }
body {
  background: var(--noir);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 76px;
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* ── AMBIENT GLOW ── */
body::after {
  content: '';
  position: fixed;
  top: -40vh; left: 50%; transform: translateX(-50%);
  width: 80vw; height: 80vh;
  background: radial-gradient(ellipse, rgba(201,168,76,0.04) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(5,5,10,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 58px;
  display: flex; align-items: center; gap: 12px;
}
.site-header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}
.hdr-back { color: var(--gold); text-decoration: none; font-size: 20px; line-height: 1; padding: 8px 4px; }
.hdr-logo {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 900;
  background: var(--grad-gold);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: 1px; flex: 1;
}
.hdr-logo span { font-size: 11px; display: block; letter-spacing: 4px; opacity: 0.7; margin-top: -2px; }
.hdr-balance {
  text-align: right;
}
.hdr-balance .lbl { font-size: 9px; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; }
.hdr-balance .val {
  font-family: 'Playfair Display', serif;
  font-size: 15px; font-weight: 700;
  background: var(--grad-gold);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: rgba(8,8,14,0.97);
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.3;
}
.bnav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 4px 8px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 9px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  gap: 4px;
  transition: color 0.2s;
  position: relative;
}
.bnav-item .icon { font-size: 20px; line-height: 1; }
.bnav-item.active { color: var(--gold); }
.bnav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 20%; right: 20%; height: 2px;
  background: var(--grad-gold);
  border-radius: 0 0 3px 3px;
}

/* ── CARDS ── */
.card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* ── GOLD BUTTON ── */
.btn-gold {
  display: block; width: 100%;
  padding: 16px 20px;
  background: var(--grad-gold);
  border: none; border-radius: 12px;
  color: #1a0e00;
  font-family: 'Playfair Display', serif;
  font-size: 15px; font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(201,168,76,0.3), 0 1px 0 rgba(255,255,255,0.15) inset;
  transition: transform 0.12s, box-shadow 0.12s;
  -webkit-appearance: none; text-align: center;
}
.btn-gold:active { transform: scale(0.97); box-shadow: 0 2px 12px rgba(201,168,76,0.2); }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── CRIMSON BUTTON ── */
.btn-crimson {
  display: block; width: 100%;
  padding: 16px 20px;
  background: var(--grad-crimson);
  border: none; border-radius: 12px;
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 15px; font-weight: 700; letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(192,39,45,0.25);
  -webkit-appearance: none; text-align: center;
  transition: transform 0.12s;
}
.btn-crimson:active { transform: scale(0.97); }

/* ── FORM INPUTS ── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 7px;
}
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 500;
  outline: none; -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.form-input::placeholder { color: rgba(255,255,255,0.2); }

/* ── SECTION TITLE ── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); opacity: 0.8;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ── RESULT PANELS ── */
.result-panel {
  border-radius: 14px; padding: 18px; text-align: center;
  display: none;
}
.result-panel.show { display: block; animation: resIn 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes resIn { from { transform: scale(0.85) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.result-panel.win {
  background: linear-gradient(135deg, rgba(29,185,84,0.12), rgba(29,185,84,0.05));
  border: 1px solid rgba(29,185,84,0.35);
}
.result-panel.loss {
  background: linear-gradient(135deg, rgba(192,39,45,0.12), rgba(192,39,45,0.05));
  border: 1px solid rgba(192,39,45,0.35);
}
.result-title { font-family: 'Playfair Display', serif; font-size: 20px; margin-bottom: 4px; }
.result-panel.win .result-title { color: var(--green); }
.result-panel.loss .result-title { color: #e05555; }
.result-amount { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 900; line-height: 1.1; }
.result-panel.win .result-amount { background: var(--grad-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.result-panel.loss .result-amount { color: #e05555; }
.result-sub { font-size: 12px; color: var(--text-dim); margin-top: 5px; }

/* ── ERROR BOX ── */
.err-box {
  padding: 12px 16px; border-radius: 10px;
  background: rgba(192,39,45,0.12); border: 1px solid rgba(192,39,45,0.3);
  color: #e08888; font-size: 13px; font-weight: 600; display: none;
}
.err-box.show { display: block; }

/* ── BET PRESETS ── */
.bet-presets { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-bottom: 10px; }
.bet-pre {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border2);
  border-radius: 9px; padding: 11px 4px; text-align: center;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 700; color: var(--text-dim);
  -webkit-appearance: none; transition: all 0.15s;
}
.bet-pre.on {
  background: rgba(201,168,76,0.12); border-color: rgba(201,168,76,0.4);
  color: var(--gold-light);
}

/* ── ALERT ── */
.alert { padding: 13px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.alert-error { background: rgba(192,39,45,0.12); border: 1px solid rgba(192,39,45,0.3); color: #e08888; }
.alert-success { background: rgba(29,185,84,0.1); border: 1px solid rgba(29,185,84,0.3); color: var(--green); }

/* ── WRAP ── */
.page-wrap { position: relative; z-index: 1; padding: 16px; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* ══════════════════════════════════════════════
   ORTAK HEADER & FOOTER STİLLERİ
   ══════════════════════════════════════════════ */

/* Header sağ grup */
.hdr-right {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
}
.hdr-balance { text-align: right; }
.hdr-balance .lbl { font-size: 9px; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; }
.hdr-balance .val {
  font-family: 'Cormorant Garamond','Playfair Display',serif;
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  background: var(--grad-gold); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}

/* Canlı destek butonu — header */
.hdr-support-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(29,185,84,.12);
  border: 1px solid rgba(29,185,84,.3);
  border-radius: 10px; padding: 5px 10px;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 700; color: var(--green);
  white-space: nowrap; transition: background .2s;
  -webkit-appearance: none;
}
.hdr-support-btn:active { background: rgba(29,185,84,.22); transform: scale(.97); }
.hdr-support-icon { font-size: 14px; line-height: 1; }

/* Footer linkleri */
.footer-links {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 16px 4px;
  flex-wrap: wrap;
}
.footer-link {
  font-size: 12px; color: var(--text-dim);
  text-decoration: none; letter-spacing: .3px;
  transition: color .2s;
}
.footer-link:hover { color: var(--gold); }
.footer-link-btn {
  background: none; border: none; cursor: pointer;
  padding: 0; font-family: inherit;
}
.footer-sep { color: var(--border); font-size: 12px; }

/* Bottom nav — ortak */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: rgba(8,8,14,.97);
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .3;
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 4px 8px; text-decoration: none;
  color: var(--text-dim); font-size: 9px; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase; gap: 4px;
  transition: color .2s; position: relative;
}
.bnav-item .icon { font-size: 20px; line-height: 1; }
.bnav-item.active { color: var(--gold); }
.bnav-item.active::before {
  content: ''; position: absolute; top: 0; left: 20%; right: 20%;
  height: 2px; background: var(--grad-gold);
  border-radius: 0 0 3px 3px;
}
