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

.g-section { margin-top: 32px; }
.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: 21px; }
.g-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.gold { color: var(--accent-text); }

/* ---------- büyük kazanç bandı */
.g-ticker { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); margin-bottom: 18px; }
.g-ticker-label { flex: none; display: flex; align-items: center; padding: 0 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg-2); border-right: 1px solid var(--border); white-space: nowrap; }
.g-ticker-view { flex: 1; min-width: 0; overflow: hidden; position: relative; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.g-ticker-track { display: inline-flex; gap: 32px; padding: 9px 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: var(--text-2); }
.g-tick .n { color: var(--text); }
.g-tick .p { color: var(--accent-text); }
@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: 16px; }
.g-card { position: relative; overflow: hidden; }
.g-cards > .card, .g-section > .card, #g-lottery > .card { margin-top: 0; }
.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 { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--accent-text);
  background: var(--surface-2); border: 1px solid var(--border); }
.g-card-emoji .ico { width: 20px; height: 20px; }
.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: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-2); user-select: none; -webkit-user-select: none; }
.g-scratch::before { content: ""; position: absolute; inset: 8px; border: 1px dashed var(--border-2); border-radius: var(--radius-sm); 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: 20px; line-height: 1.2; }
.g-prize-emoji { font-size: 40px; line-height: 1; color: var(--muted); }
.g-prize-emoji .ico { width: 36px; height: 36px; }
.g-prize.win .g-prize-in b { color: var(--green); }
.g-prize.big .g-prize-in b { color: var(--gold-light); }
.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 .5s var(--ease); touch-action: pan-y; }
.g-scratch.live canvas { cursor: crosshair; touch-action: none; }
.g-scratch.live { border-color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-line); }
.g-scratch canvas.gone { opacity: 0; pointer-events: none; }

/* ---------- ç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: 4px solid var(--border-2); overflow: hidden;
  box-shadow: 0 0 0 1px var(--border-2); transform: rotate(0deg); will-change: transform; }
.g-wline { position: absolute; left: 50%; top: 0; width: 1px; height: 50%; margin-left: -.5px; background: rgba(255, 255, 255, .12); 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: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-wseg span b { font-size: 1.2em; margin-right: 2px; }
.g-wseg.big span { color: var(--gold-light); }
.g-wseg.none span { color: var(--muted); }
.g-pointer { position: absolute; left: 50%; top: -10px; z-index: 3; width: 0; height: 0; transform: translateX(-50%);
  border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--text); }
.g-hub { position: absolute; left: 50%; top: 50%; z-index: 2; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--surface-3); border: 3px solid var(--border-2); }

/* ---------- sonuç */
.g-result { width: 100%; max-width: 380px; display: none; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-2); }
.g-result.show { display: flex; animation: g-pop .25s ease-out; }
.g-result.win { border-color: var(--green-line); background: var(--green-soft); }
.g-result.big { border-color: rgba(var(--accent-rgb), .45); background: var(--accent-soft); }
.g-r-emoji { font-size: 24px; flex: none; }
.g-result b { display: block; }
@keyframes g-pop { from { opacity: 0; transform: translateY(4px); } }

/* ---------- olasılık tablosu */
.g-odds { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 14px 12px; background: var(--bg-2); 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); border-bottom: 0; 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-light); }
.g-pe { display: inline-block; width: 22px; text-align: center; }
.g-bar { display: block; width: 74px; height: 4px; border-radius: 2px; background: var(--surface-3); margin-top: 3px; overflow: hidden; margin-left: auto; }
.g-bar i { display: block; height: 100%; background: var(--accent-text); border-radius: 2px; }
.g-table tr.big .g-bar i { background: var(--gold-light); }

/* ---------- konfeti (sade) */
.g-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.g-confetti i { position: absolute; top: -12px; width: 6px; height: 10px; border-radius: 1px; 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: 24px; align-items: center; }
.g-lot-main { text-align: center; padding: 16px 8px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); }
.g-pot-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.g-pot { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0; color: var(--text); font-variant-numeric: tabular-nums; }
.g-pot .cur { font-size: .4em; color: var(--muted); font-weight: 500; }
.g-gift { display: inline-flex; align-items: center; height: 24px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border-2); border-radius: var(--radius-xs); padding: 0 8px; 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: 28px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.g-clock.drawing { font-family: var(--font); font-size: 18px; color: var(--accent-text); animation: blink 1.4s infinite; }
.g-lot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.g-lot-stats > div { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--bg-2); }
.g-lot-stats span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.g-lot-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.g-buy { display: flex; gap: 10px; align-items: stretch; }
.g-buy .qty { flex: none; height: 38px; }
.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: 8px; }
.g-win { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); 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: 650; color: var(--text); white-space: nowrap; font-size: 14px; }

/* ---------- alt bilgi / bilgilendirme */
.g-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.g-foot > div { flex: 1; min-width: 220px; }
.g-notice { margin: 6px 0 12px; padding-left: 20px; color: var(--text-2); }
.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: 12px; }
.g-teaser > .card { margin-top: 0; }
.g-teaser-card { display: flex; align-items: center; gap: 14px; color: var(--text); padding: 16px 18px; transition: border-color .15s; }
.g-teaser-card:hover { border-color: var(--border-2); color: var(--text); text-decoration: none; }
.g-teaser-card > div { flex: 1; min-width: 0; }
.g-teaser-card h3 { margin: 0 0 2px; font-size: 15px; }
.g-teaser-card .btn { flex: none; }
.g-t-emoji { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--text); background: var(--surface-2); border: 1px solid var(--border-2); }
.g-t-emoji .ico { width: 18px; height: 18px; }
.g-t-clock { font-family: var(--mono); }

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

@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; }
}
