/* games: şans kartı (kazı kazan / çark) + piyango */

.g-section { margin-top: 30px; }
.g-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.g-sec-head h2 { margin: 0; font-size: clamp(20px, 2.6vw, 24px); }
.g-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.gold { color: var(--gold); }

/* ---------- büyük kazanç bandı */
.g-ticker { display: flex; align-items: stretch; border: 1px solid rgba(255, 207, 90, .22); border-radius: 14px; overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 207, 90, .08), rgba(47, 208, 138, .05)); margin-bottom: 18px; }
.g-ticker-label { flex: none; display: flex; align-items: center; padding: 0 14px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em;
  color: #241600; background: var(--grad-gold); white-space: nowrap; }
.g-ticker-view { flex: 1; min-width: 0; overflow: hidden; position: relative; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.g-ticker-track { display: inline-flex; gap: 34px; padding: 10px 0; white-space: nowrap; animation: g-marquee linear infinite; will-change: transform; }
.g-ticker:hover .g-ticker-track { animation-play-state: paused; }
.g-tick { font-size: 13.5px; color: #c6cddb; }
.g-tick .n { color: var(--text); }
.g-tick .p { color: var(--gold); }
@keyframes g-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- kart kutuları */
.g-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 18px; }
.g-card { position: relative; overflow: hidden; }
.g-cards > .card, .g-section > .card, #g-lottery > .card { margin-top: 0; }
/* çark kartı geniş ekranda tüm satırı kaplar (çark küçülmesin) */
.g-cards > .g-card.is-wheel { grid-column: 1 / -1; }
.g-card.is-wheel .g-card-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.g-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.g-card-title { display: flex; gap: 12px; align-items: center; min-width: 0; }
.g-card-title h3 { margin: 0; }
.g-card-title p { margin: 2px 0 0; }
.g-card-emoji { font-size: 30px; width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border); }
.g-card-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.g-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.g-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.g-actions .g-play { min-width: 210px; }
.g-meta { text-align: center; }

/* ---------- kazı kazan */
.g-scratch { position: relative; width: 100%; max-width: 360px; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, #2a2f45 0%, #121624 70%); border: 1px solid var(--border-2);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .02), var(--shadow); user-select: none; -webkit-user-select: none; }
.g-scratch::before { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(255, 207, 90, .25); border-radius: 11px; pointer-events: none; }
.g-prize { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 18px; }
.g-prize-in { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.g-prize-in b { font-size: clamp(17px, 3.6vw, 22px); line-height: 1.2; }
.g-prize-emoji { font-size: clamp(36px, 8vw, 48px); filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .4)); }
.g-prize.win .g-prize-in b { color: var(--emerald); }
.g-prize.big { background: radial-gradient(circle at 50% 40%, rgba(255, 207, 90, .25), transparent 70%); }
.g-prize.big .g-prize-in b { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-prize.lose .g-prize-in b { color: var(--muted); }
.g-scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity .6s var(--ease), transform .6s var(--ease); touch-action: pan-y; }
.g-scratch.live canvas { cursor: crosshair; touch-action: none; }
.g-scratch.live { box-shadow: 0 0 0 2px rgba(255, 207, 90, .55), var(--glow-gold); animation: g-pulse 1.6s ease-in-out infinite; }
.g-scratch canvas.gone { opacity: 0; transform: scale(1.04); pointer-events: none; }
@keyframes g-pulse { 50% { box-shadow: 0 0 0 4px rgba(255, 207, 90, .25), var(--glow-gold); } }

/* ---------- çark */
.g-wheel-wrap { position: relative; width: min(340px, 100%); aspect-ratio: 1; margin: 14px auto 4px; }
.g-wheel { position: absolute; inset: 0; border-radius: 50%; border: 6px solid #3a2a0c; overflow: hidden;
  box-shadow: 0 0 0 3px rgba(255, 207, 90, .7), 0 0 40px -6px rgba(255, 190, 70, .45), inset 0 0 30px rgba(0, 0, 0, .55);
  transform: rotate(0deg); will-change: transform; }
.g-wheel::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, .35) 100%); }
.g-wline { position: absolute; left: 50%; top: 0; width: 1px; height: 50%; margin-left: -.5px; background: rgba(255, 207, 90, .28); transform-origin: 50% 100%; }
.g-wseg { position: absolute; left: 50%; top: 50%; width: 50%; height: 30px; margin-top: -15px; transform-origin: 0 50%;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 9%; pointer-events: none; }
.g-wseg span { max-width: 78%; font-size: clamp(10px, 2.6vw, 12.5px); font-weight: 700; color: #e9edf5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.g-wseg span b { font-size: 1.25em; margin-right: 2px; }
.g-wseg.big span { color: var(--gold); }
.g-wseg.none span { color: var(--muted); }
.g-pointer { position: absolute; left: 50%; top: -14px; z-index: 3; width: 0; height: 0; transform: translateX(-50%);
  border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 28px solid var(--gold);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
.g-hub { position: absolute; left: 50%; top: 50%; z-index: 2; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; font-size: clamp(20px, 5vw, 28px); background: radial-gradient(circle at 35% 30%, #ffe9a8, #e8a53a 60%, #9a6414);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .55), inset 0 2px 4px rgba(255, 255, 255, .5); border: 3px solid #3a2a0c; }

/* ---------- sonuç */
.g-result { width: 100%; max-width: 380px; display: none; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.g-result.show { display: flex; animation: g-pop .45s var(--ease); }
.g-result.win { border-color: rgba(47, 208, 138, .4); background: rgba(47, 208, 138, .08); }
.g-result.big { border-color: rgba(255, 207, 90, .55); background: rgba(255, 207, 90, .1); box-shadow: var(--glow-gold); }
.g-result.lose { opacity: .92; }
.g-r-emoji { font-size: 30px; flex: none; }
.g-result b { display: block; }
@keyframes g-pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- olasılık tablosu */
.g-odds { border: 1px solid var(--border); border-radius: 14px; padding: 14px 14px 12px; background: rgba(0, 0, 0, .15); min-width: 0; }
.g-odds-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.g-odds-head h4 { margin: 0; font-size: 14px; }
.g-table { font-size: 13.5px; }
.g-table td { padding: 7px 4px; border-top: 1px solid var(--border); vertical-align: middle; }
.g-table tr:first-child td { border-top: 0; }
.g-table td.num { text-align: right; white-space: nowrap; width: 1%; }
.g-table td.num b { display: block; font-variant-numeric: tabular-nums; }
.g-table tr.big td:first-child { color: var(--gold); }
.g-pe { display: inline-block; width: 22px; text-align: center; }
.g-bar { display: block; width: 74px; height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 3px; overflow: hidden; margin-left: auto; }
.g-bar i { display: block; height: 100%; background: var(--grad-emerald); border-radius: 4px; }
.g-table tr.big .g-bar i { background: var(--grad-gold); }

/* ---------- konfeti */
.g-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.g-confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; opacity: 0; animation: g-fall 2s ease-in forwards; }
@keyframes g-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--x), 560px) rotate(var(--r)); }
}

