:root {
    --bg-0: #04030d;
    --bg-1: #0b1130;
    --bg-2: #0d163f;
    --panel: rgba(10, 17, 48, 0.76);
    --line: rgba(133, 155, 255, 0.2);
    --text-1: #f8fbff;
    --text-2: rgba(232, 240, 255, 0.72);
    --gold: #f6d56d;
    --gold-2: #ffefad;
    --gold-deep: #b88513;
    --electric: #77a6ff;
    --shadow: 0 30px 90px rgba(3, 7, 22, 0.6);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --font-display: "Cinzel", serif;
    --font-body: "Host Grotesk", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
    font-family: var(--font-body);
    color: var(--text-1);
    background: radial-gradient(ellipse at 50% 0%, #0b1537 0%, #05052f 45%, #020214 100%);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 140px 140px;
    opacity: 0.35;
    z-index: 0;
}

body.is-shaking { animation: bodyShake 0.42s cubic-bezier(.36,.07,.19,.97) infinite; }
body.is-bursting { animation: bodyFlash 0.6s ease both; }

@keyframes bodyShake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes bodyFlash {
    0% { filter: brightness(1); }
    15% { filter: brightness(1.4) saturate(1.1); }
    100% { filter: brightness(1); }
}

/* === Aurora background === */
.aurora {
    position: fixed;
    inset: -30% -10% -10% -10%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 40% at 20% 10%, rgba(246, 213, 109, 0.15), transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 15%, rgba(119, 166, 255, 0.18), transparent 65%),
        radial-gradient(ellipse 70% 50% at 50% 110%, rgba(162, 120, 255, 0.14), transparent 65%);
    animation: auroraDrift 24s ease-in-out infinite alternate;
    /* blur 12 → 6: full-screen blur masaüstünde her frame ciddi GPU yiyordu;
       gradient'in doğal yumuşaklığı zaten cilalı görünmesini sağlıyor.
       will-change kaldırıldı: animasyon zaten transform üzerinden promote eder */
    filter: blur(6px);
}
@keyframes auroraDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(-2%, 1%, 0) scale(1.04); }
    100% { transform: translate3d(2%, -1%, 0) scale(1); }
}

/* === Lightning storm === */
.storm-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.storm-layer span {
    position: absolute;
    width: 2px;
    height: 180px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(199, 221, 255, 0.95), rgba(119, 166, 255, 0));
    opacity: 0;
    filter: drop-shadow(0 0 18px rgba(119, 166, 255, 0.8));
}

/* === Layout === */
.page-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
    position: relative;
    z-index: 2;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.stage-card,
.side-panel {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, rgba(13, 22, 63, 0.72), rgba(5, 8, 24, 0.92));
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    /* 18 → 10: backdrop-filter her composite'ta arka pikselleri okuyup blur
       ediyor; geniş card alanlarında masaüstünde click→paint gecikmesinin
       en büyük sebebiydi. 10px hâlâ glassy görünüm veriyor. */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.stage-card { padding: 28px 28px 34px; }
.side-panel { padding: 26px; display: flex; flex-direction: column; gap: 20px; }

@media (min-width: 1081px) {
    .side-panel { position: sticky; top: 28px; align-self: start; }
}

/* === Heading === */
.stage-heading { text-align: center; margin-bottom: 22px; position: relative; z-index: 3; }

.dede-logo {
    display: block;
    width: clamp(84px, 13vw, 140px);
    height: auto;
    margin: 0 auto 12px;
    /* Çift drop-shadow her composite'ta 2 ayrı blur pass demektir; tek
       birleşik shadow ile aynı görsel etkiye yakın, yarı maliyetle. */
    filter: drop-shadow(0 4px 18px rgba(220, 195, 130, 0.4));
    user-select: none;
    -webkit-user-drag: none;
}

/* Logo → kese yıldırımı için stage-card'ı kaplayan canvas. Hem header'daki
   logo hem stage'deki kese aynı koordinat sisteminde, böylece yıldırım
   header'dan stage'e kesintisiz çizilir. */
