/* ============================================================
   DalaoBet — dark + gold theme
   ============================================================ */
:root {
  --bg: #100a1e;
  --bg-card: #1b1236;
  --bg-elevated: #251845;
  --border: #392556;
  --gold: #c8d2e0;
  --gold-bright: #eef3fa;
  --gold-dim: #8a97ad;
  --accent: #00e0c6;
  --accent-dim: #0a9d8c;
  --violet: #7c4dff;
  --violet-glow: rgba(124,77,255,.35);
  --text: #f3eeff;
  --text-muted: #a99bc9;
  --danger: #ff5c7a;
  --success: #4ade80;
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Ethiopic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none; }
.logo .d1 { color: var(--gold); font-size: 21px; text-shadow: 0 0 12px var(--violet-glow); }
.logo .d2 { color: var(--text); font-size: 21px; font-weight: 600; opacity: .85; }
.logo-mark {
  width: 34px; height: 34px; margin-right: 10px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: 0 0 16px var(--violet-glow);
  background: linear-gradient(135deg, #eef3fa 0%, #8a97ad 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #160d2c; font-weight: 900; font-size: 18px;
}

/* ---------- auth pages ---------- */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(1200px 500px at 50% -10%, rgba(240,185,11,0.08), transparent); }
.auth-card { width: 100%; max-width: 380px; background: linear-gradient(180deg, var(--bg-card), var(--bg)); border: 1px solid var(--border); border-radius: 22px; padding: 32px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px var(--violet-glow); }
.auth-card h1 { font-size: 20px; margin: 18px 0 6px; }
.auth-card p.sub { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.field input {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-elevated) !important;
  background: #2a2410; color: #fff; font-size: 15px; outline: none;
}
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--violet-glow); }
.btn {
  width: 100%; padding: 15px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--violet), var(--accent-dim)) !important;
  color: #fff !important; font-weight: 800; letter-spacing: .3px;
  font-size: 15px; font-weight: 800;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: #14100a;
}
.btn:active { transform: scale(0.99); }
.btn.secondary { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }
.auth-links a { color: var(--gold); text-decoration: none; font-weight: 600; }
.err { color: var(--danger); font-size: 13px; margin: 10px 0 0; min-height: 18px; }
.ok { color: var(--success); font-size: 13px; margin: 10px 0 0; }

