/* ==========================================================================
   YANKIBET v4.1 — PROFESYONEL GÖRSEL SİSTEM
   ========================================================================== */
:root {
  --bg: #0B0B10;
  --bg-2: #101017;
  --surface: #14141C;
  --surface-2: #1A1A24;
  --border: #23232E;
  --border-soft: #1C1C26;
  --gold: #E8B84B;
  --gold-hi: #F5CE6B;
  --gold-deep: #B8862B;
  --text: #F2F2F5;
  --muted: #9A9AA8;
  --green: #34C77B;
  --red: #E05A5A;
  --radius: 10px;
  --slip-w: 316px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-color: #2A2A36 var(--bg); }
body {
  background:
    radial-gradient(1100px 420px at 50% -8%, rgba(232,184,75,.05), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 7px),
    var(--bg);
  color: var(--text);
  font-family: 'Changa', 'Segoe UI', sans-serif;
  font-size: 15px;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
a { color: var(--gold); text-decoration: none; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #2A2A36; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* ---------- BAĞLANTI NOKTASI ---------- */
.yk4-conn { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: var(--gold); transition: background .3s; }
.yk4-conn.offline { background: var(--red); }
.yk4-conn.connecting { background: var(--gold-deep); }

/* ---------- ÜST BAR ---------- */
.yk4-topbar {
  position: sticky; top: 3px; z-index: 100;
  display: flex; align-items: center; gap: 28px;
  height: 62px; padding: 0 22px;
  background: rgba(13,13,19,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(232,184,75,.28);
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.yk4-logo img { height: 44px; display: block; }
.yk4-tabs { display: flex; gap: 4px; flex: 1; }
.yk4-tab {
  position: relative; background: none; border: none;
  color: var(--muted); font-size: 15px; font-weight: 700;
  letter-spacing: .08em; padding: 20px 16px;
  transition: color .18s;
}
.yk4-tab:hover { color: var(--text); }
.yk4-tab.active { color: var(--gold); }
.yk4-tab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 12px;
  height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-hi), var(--gold-deep));
  box-shadow: 0 0 10px rgba(232,184,75,.5);
}
.yk4-auth { display: flex; align-items: center; gap: 10px; }

/* ---------- BUTONLAR ---------- */
.yk4-btn-gold {
  background: linear-gradient(180deg, #F5CE6B 0%, #E0B23F 55%, #C1912C 100%);
  color: #17120a; border: none; border-radius: 8px;
  font-weight: 800; font-size: 14px; letter-spacing: .06em;
  padding: 10px 22px;
  box-shadow: 0 3px 12px rgba(232,184,75,.28), inset 0 1px 0 rgba(255,255,255,.35);
  transition: filter .15s, transform .1s;
}
.yk4-btn-gold:hover { filter: brightness(1.07); }
.yk4-btn-gold:active { transform: translateY(1px); }
.yk4-btn-ghost {
  background: transparent; color: var(--gold);
  border: 1px solid rgba(232,184,75,.45); border-radius: 8px;
  font-weight: 700; font-size: 13px; letter-spacing: .05em;
  padding: 9px 18px; transition: all .15s;
}
.yk4-btn-ghost:hover { background: rgba(232,184,75,.08); border-color: var(--gold); }
.yk4-user-name { color: var(--text); font-weight: 600; font-size: 14px; }
.yk4-balance {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 14px;
  color: var(--gold); font-weight: 800; font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- HERO ---------- */
.yk4-hero { padding: 18px 22px 4px; }
.yk4-hero-track {
  position: relative; height: 264px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
}
.yk4-hero-track img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .7s ease; transform: scale(1.02);
}
.yk4-hero-track img.active { opacity: 1; transform: scale(1); }

/* ---------- SAYFA DÜZENİ ---------- */
#yk4-layout-body { padding: 14px 22px 90px; position: relative; }
.yk4-page { display: none; }
.yk4-page.active { display: block; }
@media (min-width: 1024px) {
  .yk4-page.active { margin-right: calc(var(--slip-w) + 14px); }
}

/* ---------- ANA SAYFA ---------- */
.yk4-sec { margin-top: 22px; }
.yk4-sec-head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px;
}
.yk4-sec-title {
  font-size: 17px; font-weight: 800; letter-spacing: .1em; color: var(--text);
  text-transform: uppercase;
}
.yk4-sec-title::before {
  content: ""; display: inline-block; width: 4px; height: 16px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-deep));
  border-radius: 2px; margin-right: 10px; vertical-align: -2px;
}
.yk4-sec-link { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.yk4-sec-link:hover { color: var(--gold); }
.yk4-live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); margin-right: 8px;
  animation: yk4-pulse 1.4s infinite;
}
@keyframes yk4-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.yk4-shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: 168px;
  gap: 12px; overflow-x: auto; padding-bottom: 8px;
}
.yk4-shelf-card {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); cursor: pointer;
  transition: transform .18s, border-color .18s;
  background: var(--surface);
}
.yk4-shelf-card:hover { transform: translateY(-4px); border-color: rgba(232,184,75,.5); }
.yk4-shelf-card img { width: 100%; aspect-ratio: 440/310; object-fit: cover; display: block; }
.yk4-shelf-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px;
  background: linear-gradient(180deg, transparent, rgba(5,5,9,.92));
  font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.yk4-promo-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.yk4-promo-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-2) 100%);
  border-top: 2px solid rgba(232,184,75,.5);
  padding: 18px; transition: transform .18s, border-color .18s;
}
.yk4-promo-card:hover { transform: translateY(-3px); border-top-color: var(--gold); }
.yk4-promo-title { font-size: 16px; font-weight: 800; color: var(--gold); margin-bottom: 6px; }
.yk4-promo-text { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ---------- SPOR / CANLI ---------- */
.yk4-sports { display: grid; grid-template-columns: 252px 1fr; gap: 16px; align-items: start; }
.yk4-tree {
  position: sticky; top: 80px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 10px;
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.yk4-tree-region { border-radius: 8px; }
.yk4-tree-region summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  padding: 9px 10px; font-weight: 700; font-size: 14px; color: var(--text);
  border-radius: 8px; transition: background .15s;
}
.yk4-tree-region summary::-webkit-details-marker { display: none; }
.yk4-tree-region summary:hover { background: var(--surface-2); }
.yk4-tree-region summary::before {
  content: "▸"; color: var(--gold); margin-right: 8px; font-size: 12px;
  transition: transform .15s;
}
.yk4-tree-region[open] summary::before { transform: rotate(90deg); }
.yk4-lig-count {
  margin-left: auto; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 9px; font-size: 11.5px; color: var(--muted); font-weight: 600;
}
.yk4-tree-comp {
  display: flex; align-items: center; padding: 7px 10px 7px 26px;
  font-size: 13px; color: var(--muted); border-radius: 6px;
  transition: all .13s;
}
.yk4-tree-comp:hover { color: var(--gold); background: rgba(232,184,75,.06); }
.yk4-tree-n { margin-left: auto; font-size: 11px; color: var(--muted); }

.yk4-lig {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-top: 12px;
  background: linear-gradient(90deg, rgba(232,184,75,.10), rgba(232,184,75,.02) 60%, transparent);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 13.5px; font-weight: 800; letter-spacing: .05em; color: var(--text);
  text-transform: uppercase;
}
.yk4-lig:first-child { margin-top: 0; }
.yk4-lig-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* maç satırı */
.yk4-game {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border-soft); border-top: none;
  transition: background .15s, border-color .15s;
}
.yk4-game:first-of-type { border-top: 1px solid var(--border-soft); border-radius: 0; }
.yk4-game:hover { background: var(--surface-2); border-color: var(--border); }
.yk4-game-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.yk4-game-info > .yk4-time, .yk4-game-info > .yk4-live-min { flex-shrink: 0; }
.yk4-game-info > .yk4-score { flex-shrink: 0; }
.yk4-time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.yk4-live-min { font-size: 12.5px; font-weight: 800; color: var(--green); white-space: nowrap; }
.yk4-live-min::before { content: "●"; color: var(--red); font-size: 9px; margin-right: 5px; vertical-align: 2px; animation: yk4-pulse 1.4s infinite; }
.yk4-score {
  background: rgba(52,199,123,.12); border: 1px solid rgba(52,199,123,.35);
  color: var(--green); font-weight: 800; font-size: 13.5px;
  border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.yk4-teams { flex: 1; min-width: 0; }
.yk4-team { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.45; }

/* oran hücreleri */
.yk4-odds { display: flex; gap: 8px; }
.yk4-odd {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 74px; padding: 5px 4px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; transition: all .13s;
}
.yk4-odd:hover { border-color: rgba(232,184,75,.55); background: #17171f; }
.yk4-odd.active {
  background: linear-gradient(180deg, #F5CE6B, #C1912C);
  border-color: var(--gold);
}
.yk4-odd.active .yk4-odd-label, .yk4-odd.active .yk4-odd-price { color: #17120a; }
.yk4-odd-label { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.yk4-odd-price { font-size: 14.5px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.yk4-odd.dead { opacity: .45; cursor: default; }
.yk4-odd.dead:hover { border-color: var(--border); background: var(--bg-2); }

/* ---------- CASINO ---------- */
.yk4-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.yk4-chip {
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  border-radius: 20px; padding: 7px 16px; font-size: 13px; font-weight: 600;
  white-space: nowrap; transition: all .14s;
}
.yk4-chip:hover { color: var(--text); border-color: rgba(232,184,75,.4); }
.yk4-chip.active {
  background: linear-gradient(180deg, #F5CE6B, #C1912C);
  color: #17120a; border-color: var(--gold); font-weight: 800;
}
.yk4-casino-bar { display: flex; gap: 10px; margin: 6px 0 14px; }
.yk4-search, .yk4-provider {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 14px; font-size: 14px; outline: none;
}
.yk4-search { flex: 1; max-width: 340px; }
.yk4-search:focus, .yk4-provider:focus { border-color: var(--gold); }
.yk4-provider { min-width: 190px; }
.yk4-provider option { background: var(--surface); }
.yk4-casino-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.yk4-game-card {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); cursor: pointer; background: var(--surface);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.yk4-game-card:hover { transform: translateY(-4px); border-color: rgba(232,184,75,.55); box-shadow: 0 10px 26px rgba(0,0,0,.5); }
.yk4-game-card img { width: 100%; aspect-ratio: 440/310; object-fit: cover; display: block; }
.yk4-game-card-info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px;
  background: linear-gradient(180deg, transparent, rgba(5,5,9,.94));
}
.yk4-game-card-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yk4-game-card-provider { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.yk4-jackpot-badge {
  position: absolute; top: 8px; left: 8px;
  background: linear-gradient(180deg, #F5CE6B, #C1912C); color: #17120a;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 5px;
}
.yk4-fun-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(10,10,15,.75); border: 1px solid rgba(232,184,75,.5);
  color: var(--gold); font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
  padding: 4px 9px; border-radius: 6px; opacity: 0; transition: opacity .15s;
}
.yk4-game-card:hover .yk4-fun-btn { opacity: 1; }
.yk4-fun-btn:hover { background: var(--gold); color: #17120a; }

/* ---------- KUPON ---------- */
.yk4-slip {
  position: fixed; top: 76px; right: 16px; bottom: 16px; width: var(--slip-w);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; display: flex; flex-direction: column;
  box-shadow: 0 14px 44px rgba(0,0,0,.5);
  z-index: 90;
}
.yk4-sheet-close { display: none; }
.yk4-slip-body { display: flex; flex-direction: column; height: 100%; overflow-y: auto; padding: 14px; }
.yk4-slip-head {
  font-size: 15px; font-weight: 800; letter-spacing: .12em;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.yk4-slip-n {
  background: linear-gradient(180deg, #F5CE6B, #C1912C); color: #17120a;
  border-radius: 14px; min-width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; padding: 0 6px;
}
.yk4-slip-item {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: 9px; padding: 10px 12px; margin-bottom: 9px;
  position: relative;
}
.yk4-slip-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.yk4-slip-pick { font-size: 13px; font-weight: 700; }
.yk4-slip-x { background: none; border: none; color: var(--muted); font-size: 14px; padding: 2px 6px; }
.yk4-slip-x:hover { color: var(--red); }
.yk4-slip-market { font-size: 12px; color: var(--muted); margin-top: 3px; }
.yk4-slip-price { font-size: 17px; font-weight: 800; color: var(--gold); margin-top: 5px; }
.yk4-slip-price.up { color: var(--green); }
.yk4-slip-price.down { color: var(--red); }
.yk4-slip-changed { font-size: 11px; color: var(--gold-deep); margin-top: 4px; }
.yk4-slip-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--muted); padding: 6px 2px; }
.yk4-slip-row b { color: var(--text); font-size: 15px; }
.yk4-slip-win b { color: var(--gold); font-size: 17px; }
.yk4-stake-input {
  width: 110px; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 8px 10px;
  font-size: 15px; font-weight: 700; text-align: right; outline: none;
}
.yk4-stake-input:focus { border-color: var(--gold); }
.yk4-place { width: 100%; margin-top: 12px; padding: 13px; font-size: 15px; }

/* ---------- GİRİŞ MODALI ---------- */
.yk4-modal { position: fixed; inset: 0; background: rgba(5,5,9,.72); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 300; }
.yk4-modal.open { display: flex; }
.yk4-modal-card {
  position: relative; width: 380px; max-width: 92vw;
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 14px; padding: 28px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.65);
  animation: yk4-pop .22s ease;
}
@keyframes yk4-pop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.yk4-modal-title { font-size: 20px; font-weight: 800; letter-spacing: .06em; margin-bottom: 18px; }
.yk4-modal-input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 9px; padding: 12px 14px;
  font-size: 15px; margin-bottom: 12px; outline: none;
}
.yk4-modal-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,184,75,.12); }
.yk4-modal-err { color: var(--red); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.yk4-modal-close { position: absolute; top: 12px; right: 12px; background: none; border: none; color: var(--muted); font-size: 17px; padding: 6px; }
.yk4-modal-close:hover { color: var(--text); }

/* ---------- MOBİL ALT BAR + SHEET ---------- */
.yk4-mnav { display: none; }
.yk4-slip-badge {
  background: var(--red); color: #fff; border-radius: 12px;
  font-size: 10px; font-weight: 800; padding: 1px 6px; margin-left: 5px;
}

/* ---------- TOAST ---------- */
.yk4-toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.yk4-toast {
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 9px; padding: 11px 20px; font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateY(10px); transition: all .28s;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: 90vw;
}
.yk4-toast.show { opacity: 1; transform: none; }
.yk4-toast.err { border-left-color: var(--red); }
.yk4-toast.ok { border-left-color: var(--green); }

.yk4-empty { padding: 34px 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- DUYARLI ---------- */
@media (max-width: 1023px) {
  .yk4-topbar { height: 56px; padding: 0 12px; gap: 10px; }
  .yk4-logo img { height: 34px; }
  .yk4-tabs { overflow-x: auto; }
  .yk4-tab { padding: 18px 10px; font-size: 13px; }
  #yk4-layout-body { padding: 10px 10px 84px; }
  .yk4-hero { padding: 10px 10px 0; }
  .yk4-hero-track { height: 168px; }
  .yk4-sports { grid-template-columns: 1fr; }
  .yk4-tree { position: static; max-height: 260px; }
  .yk4-game { grid-template-columns: 62px 1fr; grid-template-rows: auto auto; row-gap: 8px; padding: 10px; }
  .yk4-odds { grid-column: 1 / -1; }
  .yk4-odd { flex: 1; width: auto; }
  .yk4-slip {
    top: auto; left: 0; right: 0; bottom: 0; width: auto;
    border-radius: 16px 16px 0 0; max-height: 78vh;
    transform: translateY(105%); transition: transform .25s ease;
  }
  body.yk4-sheet-open .yk4-slip { transform: none; }
  .yk4-sheet-close { display: block; position: absolute; top: 8px; right: 12px; background: none; border: none; color: var(--muted); font-size: 18px; z-index: 2; }
  .yk4-mnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: rgba(13,13,19,.96); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(232,184,75,.25);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .yk4-mtab {
    flex: 1; background: none; border: none; color: var(--muted);
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
    padding: 8px 2px; display: flex; align-items: center; justify-content: center;
  }
  .yk4-mtab.active { color: var(--gold); }
  .yk4-page.active { margin-right: 0; }
  .yk4-casino-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 9px; }
}