.logo-bolt-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
}

.eyebrow {
    display: block;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.title-gold {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 5.4vw, 3.4rem);
    margin: 0 0 12px;
    letter-spacing: 0.08em;
    line-height: 1;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.06em;
}
/* Önce her harf ayrı bir background-clip:text + animasyon layer'ı idi —
   11 harf × infinite animation compositor'ı sürekli meşgul ediyordu.
   Şimdi tek statik altın renk + text-shadow ile aynı sıcak görünüm,
   sıfır per-frame iş. */
.title-gold .letter, .title-gold .amp {
    display: inline-block;
    color: var(--gold);
    text-shadow:
        0 1px 0 rgba(120, 80, 0, 0.6),
        0 2px 18px rgba(246, 213, 109, 0.4);
}
.title-gold .amp { margin: 0 0.15em; }

.tagline {
    margin: 0;
    color: var(--text-2);
    font-size: 1rem;
    letter-spacing: 0.04em;
    /* flashTagline farklı uzunluktaki mesajlar koyduğunda 1→2 satır geçişi
       page'i kaydırıyordu; 2 satır boşluğu rezerve et */
    min-height: 2.6em;
}

/* === Stage === */
.stage {
    position: relative;
    min-height: 520px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 245, 198, 0.10), transparent 38%),
        radial-gradient(circle at 50% 42%, rgba(91, 127, 255, 0.10), transparent 58%),
        linear-gradient(180deg, rgba(6, 10, 29, 0.95), rgba(7, 12, 32, 0.72));
    overflow: hidden;
    display: grid;
    place-items: center;
    /* İçindeki canvas animasyonları sayfanın geri kalanını repaint etmesin */
    contain: layout paint;
}

.stage-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Burst partikülleri canvas yerine GPU-composited DOM element olarak çiziliyor.
   Tek parent stacking context (.fx-layer) altında her partikül kendi
   transform/opacity animasyonunu compositor'da çalıştırıyor → JS'in her
   frame iş yapması elimine edildi. */
.fx-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
    transform: translateZ(0); /* stacking context, alt elementler ayrı katman */
}

.fx-spark, .fx-shard, .fx-coin, .fx-ring {
    position: absolute;
    pointer-events: none;
    will-change: transform, opacity;
    transform: translate(-50%, -50%);
}

.fx-spark {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #ffe28a 55%, rgba(255,210,80,0) 100%);
}
.fx-spark.is-blue {
    background: radial-gradient(circle, #fff 0%, #c8dbff 55%, rgba(180,210,255,0) 100%);
}

.fx-coin {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 36%, #fff7cf 0%, #f6d56d 50%, #7a5410 100%);
    border: 1px solid rgba(80,50,0,0.55);
    box-sizing: border-box;
}
.fx-coin.is-silver {
    background: radial-gradient(circle at 38% 36%, #eaf4ff 0%, #a4c6ff 50%, #2a3d88 100%);
    border-color: rgba(30,40,90,0.55);
}

.fx-ring {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid rgba(255,236,168,0.7);
}
.fx-ring.is-blue {
    border-color: rgba(190,215,255,0.65);
    border-width: 2px;
}

/* Shard'lar SVG bg-image ile — gradient + dark stroke birlikte. 6 farklı şekil. */
.fx-shard {
    width: 28px;
    height: 28px;
    background-repeat: no-repeat;
    background-size: contain;
}

/* Halo rings */
.halo {
    position: absolute;
    top: 50%; left: 50%;
    width: 360px; height: 360px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(246, 213, 109, 0.18), rgba(246, 213, 109, 0) 62%);
    z-index: 1;
    pointer-events: none;
    animation: haloPulse 3.4s ease-in-out infinite;
    will-change: transform, opacity;
}
.halo--outer {
    width: 560px; height: 560px;
    background: radial-gradient(circle at center, rgba(119, 166, 255, 0.10), transparent 65%);
    animation-duration: 5s;
    animation-delay: 0.4s;
}
@keyframes haloPulse {
    0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.06); }
}