/* ---------- piyango */
.g-lottery { position: relative; overflow: hidden; }
.g-lot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 26px; align-items: center; }
.g-lot-main { text-align: center; padding: 10px 6px; border-radius: 16px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 207, 90, .14), transparent 70%); }
.g-pot-label { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.g-pot { font-size: clamp(34px, 6vw, 52px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-pot .cur { font-size: .42em; -webkit-text-fill-color: var(--gold); }
.g-gift { display: inline-block; font-size: 13px; font-weight: 700; color: #cdb3ff; background: rgba(176, 130, 255, .1);
  border: 1px solid rgba(176, 130, 255, .25); border-radius: 999px; padding: 4px 12px; margin-bottom: 6px; }
.g-count { margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.g-clock { font-family: var(--mono); font-size: clamp(24px, 4.6vw, 34px); font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.g-clock.drawing { font-family: var(--font); font-size: 20px; color: var(--gold); animation: blink 1.4s infinite; }
.g-lot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.g-lot-stats > div { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.g-lot-stats span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.g-lot-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.g-buy { display: flex; gap: 10px; align-items: stretch; }
.g-buy .qty { flex: none; }
.g-buy .btn { flex: 1; }
.g-buy-note { margin-top: 8px; }
.g-rules { margin-top: 12px; line-height: 1.55; }
.g-winners { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.g-winners h4 { margin: 0 0 10px; font-size: 14px; }
.g-win-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.g-win { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 0; }
.g-win > div { flex: 1; min-width: 0; }
.g-win > div b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-win-prize { font-weight: 800; color: var(--gold); white-space: nowrap; font-size: 14px; }

/* ---------- alt bilgi / bilgilendirme */
.g-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.g-foot > div { flex: 1; min-width: 220px; }
.g-notice { margin: 6px 0 12px; padding-left: 20px; color: #c6cddb; }
.g-notice li { margin: 6px 0; }

/* ---------- ana sayfa tanıtımı */
.g-teaser { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; max-width: 980px; margin: 0 auto; }
.g-teaser > .card { margin-top: 0; }
.g-teaser-card { display: flex; align-items: center; gap: 14px; color: var(--text); transition: transform .25s var(--ease), border-color .25s; }
.g-teaser-card:hover { transform: translateY(-3px); border-color: rgba(255, 207, 90, .35); color: var(--text); }
.g-teaser-card > div { flex: 1; min-width: 0; }
.g-teaser-card h3 { margin: 0 0 2px; font-size: 16px; }
.g-teaser-card .btn { flex: none; }
.g-t-emoji { font-size: 34px; flex: none; }
.g-t-clock { font-family: var(--mono); }

.g-hist-stats { margin-bottom: 18px; }
.g-admin-stats { margin-top: 16px; }
.g-admin-stats .card { background: var(--surface); }

@media (max-width: 860px) {
  .g-card-body { grid-template-columns: 1fr; }
  .g-lot-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  .g-actions .g-play { min-width: 0; width: 100%; }
  .g-lot-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-buy { flex-direction: column; }
  .g-buy .qty { align-self: center; }
  .g-card-head { flex-wrap: wrap; }
  .g-ticker-label { padding: 0 10px; font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-ticker-track { animation: none; }
  .g-scratch.live { animation: none; }
}
