/* MaxRoyalBet Çark — oyuncu sayfası
   Milyonerler, uygulama ve iletişim sayfalarıyla aynı dil: renkler ornek/renkler.css, tek aile DM Sans,
   yaprak köşeler, altın yalnızca vurgu. */

:root {
    --bg:        #10150B;
    --bg-2:      #151B0F;
    --panel:     #181F12;
    --panel-2:   #1F2716;
    --panel-3:   #262F1C;
    --line:      #2A3420;
    --line-2:    #3B482D;
    --gold:      #D4AF37;
    --gold-2:    #F3D27A;
    --gold-3:    #A9821F;
    --gold-grad: linear-gradient(180deg, #F6DC8A 0%, #D4AF37 45%, #B08A2A 100%);
    --gold-btn-text:  #171206;
    --gold-btn-inner: #8D6C1D;
    --text:      #E9E2CF;
    --text-2:    #B9B19C;
    --muted:     #7D7868;
    --ok:        #4ADE80;
    --font:      "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --r-leaf:    28px 10px 28px 10px;
    --ease-soft: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); font-size: 16px; line-height: 1.5;
    -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 560px at 30% -120px, rgba(74, 110, 54, 0.38), transparent 62%),
        radial-gradient(700px 480px at 100% 30%, rgba(44, 74, 32, 0.3), transparent 60%),
        linear-gradient(180deg, #121a0d 0%, #10150b 50%, #0d1209 100%);
    min-height: 100vh; overflow-x: hidden; }
body::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--gold); color: var(--gold-btn-text); }
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.app { max-width: 1080px; margin: 0 auto; padding: 0 16px 20px; }

/* ---- Üst şerit ---- */
.bar { display: flex; align-items: center; gap: 0.8rem; min-height: 64px; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.bar__logo { height: 26px; width: auto; display: block; }
.bar__tag { padding-left: 0.8rem; border-left: 1px solid var(--line-2); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.bar__end { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.who { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; font-weight: 600; color: var(--text-2); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2);
    background: rgba(24, 31, 18, 0.7); color: var(--gold-2); cursor: pointer; font-size: 1.15rem; transition: border-color 0.2s ease; }
.icon-btn:hover { border-color: var(--gold-3); }
@media (max-width: 420px) { .bar__tag { display: none; } }

/* ---- Yerleşim ---- */
.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; align-items: center; }
@media (min-width: 860px) { .stage { grid-template-columns: minmax(0, 1fr) 330px; gap: 2.4rem; } }
.wheel-col { display: flex; justify-content: center; }

/* ---- Çark ---- */
.wheel { position: relative; width: min(100%, 540px); aspect-ratio: 1; margin-top: 18px; isolation: isolate; }
.wheel::before { content: ""; position: absolute; inset: -6%; z-index: -1; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(212, 175, 55, 0.18), rgba(74, 110, 54, 0.12) 60%, transparent 72%); }
.wheel__canvas, .wheel__fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wheel__fx { pointer-events: none; z-index: 4; inset: -20%; width: 140%; height: 140%; }
.wheel__pointer { position: absolute; z-index: 3; left: 50%; top: -3.2%; width: 11%; transform-origin: 50% 34%;
    transform: translateX(-50%) rotate(var(--kick, 0deg)); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.55)); }
.wheel__pointer svg { display: block; width: 100%; height: auto; }
.wheel__hub { position: absolute; z-index: 2; left: 50%; top: 50%; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%);
    display: grid; place-items: center; border-radius: 50%;
    background: radial-gradient(circle at 50% 32%, #2b3d1e, #0f160a 72%);
    box-shadow: 0 0 0 3px #0c1108, 0 0 0 5px #C9A23A, 0 0 0 7px #6e5418, 0 10px 24px rgba(0, 0, 0, 0.6), inset 0 2px 6px rgba(255, 230, 160, 0.18); }
.wheel__hub img { width: 46%; height: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
body.is-loading .wheel__canvas { opacity: 0.35; }

/* Kazanç kartı ve kilit perdesi: çarkın üzerinde */
.result, .veil { position: absolute; z-index: 6; inset: 0; display: grid; place-items: center; }
.result__card, .veil__card { width: min(86%, 330px); padding: 1.6rem 1.4rem 1.4rem; text-align: center; border-radius: 30px 12px 30px 12px;
    background: linear-gradient(165deg, rgba(34, 44, 24, 0.97), rgba(12, 17, 8, 0.97)); border: 1px solid var(--gold-3);
    box-shadow: inset 0 0 0 5px rgba(16, 21, 11, 0.8), inset 0 0 0 6px rgba(212, 175, 55, 0.22), 0 30px 70px -20px rgba(0, 0, 0, 0.95); }
.result__kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.result__amount { margin-top: 0.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-size: clamp(2.6rem, 11vw, 3.6rem);
    background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result__amount small { margin-left: 0.3rem; font-size: 0.42em; letter-spacing: 0; }
.result__status { margin: 0.8rem auto 1.2rem; max-width: 17rem; font-size: 0.9rem; color: var(--text-2); }
.result .btn { width: 100%; }
.result:not([hidden]) .result__card { animation: pop 0.5s var(--ease-soft) both; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.92); } to { opacity: 1; transform: none; } }
.veil { background: radial-gradient(closest-side, rgba(10, 14, 7, 0.75), rgba(10, 14, 7, 0.35)); border-radius: 50%; }
.veil__ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 1.3rem; color: var(--gold-2);
    border: 1px solid var(--gold-3); background: var(--panel-2); }