/* === Pouch === */
.pouch-wrap {
    position: relative;
    z-index: 3;
    width: min(320px, 62%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    /* Çift drop-shadow — pouch animasyon yaparken her frame iki ayrı blur
       pass'i çalışıyordu. Tek birleşik gölge (warm cast) ile hem profundite
       hem altın aurası verecek şekilde sadeleştirildi. */
    filter: drop-shadow(0 24px 36px rgba(60, 40, 0, 0.55));
    /* pouch sürekli transform animasyonunda — kendi compositing layer'ında
       tutmak GPU'ya atıyor, ana thread bloklanmıyor */
    will-change: transform;
}

.pouch {
    width: 100%;
    height: auto;
    transform-origin: 50% 70%;
    animation: pouchIdle 3.5s ease-in-out infinite;
    transition: transform 0.2s ease;
    will-change: transform;
}
@keyframes pouchIdle {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-8px) rotate(2deg); }
}

.pouch-wrap.is-charging .pouch { animation: pouchCharge 0.16s linear infinite; }
@keyframes pouchCharge {
    0%   { transform: translate(-2px, -1px) rotate(-4deg); }
    25%  { transform: translate(3px, 1px)  rotate(3deg); }
    50%  { transform: translate(-3px, -2px) rotate(-5deg); }
    75%  { transform: translate(2px, 2px) rotate(4deg); }
    100% { transform: translate(-1px, 0)  rotate(-2deg); }
}

.pouch-wrap.is-shaking .pouch { animation: pouchShake 0.08s linear infinite; }
@keyframes pouchShake {
    0%   { transform: translate(-6px, -3px) rotate(-10deg) scale(1.02); }
    25%  { transform: translate(7px, 2px)   rotate(8deg)  scale(1.04); }
    50%  { transform: translate(-8px, -5px) rotate(-12deg) scale(1.02); }
    75%  { transform: translate(6px, 4px)   rotate(11deg) scale(1.05); }
    100% { transform: translate(-3px, 0)    rotate(-6deg) scale(1.02); }
}

.pouch-wrap.is-burst .pouch {
    animation: pouchBurst 0.9s cubic-bezier(.4, 1.6, .6, 1) forwards;
}
@keyframes pouchBurst {
    0%   { transform: scale(1);    opacity: 1; }
    20%  { transform: scale(1.22); opacity: 1; filter: brightness(2.2); }
    35%  { transform: scale(1.5);  opacity: 0; filter: brightness(3); }
    100% { transform: scale(0.6);  opacity: 0; }
}

/* Modal kapandıktan sonra yeni kese yukarıdan düşüp 2 sek ile yere oturur */
.pouch-wrap.is-dropping .pouch {
    animation: pouchDrop 1.05s cubic-bezier(.4, 0, .8, .35) forwards;
    transform-origin: 50% 100%;
}
@keyframes pouchDrop {
    0%   { transform: translateY(-260%) scale(0.85) rotate(-9deg); opacity: 0; }
    8%   { opacity: 1; }
    38%  { transform: translateY(0)    scale(1.08) rotate(3deg); }    /* ilk yere çarpma */
    50%  { transform: translateY(-26%) scale(0.94) rotate(-3deg); }   /* yukarı sek */
    62%  { transform: translateY(0)    scale(1.05) rotate(2deg); }    /* ikinci çarpma */
    74%  { transform: translateY(-9%)  scale(0.99) rotate(-1deg); }   /* küçük sek */
    86%  { transform: translateY(0)    scale(1.02) rotate(0); }
    100% { transform: translateY(0)    scale(1)    rotate(0); opacity: 1; }
}