/* ---------- app shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(36,22,64,0.96), rgba(18,11,38,0.96));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124,77,255,0.25);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.topbar::after { content:""; position:absolute; left:0; right:0; bottom:0; height:1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity:.5; }
.wallet-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(124,77,255,0.12);
  border: 1px solid rgba(124,77,255,0.4);
  border-radius: 999px; padding: 6px 6px 6px 16px;
}
.wallet-chip .amt { font-weight: 800; font-size: 15px; }
.wallet-chip .dep {
  background: linear-gradient(135deg, var(--violet), var(--accent)); color: #fff; border: none; border-radius: 999px;
  height: 32px; padding: 0 16px; font-size: 13px; font-weight: 800; letter-spacing: .3px;
  cursor: pointer; white-space: nowrap; box-shadow: 0 2px 10px var(--violet-glow);
}
.wallet-chip .amt { color: var(--accent); }
.section-title { padding: 20px 16px 12px; font-size: 14px; font-weight: 800; color: var(--text); text-transform: uppercase; letter-spacing: 1.5px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent-dim)); box-shadow: 0 0 8px var(--accent); }

/* ---------- game grids ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 12px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile {
  position: relative; cursor: pointer; background: none; border: none;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.12s;
}
.tile:hover { transform: translateY(-2px); }
.tile .thumb {
  position: relative; width: 100%; aspect-ratio: 1/1; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-card);
  transition: border-color 0.12s;
}
.tile:hover .thumb { border-color: var(--gold); box-shadow: 0 8px 24px var(--violet-glow); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .name {
  font-size: 12.5px; font-weight: 800; text-align: center; color: #fff;
  line-height: 1.2; padding: 0 2px; letter-spacing: 0.2px;
}
.tile.own { background: linear-gradient(160deg, #241d0e 0%, #17130c 100%); align-items: center; justify-content: center; }
.tile.own .big { font-size: 34px; margin-bottom: 6px; }
.tile.own .name { background: none; }

/* ---------- game overlay ---------- */
.game-overlay { position: fixed; inset: 0; z-index: 100; background: #0d0b07; display: flex; flex-direction: column; }
.game-overlay .bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.game-overlay .close-btn { background: rgba(255,255,255,0.08); color: var(--text); border: none; border-radius: 9px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.game-overlay iframe { flex: 1; width: 100%; border: 0; background: transparent; display: block; }
.hidden { display: none !important; }

/* ---------- bottom nav ---------- */
.bottomnav {
  left: 50% !important; transform: translateX(-50%); bottom: 14px !important;
  width: auto !important; max-width: 340px; margin: 0 auto;
  border-radius: 999px !important; padding: 10px 26px !important;
  gap: 30px; background: linear-gradient(135deg, #241640, #180f30) !important;
  border: 1px solid var(--gold-dim) !important;
  box-shadow: 0 8px 30px var(--violet-glow), 0 4px 12px rgba(0,0,0,.5) !important;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-around; padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  background: rgba(13,11,7,0.95); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-muted); text-decoration: none; font-size: 11px; font-weight: 600; }
.bottomnav a.active { color: var(--gold); }
.bottomnav .ico { font-size: 20px; }
.page-pad { padding-bottom: 76px; }

/* ---------- modals ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; }

.modal-card { width: calc(100% - 32px); max-width: 360px; margin: 0 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; max-height: 82vh; overflow-y: auto; }

.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 18px; font-weight: 800; }
.modal-x { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; }
.m-note { color: var(--text-muted); font-size: 13px; }
.pay-to { display: flex; align-items: center; gap: 10px; margin-top: 8px; background: var(--bg-elevated); border: 1px solid var(--gold-dim); border-radius: 10px; padding: 12px 14px; }
.pay-to span { font-size: 20px; font-weight: 800; color: var(--gold-bright); letter-spacing: 1px; flex: 1; }
.copy-btn { background: var(--gold); color: #14100a; border: none; border-radius: 8px; padding: 7px 14px; font-weight: 700; cursor: pointer; }
.modal-card textarea { width: 100%; margin-top: 8px; margin-bottom: 12px; padding: 14px; border-radius: 12px; border: 2px solid var(--violet); background: var(--bg-elevated); color: var(--text); font-size: 14px; resize: vertical; font-family: inherit; }
.modal-card textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--violet-glow); }
.acct-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.acct-row span { color: var(--text-muted); }

/* wallet deposit/withdraw side-by-side tabs */
.wallet-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.wt-btn { flex: 1; padding: 11px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-muted); border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.wt-btn.active { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%); color: #14100a; border-color: var(--gold-dim); }

/* kill mobile tap-highlight / focus box on tiles and buttons */
.tile, .tile *, button, a, .bottomnav a { -webkit-tap-highlight-color: transparent; }
.tile:focus, .tile:active, button:focus { outline: none; }
.tile { -webkit-touch-callout: none; user-select: none; }

.eye-btn { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; margin-left: 6px; padding: 2px; }

/* kefay-nogold */


.logo .d1 { color: var(--gold-bright) !important; text-shadow: 0 0 12px var(--accent); }
.logo .d2 { color: var(--accent) !important; opacity: 1 !important; }

/* ---- Kefay carousel lobby (purple/cyan) ---- */
.krow-head { display: flex; align-items: baseline; gap: 10px; padding: 20px 16px 4px; }
.krow-head .kt { font-size: 19px; font-weight: 900; color: var(--text); font-family: Georgia, 'Times New Roman', serif; letter-spacing: -0.2px; }
.krow-head .ksub { font-size: 11px; font-style: italic; color: var(--accent); letter-spacing: .3px; }
.krow-head .kcount { margin-left: auto; background: rgba(124,77,255,0.14); border: 1px solid var(--violet); border-radius: 999px; padding: 3px 12px; font-size: 12px; color: var(--accent); font-weight: 700; }
.krail { display: flex; gap: 12px; overflow-x: auto; padding: 12px 16px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.krail::-webkit-scrollbar { display: none; }
.kcard { flex-shrink: 0; width: 104px; cursor: pointer; transition: transform .12s; }
.kcard:active { transform: scale(.96); }
.kcard-th { width: 104px; height: 104px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-elevated); position: relative; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.kcard-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kcard-name { font-size: 11px; color: var(--text-muted); margin-top: 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpills { display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.kpills::-webkit-scrollbar { display: none; }
.kpill { flex-shrink: 0; background: rgba(124,77,255,0.10); border: 1.5px solid var(--violet); color: var(--text); border-radius: 999px; padding: 8px 16px; font-size: 12.5px; font-weight: 800; cursor: pointer; letter-spacing: .3px; white-space: nowrap; transition: all .15s; }
.kpill:hover { background: rgba(124,77,255,0.20); }
.kpill.active { background: linear-gradient(135deg, var(--violet), var(--accent-dim)); color: #fff; border-color: transparent; box-shadow: 0 2px 12px var(--violet-glow); }

/* ---- Kefay animated login ---- */
@keyframes kfOrb { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(10px,-14px) scale(1.1); } }
@keyframes kfOrb2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-12px,10px) scale(1.15); } }
@keyframes kfSweep { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes kfBtnPulse { 0%,100% { box-shadow: 0 4px 20px rgba(124,77,255,.4); } 50% { box-shadow: 0 4px 30px rgba(0,224,198,.5); } }
.auth-wrap { position: relative; overflow: hidden; }
.korb { position: absolute; border-radius: 50%; filter: blur(22px); pointer-events: none; z-index: 0; }
.korb.korb1 { top: 8%; left: 8%; width: 90px; height: 90px; background: radial-gradient(circle, var(--violet-glow), transparent 70%); animation: kfOrb 6s ease-in-out infinite; }
.korb.korb2 { top: 22%; right: 6%; width: 110px; height: 110px; background: radial-gradient(circle, rgba(0,224,198,0.3), transparent 70%); animation: kfOrb2 7s ease-in-out infinite; }
.auth-hero { position: relative; z-index: 1; text-align: center; margin-bottom: 28px; }
.auth-badge { display: inline-block; border: 1px solid rgba(124,77,255,0.4); border-radius: 999px; padding: 5px 16px; margin-bottom: 20px; background: rgba(124,77,255,0.08); font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; }
.auth-word { font-size: 34px; font-weight: 900; letter-spacing: -1px; line-height: 1; margin-bottom: 14px; background: linear-gradient(90deg, var(--violet) 0%, var(--accent) 50%, var(--violet) 100%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: kfSweep 4s linear infinite; }
.auth-tag { font-size: 13px; color: var(--gold-dim); line-height: 1.6; }
.auth-tag b { color: var(--gold); font-weight: 700; }
.auth-card { position: relative; z-index: 1; }
.auth-card h1 { font-size: 18px; margin: 0 0 6px; }
.auth-card .btn { animation: kfBtnPulse 3s ease-in-out infinite; background: linear-gradient(135deg, var(--violet), var(--accent)); border-radius: 14px; }
.auth-card .field input { border-radius: 14px; padding: 15px 18px; }

/* ---- Kefay world-class header ---- */
.topbar .logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.klogo-mark { color: var(--accent); font-weight: 900; font-size: 22px; margin-right: 2px; }
.klogo-word { font-size: 19px; font-weight: 900; letter-spacing: -0.5px; }
.klogo-word .d1 { color: var(--gold-bright); }
.klogo-word .d2 { color: var(--accent); }
.ktop-right { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex-shrink: 0; }
.topbar .logo { flex-shrink: 0; }
.wallet-chip .amt { white-space: nowrap; }
.kicon-btn { background: transparent; border: none; color: var(--gold-dim); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; transition: color .15s, background .15s; }
.kicon-btn:hover { color: var(--accent); opacity: 1; }
.kicon-btn:active { transform: rotate(-180deg); }
.kicon-btn:active { transform: rotate(180deg); }
.kicon-btn:active { transform: scale(.92); }
.kicon-btn.spinning svg { animation: kspin .6s linear; }
@keyframes kspin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.eye-btn { background: none; border: none; color: var(--gold-dim); display: flex; align-items: center; cursor: pointer; padding: 4px; margin: 0; }
.eye-btn:active { transform: scale(.9); }

/* ---- Kefay cashback countdown (cyan) ---- */
.kcbx { margin: 14px 0 0; border-radius: 14px; border: 1px solid var(--accent-dim); background: linear-gradient(135deg, #082725, #04140f); padding: 14px 16px; position: relative; overflow: hidden; }
.kcbx-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.kcbx-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: kcbxPulse 1.6s ease-in-out infinite; }
@keyframes kcbxPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.kcbx-live { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; }
.kcbx-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.kcbx-lbl { font-size: 11px; color: var(--gold-dim); letter-spacing: .5px; margin-bottom: 3px; }
.kcbx-amt { font-size: 22px; font-weight: 900; color: var(--accent); letter-spacing: -0.5px; line-height: 1; }
.kcbx-cur { font-size: 14px; font-weight: 700; color: var(--accent-dim); margin-left: 4px; }
.kcbx-timer { text-align: right; }
.kcbx-clock { font-family: ui-monospace, 'SF Mono', monospace; font-size: 17px; font-weight: 800; color: var(--accent); line-height: 1; }
.kcbx-clock .kcbx-c { color: var(--accent-dim); }
.kcbx-track { height: 4px; background: rgba(0,224,198,0.12); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.kcbx-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: 2px; transition: width 1s linear; }
.kcbx-foot { font-size: 10px; color: var(--gold-dim); margin-top: 8px; }
.kcbx-claim { width: 100%; margin-top: 12px; }
.kcbx-claim.hidden { display: none; }

/* ---- refresh flash line ---- */
.wc-bal { position: relative; display: inline-flex; flex-direction: column; }
.wc-flash { position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transform: scaleX(0); }
.wc-flash.go { animation: wcFlash .7s ease; }
@keyframes wcFlash { 0% { opacity: 0; transform: scaleX(0); } 40% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