.veil__title { margin-top: 0.7rem; font-weight: 700; font-size: 1.15rem; }
.veil__text { margin-top: 0.3rem; font-size: 0.9rem; color: var(--text-2); }

/* ---- Yan panel ---- */
.side { display: grid; gap: 1rem; align-content: start; width: 100%; max-width: 440px; margin: 0 auto; }
.mode-tag { justify-self: center; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.95rem; border-radius: 999px;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-2);
    border: 1px solid var(--line-2); background: rgba(24, 31, 18, 0.75); }
.mode-tag::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 0 100% 0 100%; background: var(--gold-grad); transform: rotate(-8deg); }
@media (min-width: 860px) { .mode-tag, .spins { justify-self: start; text-align: left; } }
.spins { display: grid; justify-items: center; text-align: center; }
@media (min-width: 860px) { .spins { justify-items: start; } }
.spins__n { font-size: clamp(3.4rem, 9vw, 4.6rem); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; color: var(--text); }
.spins__n.is-bump { animation: bump 0.7s var(--ease-soft); }
@keyframes bump { 30% { transform: scale(1.18); color: var(--gold-2); } }
.spins__l { margin-top: 0.3rem; font-size: 0.95rem; font-weight: 600; color: var(--text-2); }

.spin-btn { position: relative; width: 100%; min-height: 68px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--gold-grad); box-shadow: inset 0 0 0 1px var(--gold-btn-inner), inset 0 -4px 0 rgba(120, 88, 20, 0.55),
        0 16px 34px -14px rgba(212, 175, 55, 0.85);
    transition: transform 0.25s var(--ease-soft), filter 0.2s ease, box-shadow 0.2s ease; touch-action: manipulation; }