/* === Burst rays === */
.burst {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    pointer-events: none;
    opacity: 0;
    z-index: 4;
}
.burst.is-on { opacity: 1; }
.burst .ray {
    position: absolute;
    top: 0; left: 0;
    width: 14px; height: 360px;
    margin-left: -7px;
    background: linear-gradient(180deg, rgba(255, 245, 170, 0) 0%, rgba(255, 245, 170, 0.9) 40%, rgba(246, 213, 109, 0) 100%);
    transform-origin: 50% 0%;
    filter: blur(1px);
    opacity: 0;
}
.burst.is-on .ray {
    animation: rayFlash 0.9s cubic-bezier(.2, .7, .2, 1) forwards;
}
.burst .ray:nth-child(1) { transform: translateY(0) rotate(0deg); }
.burst .ray:nth-child(2) { transform: translateY(0) rotate(30deg); }
.burst .ray:nth-child(3) { transform: translateY(0) rotate(60deg); }
.burst .ray:nth-child(4) { transform: translateY(0) rotate(90deg); }
.burst .ray:nth-child(5) { transform: translateY(0) rotate(120deg); }
.burst .ray:nth-child(6) { transform: translateY(0) rotate(150deg); }
.burst .ray:nth-child(7) { transform: translateY(0) rotate(180deg); }
.burst .ray:nth-child(8) { transform: translateY(0) rotate(210deg); }
.burst .ray:nth-child(9) { transform: translateY(0) rotate(240deg); }
.burst .ray:nth-child(10){ transform: translateY(0) rotate(270deg); }
.burst .ray:nth-child(11){ transform: translateY(0) rotate(300deg); }
.burst .ray:nth-child(12){ transform: translateY(0) rotate(330deg); }

@keyframes rayFlash {
    0%   { opacity: 0; transform-origin: 50% 0%; scale: 0.2 0.3; }
    30%  { opacity: 1; scale: 1 1; }
    100% { opacity: 0; scale: 1 1.4; }
}

/* === Shake hint === */
.shake-hint {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(6, 10, 29, 0.8);
    border: 1px solid rgba(246, 213, 109, 0.35);
    color: var(--gold-2);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    box-shadow: 0 0 30px rgba(246, 213, 109, 0.18);
    animation: hintPulse 1.8s ease-in-out infinite;
}
.shake-hint i { animation: iconWiggle 1.5s ease-in-out infinite; }
@keyframes hintPulse {
    0%, 100% { transform: translateX(-50%) scale(1);    box-shadow: 0 0 20px rgba(246,213,109,0.2); }
    50%      { transform: translateX(-50%) scale(1.04); box-shadow: 0 0 36px rgba(246,213,109,0.45); }
}
@keyframes iconWiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-18deg); }
    75% { transform: rotate(18deg); }
}

/* === Shake meter === */
.shake-meter {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    color: var(--text-2);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.shake-meter.is-active { display: flex; }

.shake-meter-track {
    width: 140px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}
.shake-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffefad, #f6d56d 50%, #d1a11a);
    box-shadow: 0 0 14px rgba(246, 213, 109, 0.6);
    transition: width 0.08s linear;
}

/* === Prize reveal === */
.prize-reveal {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at center, rgba(6, 10, 29, 0.72), rgba(2, 4, 14, 0.95));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.prize-reveal[hidden] { display: none; }