.spin-btn__in { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-btn-text); }
.spin-btn:hover:not(:disabled) { filter: brightness(1.07); }
.spin-btn:active:not(:disabled) { transform: translateY(2px) scale(0.99); box-shadow: inset 0 0 0 1px var(--gold-btn-inner), inset 0 -1px 0 rgba(120, 88, 20, 0.55), 0 8px 18px -12px rgba(212, 175, 55, 0.8); }
.spin-btn:disabled { cursor: not-allowed; filter: grayscale(0.75) brightness(0.62); box-shadow: inset 0 0 0 1px var(--line-2); }
.spin-btn.is-spinning { filter: none; cursor: progress; }
.spin-btn.is-spinning .spin-btn__in { letter-spacing: 0.1em; }
.spin-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%); background-size: 250% 100%; }
@media (prefers-reduced-motion: no-preference) {
    .spin-btn.is-ready::after { opacity: 1; animation: shine 3.6s ease-in-out infinite; }
}
@keyframes shine { 0%, 55% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

.rule { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 0.9rem; border-radius: 14px;
    font-size: 0.86rem; font-weight: 600; color: var(--text-2); border: 1px dashed var(--line-2); text-align: center; }
.rule .ic { flex: none; color: var(--gold); }

.history { padding: 1rem; border-radius: var(--r-leaf); border: 1px solid var(--line); background: rgba(21, 27, 15, 0.75); }
.history__title { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); margin-bottom: 0.4rem; }
.history__list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.history__list li:first-child { border-top: 0; }
.history__list b { font-weight: 700; color: var(--gold-2); }
.history__list time { margin-left: auto; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.chip { padding: 0.12rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.chip--ok { color: var(--ok); background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.28); }
.chip--wait { color: var(--gold-2); background: rgba(212, 175, 55, 0.08); border: 1px solid rgba(212, 175, 55, 0.3); }
.info { font-size: 0.82rem; color: var(--text-2); white-space: pre-line; text-align: center; }

/* ---- Butonlar ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.75rem 1.4rem; border-radius: 999px;
    border: 0; cursor: pointer; font-weight: 700; font-size: 0.96rem; transition: filter 0.2s ease, transform 0.2s ease, border-color 0.2s ease; }
.btn:active { transform: scale(0.97); }
.btn-gold { color: var(--gold-btn-text); background: var(--gold-grad); box-shadow: inset 0 0 0 1px var(--gold-btn-inner), 0 10px 24px -12px rgba(212, 175, 55, 0.8); }
.btn-gold:hover { filter: brightness(1.07); }
.btn-ghost { color: var(--text); background: rgba(24, 31, 18, 0.8); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--gold-3); }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* ---- Mod seçimi ---- */
.chooser { position: relative; padding: 0.4rem 0 0.6rem; text-align: center; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.chooser__title { margin-top: 0.5rem; font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.chooser__sub { margin: 0.6rem auto 0; max-width: 30rem; color: var(--text-2); }
.choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1.6rem; text-align: left; }
@media (min-width: 720px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; } }
.choice { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "w b" "c c"; gap: 1rem 1.1rem;
    align-items: center; padding: 1.2rem; cursor: pointer; text-align: left; border-radius: 34px 12px 34px 12px; border: 1px solid var(--line-2);
    background: linear-gradient(160deg, rgba(34, 44, 24, 0.92), rgba(14, 19, 10, 0.95));
    box-shadow: inset 0 1px 0 rgba(243, 210, 122, 0.14);
    transition: border-color 0.3s ease, transform 0.45s var(--ease-soft), box-shadow 0.45s var(--ease-soft); }
.choice--fs { border-radius: 12px 34px 12px 34px; }
@media (min-width: 720px) {
    .choice { grid-template-columns: minmax(0, 1fr); grid-template-areas: "w" "b" "c"; justify-items: center; text-align: center; padding: 1.6rem 1.4rem 1.4rem; }
}
.choice__wheel { grid-area: w; display: block; width: 112px; aspect-ratio: 1; transition: transform 1.2s var(--ease-soft); }
@media (min-width: 720px) { .choice__wheel { width: min(210px, 70%); } }
.choice__wheel canvas { display: block; width: 100%; height: 100%; }
.choice__body { grid-area: b; display: grid; gap: 0.3rem; min-width: 0; }
@media (min-width: 720px) { .choice__body { justify-items: center; } }
.choice__name { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.choice__range { font-weight: 700; color: var(--gold-2); }
.choice__prizes { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.2rem; }
@media (min-width: 720px) { .choice__prizes { justify-content: center; } }
.choice__prizes span { padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700; color: var(--text-2);
    background: rgba(16, 21, 11, 0.7); border: 1px solid var(--line); }
.choice__note { margin-top: 0.2rem; font-size: 0.84rem; color: var(--text-2); }
.choice__cta { grid-area: c; display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; min-height: 50px;
    border-radius: 999px; font-weight: 700; color: var(--gold-2); border: 1px solid var(--gold-3); background: rgba(212, 175, 55, 0.06);
    transition: background 0.3s ease, color 0.3s ease; }
.choice__cta .ic { transition: transform 0.4s var(--ease-soft); }
@media (hover: hover) {
    .choice:hover { border-color: var(--gold-3); transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(243, 210, 122, 0.2), 0 30px 50px -30px rgba(0, 0, 0, 0.95); }
    .choice:hover .choice__wheel { transform: rotate(-24deg); }
    .choice:hover .choice__cta { background: var(--gold-grad); color: var(--gold-btn-text); border-color: transparent; }
    .choice:hover .choice__cta .ic { transform: translateX(3px); }
}

.confirm { position: absolute; z-index: 5; inset: -8px; display: grid; place-items: center; padding: 1rem;
    background: rgba(10, 14, 7, 0.78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border-radius: 24px; }
.confirm__card { width: min(100%, 400px); padding: 1.5rem; text-align: center; border-radius: 30px 12px 30px 12px; border: 1px solid var(--gold-3);
    background: linear-gradient(165deg, rgba(34, 44, 24, 0.98), rgba(12, 17, 8, 0.98)); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.95);
    animation: pop 0.4s var(--ease-soft) both; }
.confirm__title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.confirm__text { margin-top: 0.6rem; color: var(--text-2); font-size: 0.94rem; }
.confirm__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.3rem; }

/* Seçimden çarka geçiş */
.stage.is-entering .wheel { animation: enter 0.9s var(--ease-soft) both; }
.stage.is-entering .side { animation: fadeup 0.7s 0.25s var(--ease-soft) both; }
@keyframes enter { from { opacity: 0; transform: scale(0.82) rotate(-40deg); } to { opacity: 1; transform: none; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- Alt bilgi ---- */
.foot { display: flex; align-items: center; justify-content: center; gap: 0.7rem; margin-top: 1.8rem; padding-top: 1rem;
    border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); text-align: left; }
.age { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; font-weight: 800; font-size: 0.72rem;
    color: var(--gold-2); border: 1px solid var(--gold-3); }

.toast { position: fixed; left: 50%; top: 14px; z-index: 300; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
    padding: 0.75rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: 0.9rem; color: var(--text); background: #1d2416;
    border: 1px solid var(--gold-3); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.9); transition: opacity 0.3s ease, transform 0.4s var(--ease-soft);
    max-width: calc(100% - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