/* === Confirm modal (hak satın alma onay/hata) === */
.confirm-modal {
    position: absolute;
    inset: 0;
    z-index: 25;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(ellipse at center, rgba(6, 10, 29, 0.78), rgba(2, 4, 14, 0.96));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.confirm-modal[hidden] { display: none; }
.confirm-modal.is-open { opacity: 1; }
.confirm-card {
    width: min(420px, 100%);
    padding: 32px 28px 24px;
    border-radius: 26px;
    text-align: center;
    background: linear-gradient(180deg, rgba(24, 38, 94, 0.98), rgba(9, 14, 36, 0.98));
    border: 1px solid rgba(133, 155, 255, 0.22);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 0 24px rgba(133, 155, 255, 0.06);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(.2, 1.2, .4, 1);
}
.confirm-modal.is-open .confirm-card { transform: scale(1) translateY(0); }
.confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.confirm-icon--gold {
    background: linear-gradient(135deg, #ffefad, #f6d56d 50%, #d1a11a);
    color: #08112f;
}
.confirm-icon--warn {
    background: linear-gradient(135deg, #fda4af, #f87171 50%, #b91c1c);
    color: #fff5f5;
}
.confirm-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text-1);
    letter-spacing: 0.02em;
}
.confirm-text {
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 22px;
}
.confirm-text strong { color: var(--gold); font-weight: 700; }
.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.confirm-actions--single { justify-content: center; }
.confirm-btn {
    flex: 1;
    padding: 13px 18px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.confirm-btn--ok {
    background: linear-gradient(135deg, #ffefad, #f6d56d 48%, #d1a11a);
    color: #08112f;
    box-shadow: 0 12px 28px rgba(246, 213, 109, 0.25);
}
.confirm-btn--ok:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(246, 213, 109, 0.35); }
.confirm-btn--cancel {
    background: rgba(133, 155, 255, 0.08);
    color: var(--text-2);
    border: 1px solid rgba(133, 155, 255, 0.2);
}
.confirm-btn--cancel:hover { background: rgba(133, 155, 255, 0.16); color: var(--text-1); }
.confirm-actions--single .confirm-btn { flex: 0 1 200px; }

.prize-card {
    width: min(380px, 86%);
    padding: 36px 32px 28px;
    border-radius: 28px;
    text-align: center;
    background: linear-gradient(180deg, rgba(24, 38, 94, 0.98), rgba(9, 14, 36, 0.98));
    border: 2px solid rgba(246, 213, 109, 0.55);
    box-shadow:
        0 0 80px rgba(246, 213, 109, 0.35),
        0 30px 80px rgba(0,0,0,0.6),
        inset 0 0 24px rgba(246, 213, 109, 0.1);
    transform: scale(0.4) rotateY(180deg);
    opacity: 0;
    position: relative;
}
.prize-reveal.is-open .prize-card {
    animation: cardIn 0.9s cubic-bezier(.2, 1.2, .4, 1) forwards;
}
@keyframes cardIn {
    0%   { transform: scale(0.3) rotateY(220deg); opacity: 0; }
    50%  { opacity: 1; }
    80%  { transform: scale(1.08) rotateY(-8deg); }
    100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.prize-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 28px;
    padding: 2px;
    background: linear-gradient(135deg, #fff6c7, #f6d56d 40%, #77a6ff, #f6d56d 80%, #fff6c7);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: borderSpin 4s linear infinite;
    pointer-events: none;
}
@keyframes borderSpin {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.prize-tier {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(246, 213, 109, 0.45);
    background: rgba(246, 213, 109, 0.08);
    margin-bottom: 18px;
}
.prize-card[data-tier="bronze"] .prize-tier    { color: #d9a16a; border-color: rgba(217,161,106,0.45); background: rgba(217,161,106,0.08); }
.prize-card[data-tier="silver"] .prize-tier    { color: #e3ecf8; border-color: rgba(227,236,248,0.45); background: rgba(227,236,248,0.08); }
.prize-card[data-tier="gold"] .prize-tier      { color: var(--gold); }
.prize-card[data-tier="legendary"] .prize-tier { color: #ffb7ff; border-color: rgba(255,183,255,0.55); background: rgba(255,183,255,0.12); text-shadow: 0 0 12px rgba(255,183,255,0.6); }
.prize-card[data-tier="empty"] .prize-tier     { color: #a6b3d4; border-color: rgba(166,179,212,0.4); background: rgba(166,179,212,0.08); }

.prize-crown {
    font-size: 2.6rem;
    color: var(--gold);
    margin-bottom: 10px;
    filter: drop-shadow(0 0 16px rgba(246, 213, 109, 0.6));
    animation: crownFloat 2.6s ease-in-out infinite;
}
@keyframes crownFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-6px) rotate(3deg); }
}

.prize-amount {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 4.6rem;
    line-height: 1;
    background: linear-gradient(180deg, #fff9dd 0%, #f6d56d 55%, #b88513 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(246, 213, 109, 0.4);
    margin-top: 6px;
}
.prize-card[data-tier="empty"] .prize-amount { font-size: 2.2rem; }

.prize-currency {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--gold-2);
    margin-top: -4px;
    letter-spacing: 0.24em;
}
.prize-card[data-tier="empty"] .prize-currency { display: none; }

.prize-label {
    margin: 18px 0 22px;
    color: var(--text-2);
    font-size: 1rem;
    letter-spacing: 0.04em;
    word-break: break-word;
    hyphens: auto;
}

.prize-claim { width: 100%; justify-content: center; }

/* === Side panel: lives === */
.lives-panel {
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(246, 213, 109, 0.18);
    background: linear-gradient(180deg, rgba(246, 213, 109, 0.06), rgba(246, 213, 109, 0.0));
}
.lives-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.lives-count {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    color: var(--gold);
    min-width: 44px;
    text-align: center;
    text-shadow: 0 0 18px rgba(246, 213, 109, 0.4);
}
.lives-icons {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.life {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: grid; place-items: center;
    background: rgba(246, 213, 109, 0.14);
    border: 1px solid rgba(246, 213, 109, 0.3);
    color: var(--gold-2);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}
.life.used {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.16);
}

/* === Buttons === */
.actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.btn {
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
}
.btn:disabled { cursor: not-allowed; opacity: 0.55; transform: none !important; }
.btn-primary {
    color: #08112f;
    background: linear-gradient(135deg, #ffefad, #f6d56d 48%, #d1a11a);
    box-shadow: 0 16px 34px rgba(246, 213, 109, 0.28);
    flex: 1;
    justify-content: center;
}
.btn-secondary {
    color: var(--text-1);
    background: linear-gradient(135deg, rgba(24, 38, 94, 0.96), rgba(9, 14, 36, 0.96));
    border: 1px solid rgba(133, 155, 255, 0.26);
    box-shadow: 0 14px 28px rgba(5, 10, 28, 0.4);
    padding: 16px 18px;
}
.btn-primary:hover:not(:disabled),
.btn-secondary:hover:not(:disabled) { transform: translateY(-2px); }

/* Hak satın al — günlük ücretsiz hak bittikten sonra görünür */
.btn-buy {
    width: 100%;
    margin-top: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(52,211,153,0.18), rgba(16,185,129,0.22));
    color: #6ee7b7;
    border: 1px solid rgba(52,211,153,0.35);
    border-radius: 18px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-buy:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(52,211,153,0.18);
}
.btn-buy:disabled { cursor: not-allowed; opacity: 0.55; }
.btn-buy[hidden] { display: none !important; }

.btn-shake { position: relative; overflow: hidden; }
/* SALLA ↔ HAK YOK metinleri farklı genişlikte olduğu için tıklama anında
   span yer değiştirip CLS üretiyordu; min-width ile sabitliyoruz */
#shakeBtnText {
    display: inline-block;
    min-width: 7ch;
    text-align: center;
}
.btn-shake::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.45) 50%, transparent 80%);
    transform: translateX(-120%);
    animation: btnShine 2.6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes btnShine {
    0%   { transform: translateX(-120%); }
    55%  { transform: translateX(120%); }
    100% { transform: translateX(120%); }
}
.btn-shake.is-press i { animation: iconWiggle 0.4s linear infinite; }

/* === History === */
.history-block h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0 0 14px;
    color: var(--text-1);
    letter-spacing: 0.04em;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}
.history-list::-webkit-scrollbar { width: 6px; }
.history-list::-webkit-scrollbar-thumb { background: rgba(246,213,109,0.2); border-radius: 999px; }

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}
.history-item.is-win { border-color: rgba(246, 213, 109, 0.35); background: rgba(246, 213, 109, 0.06); }
.history-item.is-legendary { border-color: rgba(255, 183, 255, 0.45); background: rgba(255, 183, 255, 0.05); }
.history-item strong { color: var(--gold-2); font-weight: 700; }
.history-item.is-legendary strong { color: #ffb7ff; text-shadow: 0 0 8px rgba(255,183,255,0.6); }
.history-item span { color: var(--text-2); font-size: 0.8rem; }

.empty-state {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    color: var(--text-2);
    font-size: 0.9rem;
    text-align: center;
}

/* === Hint block === */
.hint-block {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(119, 166, 255, 0.08);
    border: 1px solid rgba(119, 166, 255, 0.18);
    color: var(--text-2);
    font-size: 0.85rem;
    line-height: 1.5;
}
.hint-block i { color: var(--gold); margin-top: 3px; }

/* === Guest lock === */
.stage-card--locked { position: relative; }
.guest-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 2, 20, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: var(--radius-xl);
}
.guest-modal {
    text-align: center;
    background: linear-gradient(145deg, rgba(15, 23, 62, 0.95), rgba(8, 12, 40, 0.98));
    border: 1px solid rgba(133, 155, 255, 0.25);
    border-radius: var(--radius-xl);
    padding: 50px 44px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 0 80px rgba(100, 140, 255, 0.15), 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: guestModalIn 0.5s ease-out;
}
.guest-modal-icon {
    font-size: 60px;
    color: var(--gold);
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(246, 213, 109, 0.5);
}
.guest-modal h2 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 14px; }
.guest-modal p { font-size: 1rem; color: var(--text-2); margin: 0; }

@keyframes guestModalIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* === Ready overlay (mobile audio + motion permission gate) === */
.ready-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse at center, rgba(6, 10, 29, 0.86), rgba(2, 4, 14, 0.96));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: var(--radius-xl);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.ready-overlay[hidden] { display: none; }
.ready-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.ready-modal {
    text-align: center;
    width: 100%;
    max-width: 380px;
    padding: 32px 26px 26px;
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(18, 28, 72, 0.98), rgba(8, 12, 40, 0.98));
    border: 1px solid rgba(246, 213, 109, 0.38);
    box-shadow:
        0 0 60px rgba(246, 213, 109, 0.2),
        0 30px 60px rgba(0, 0, 0, 0.55),
        inset 0 0 24px rgba(246, 213, 109, 0.05);
    animation: readyModalIn 0.45s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes readyModalIn {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ready-icon-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 4px auto 22px;
    display: grid;
    place-items: center;
}
.ready-icon {
    position: relative;
    z-index: 2;
    font-size: 42px;
    color: var(--gold);
    filter: drop-shadow(0 0 16px rgba(246, 213, 109, 0.55));
    animation: readyIconShake 1s ease-in-out infinite;
}
@keyframes readyIconShake {
    0%, 100% { transform: rotate(-8deg); }
    50%      { transform: rotate(10deg); }
}
.ready-wave {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(246, 213, 109, 0.55);
    animation: readyWave 1.8s ease-out infinite;
}
.ready-wave--2 { animation-delay: 0.7s; }
@keyframes readyWave {
    0%   { transform: scale(0.5); opacity: 1; }
    80%  { opacity: 0.05; }
    100% { transform: scale(1.8); opacity: 0; }
}

.ready-modal h2 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    color: var(--gold-2);
    margin: 0 0 10px;
    letter-spacing: 0.04em;
}

.ready-text {
    color: var(--text-2);
    font-size: 0.96rem;
    line-height: 1.55;
    margin: 0 0 20px;
}

.ready-features {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}
.ready-feature {
    flex: 1;
    padding: 12px 10px;
    border-radius: 14px;
    background: rgba(246, 213, 109, 0.08);
    border: 1px solid rgba(246, 213, 109, 0.22);
    color: var(--text-1);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.ready-feature i {
    color: var(--gold);
    font-size: 1.15rem;
    filter: drop-shadow(0 0 8px rgba(246, 213, 109, 0.4));
}

.ready-btn {
    width: 100%;
    justify-content: center;
    font-size: 1.05rem;
    padding: 16px 24px;
    position: relative;
    overflow: hidden;
}

.ready-hint {
    margin: 14px 0 0;
    font-size: 0.78rem;
    color: rgba(232, 240, 255, 0.55);
    letter-spacing: 0.02em;
}

/* === Responsive === */
@media (max-width: 1080px) {
    .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .page-shell { width: min(100% - 20px, 1220px); padding-top: 16px; }
    .stage-card { padding: 22px 20px 26px; }
    .side-panel { padding: 22px; }
    .stage { min-height: 440px; }
    .pouch-wrap { width: min(260px, 72%); }
    .dede-logo { width: clamp(72px, 22vw, 110px); margin-bottom: 8px; }
    .prize-amount { font-size: 3.6rem; }
    .halo { width: 280px; height: 280px; }
    .halo--outer { width: 420px; height: 420px; }
    .shake-hint { font-size: 0.85rem; padding: 8px 16px; }

    /* === Mobil-spesifik ağır efekt kısıtlamaları ===
       Test cihazlarında kasma kalıntısını tamamen bitirmek için dekoratif
       GPU yüklerini kesiyoruz. Pouch + ödül kartı hissiyatı korunur. */

    /* backdrop-filter mobilde (özellikle iOS Safari) GPU'yu çok yoruyor */
    .stage-card, .side-panel,
    .prize-reveal,
    .guest-overlay,
    .ready-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
    .prize-card::before { display: none; }

    /* Fullscreen blur + fixed = mobilde sürekli compositing yükü */
    .aurora { display: none; }
    /* Grid pattern fullpage — body shake'te fullpage repaint'e sebep */
    body::before { display: none; }

    /* Halo scale pulse mobilde compositing spike yapıyor — opacity korunur */
    .halo, .halo--outer { animation: none; opacity: 0.7; }

    /* Sayfayı komple translate3d ile sallamak mobilde tüm katmanları
       repaint ettiriyor. Pouch zaten kendi shake animasyonunda. */
    body.is-shaking { animation: none; }
    body.is-bursting { animation: none; }

    /* Pouch-wrap çift drop-shadow — shake'te her frame'de shadow hesabı.
       Daha ucuz tek drop-shadow bırakıyoruz; shake anında komple kapatıyoruz. */
    .pouch-wrap {
        filter: drop-shadow(0 18px 24px rgba(0,0,0,0.45));
    }
    .pouch-wrap.is-shaking,
    .pouch-wrap.is-charging {
        filter: none;
    }

    /* Buton shine animasyonu — sessiz ama sürekli compositing */
    .btn-shake::after { display: none; }
}

@media (hover: none) and (pointer: coarse) {
    /* Gradient hue-rotate prize card border: dramatic but heavy on touch devices */
    .prize-card::before { animation: none; }
}

/* === Prefers reduced motion ===
   Dekoratif animasyonları tamamen kes, bilgi veren hareketleri (ödül kartı
   geliş) kısalt. Oyunun anlaşılabilir olması korunur. */
@media (prefers-reduced-motion: reduce) {
    .aurora,
    .storm-layer,
    .pouch,
    .halo, .halo--outer,
    .shake-hint, .shake-hint i,
    .title-gold .letter, .title-gold .amp,
    .prize-card::before,
    .prize-crown,
    .ready-icon,
    .btn-shake::after,
    .pouch-wrap.is-charging .pouch,
    .pouch-wrap.is-shaking .pouch {
        animation: none !important;
    }
    .ready-wave { display: none; }
    body.is-shaking, body.is-bursting { animation: none; }
    .prize-reveal.is-open .prize-card {
        animation-duration: 0.24s;
        animation-timing-function: ease-out;
    }
    .pouch-wrap.is-burst .pouch { animation-duration: 0.3s; }
}
