:root {
  --bg: #07060d;
  --panel: rgba(18, 14, 32, 0.78);
  --panel-2: rgba(255, 255, 255, 0.04);
  --line: rgba(227, 192, 122, 0.22);
  --gold: #e3c07a;
  --gold-2: #fff1c9;
  --text: #efe9ff;
  --muted: #a79fbf;
  --accent: #b77cff;
  --accent-soft: rgba(183, 124, 255, 0.16);
  --radius: 18px;
  --serif: 'Cinzel', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at 50% -10%, #1d1236 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }

h1, h2, h3 { font-family: var(--serif); margin: 0; letter-spacing: 0.02em; }
.gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 70%, #b98b3c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); margin: 0 0 12px; font-size: 0.9rem; }
.eyebrow { font-family: var(--serif); color: var(--gold); letter-spacing: 0.25em; font-size: 0.78rem; text-transform: uppercase; margin: 0 0 12px; }

/* Ekranlar */
.screen { display: none; width: 100%; max-width: 1180px; }
.screen.active { display: block; animation: screen-in 0.55s cubic-bezier(.2,.8,.2,1); }
@keyframes screen-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* Butonlar */
.btn {
  font: 600 0.98rem var(--sans); color: var(--text); cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 22px; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { background: rgba(255,255,255,.08); border-color: rgba(227,192,122,.5); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-primary {
  background: linear-gradient(180deg, #f3d592, #c99a4a); color: #1b1206; border-color: transparent;
  box-shadow: 0 8px 30px rgba(227,192,122,.25), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-primary:hover { background: linear-gradient(180deg, #ffe3a6, #d6a755); box-shadow: 0 10px 38px rgba(227,192,122,.4); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; }
.btn-lg { padding: 16px 38px; font-size: 1.1rem; font-family: var(--serif); letter-spacing: .06em; }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-icon { width: 42px; height: 42px; padding: 0; flex: none; }

/* Giriş */
.intro { text-align: center; max-width: 720px; margin: 0 auto; }
.sigil { position: relative; width: 190px; height: 190px; margin: 0 auto 18px; }
.sigil-ring { width: 100%; height: 100%; animation: spin 40s linear infinite; filter: drop-shadow(0 0 12px rgba(227,192,122,.35)); }
.sigil-ring circle, .sigil-ring path { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .55; }
.sigil-ring text { fill: var(--gold); font-size: 11px; letter-spacing: 3px; opacity: .8; }
.sigil-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 68px; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(183,124,255,.6)); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }
.intro h1 { font-size: clamp(2.2rem, 7vw, 4.2rem); line-height: 1.08; font-weight: 900; margin-bottom: 18px; text-shadow: 0 0 40px rgba(183,124,255,.25); }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 0 auto 26px; }
.class-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 30px; }
.class-strip span {
  width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line); transition: transform .2s;
  animation: pop .5s backwards;
}
.class-strip span:hover { transform: translateY(-4px) scale(1.1); }
@keyframes pop { from { opacity: 0; transform: scale(.5); } }
.features { list-style: none; padding: 0; margin: 30px auto 16px; display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.features li { display: flex; flex-direction: column; align-items: center; }
.features b { font-family: var(--serif); font-size: 1.6rem; color: var(--gold); }
.features span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
.privacy { color: var(--muted); font-size: .85rem; }

/* Panel */
.panel {
  max-width: 640px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: 24px; padding: 34px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05);
}
.panel h2 { font-size: 1.8rem; margin-bottom: 22px; }
.step-label { color: var(--gold); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 6px; font-family: var(--serif); }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; font: 500 1.05rem var(--sans); color: var(--text); background: rgba(0,0,0,.3);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227,192,122,.15); }
.dropzone {
  position: relative; aspect-ratio: 4 / 3; border: 2px dashed rgba(227,192,122,.35); border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden; cursor: pointer; background: rgba(0,0,0,.25);
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: rgba(227,192,122,.06); }
.dropzone:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.dropzone.has-photo { border-style: solid; }
.dz-empty { text-align: center; color: var(--muted); padding: 16px; }
.dz-empty p { margin: 6px 0; }
.dz-empty b { color: var(--text); }
.dz-empty small { opacity: .75; }
.dz-icon { font-size: 44px; }
#photo-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dz-clear {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 15px;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.row > .btn { flex: 1; }
.row.between { justify-content: space-between; }
.row.between > .btn { flex: 0 0 auto; }
.hint { color: var(--muted); font-size: .85rem; margin: 12px 0 0; }

/* Sorular */
.quiz { max-width: 760px; }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.progress { flex: 1; height: 8px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #c99a4a, #f3d592); border-radius: 99px; box-shadow: 0 0 14px rgba(227,192,122,.6); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.q-count { font-family: var(--serif); color: var(--gold); font-size: .9rem; min-width: 52px; text-align: right; }
.q-body.enter { animation: q-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes q-in { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.q-icon { font-size: 50px; line-height: 1; margin-bottom: 10px; filter: drop-shadow(0 0 16px rgba(227,192,122,.35)); }
.q-body h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); margin-bottom: 8px; }
.q-sub { color: var(--muted); margin: 0 0 24px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.options.many { grid-template-columns: repeat(3, 1fr); }
.option {
  position: relative; text-align: left; cursor: pointer; color: var(--text); font: 500 1rem var(--sans);
  background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px; min-height: 104px;
  transition: transform .18s, border-color .2s, background .2s, box-shadow .2s;
}
.option:hover { transform: translateY(-3px); border-color: rgba(227,192,122,.6); background: rgba(227,192,122,.07); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.option:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.option.selected { border-color: var(--gold); background: rgba(227,192,122,.14); box-shadow: 0 0 0 1px var(--gold), 0 0 30px rgba(227,192,122,.25); }
.option.picked { animation: picked .35s; }
@keyframes picked { 50% { transform: scale(.96); } }
.opt-emoji { font-size: 28px; line-height: 1; }
.opt-key {
  position: absolute; top: 10px; right: 12px; font-size: .7rem; color: var(--muted); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; font-family: var(--serif);
}
.slider-box { padding: 10px 4px 0; }
.slider-labels { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 1.15rem; margin-bottom: 14px; }
.slider-labels span { transition: transform .2s, color .2s, text-shadow .2s; }
.slider-labels span.lead-side { color: var(--gold); transform: scale(1.12); text-shadow: 0 0 16px rgba(227,192,122,.6); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 99px; outline: none; background: linear-gradient(90deg, #5aa9ff, #b77cff 50%, #ff6b3d); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6dc, #e3c07a 60%, #9c7433); border: 2px solid #fff3; box-shadow: 0 0 20px rgba(227,192,122,.7); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6dc, #e3c07a 60%, #9c7433); border: 2px solid #fff3; box-shadow: 0 0 20px rgba(227,192,122,.7); cursor: grab; }
input[type=range]:focus-visible { box-shadow: 0 0 0 3px rgba(227,192,122,.35); }
.slider-read { text-align: center; margin: 22px 0 6px; font-family: var(--serif); font-size: 1.3rem; color: var(--gold-2); min-height: 1.6em; }
.slider-box .btn-primary { display: flex; margin: 18px auto 0; }

/* Ritüel */
.ritual { text-align: center; max-width: 520px; margin: 0 auto; }
.ritual-circle { position: relative; width: 220px; height: 220px; margin: 0 auto 24px; }
.ritual-circle svg { width: 100%; height: 100%; }
.ritual-circle circle, .ritual-circle path { fill: none; stroke: var(--gold); }
.rc-a { stroke-dasharray: 8 10; animation: spin 6s linear infinite; transform-origin: center; stroke-width: 2; }
.rc-b { stroke-dasharray: 2 6; animation: spin 4s linear infinite reverse; transform-origin: center; }
.rc-c { opacity: .5; animation: spin 12s linear infinite; transform-origin: 100px 100px; }
#ritual-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); filter: drop-shadow(0 0 24px var(--gold)); } }
.ritual h2 { font-size: 1.8rem; margin-bottom: 18px; }
.ritual-steps { list-style: none; padding: 0; margin: 0; text-align: left; display: inline-block; }
.ritual-steps li { color: var(--muted); padding: 5px 0 5px 30px; position: relative; opacity: .35; transition: opacity .3s, color .3s; }
.ritual-steps li::before { content: '◇'; position: absolute; left: 4px; color: var(--gold); }
.ritual-steps li.active { opacity: 1; color: var(--text); }
.ritual-steps li.active::before { content: '✦'; animation: spin 1.5s linear infinite; display: inline-block; }
.ritual-steps li.done { opacity: .85; }
.ritual-steps li.done::before { content: '✓'; }

/* Sonuç */
.shared-banner {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; margin-bottom: 20px;
}
.shared-banner[hidden] { display: none; }
.result { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 36px; align-items: start; }
.result-card { position: sticky; top: 24px; }
.card-wrap { border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px var(--accent-soft); animation: card-in .9s cubic-bezier(.2,.8,.2,1); }
.card-wrap canvas { display: block; width: 100%; height: auto; }
@keyframes card-in { from { opacity: 0; transform: perspective(900px) rotateY(-25deg) scale(.9); } to { opacity: 1; transform: none; } }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.result-info { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 32px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.result-head { display: flex; align-items: center; gap: 16px; }
.r-emoji { font-size: 58px; line-height: 1; filter: drop-shadow(0 0 20px var(--accent)); }
.result-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; color: var(--gold-2); text-shadow: 0 0 30px var(--accent-soft); }
.r-en { margin: 2px 0 0; font-family: var(--serif); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); font-size: .85rem; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 12px; }
.badge { font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 99px; border: 1px solid currentColor; background: rgba(0,0,0,.25); }
.epithet { font-style: italic; color: var(--gold-2); margin: 0 0 12px; font-size: 1.05rem; }
.desc { margin: 0 0 14px; color: #ddd6f0; }
blockquote { margin: 0; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; font-family: var(--serif); color: var(--gold-2); }
.block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.block h3 { font-size: 1.05rem; color: var(--gold); margin-bottom: 14px; letter-spacing: .08em; }
.block.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.block.two p { margin: 0; color: #ddd6f0; }
.stats-wrap { display: grid; grid-template-columns: 1fr 220px; gap: 20px; align-items: center; }
.stat { margin-bottom: 12px; }
.stat-top { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: 5px; }
.stat-top b { font-family: var(--serif); font-size: 1.05rem; }
.stat-top small { color: var(--muted); margin-left: 6px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.bar { height: 9px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--gold)); box-shadow: 0 0 12px var(--accent); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.radar svg { width: 100%; height: auto; overflow: visible; }
.radar .grid { fill: none; stroke: rgba(255,255,255,.12); }
.radar .axis { stroke: rgba(255,255,255,.1); }
.radar .shape { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; filter: drop-shadow(0 0 8px var(--accent)); transform-origin: 110px 110px; animation: radar-in 1.2s cubic-bezier(.2,.8,.2,1); }
.radar .dot { fill: var(--gold); }
.radar text { fill: var(--muted); font-size: 10px; font-family: var(--sans); }
@keyframes radar-in { from { transform: scale(0); opacity: 0; } }
.ability { background: linear-gradient(135deg, var(--accent-soft), transparent 70%); border-radius: 16px; padding: 20px; border: 1px solid var(--line); }
.ability-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--gold-2); margin: 0 0 6px; }
.ability p:last-child { margin: 0; color: #ddd6f0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.info-grid div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.info-grid dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.info-grid dd { margin: 4px 0 0; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.aura-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 10px currentColor; background: currentColor; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 99px; background: var(--accent-soft); border: 1px solid var(--accent); font-size: .88rem; }
.match { display: grid; grid-template-columns: 34px 1fr 48px; align-items: center; gap: 10px; margin-bottom: 10px; }
.match .m-emoji { font-size: 22px; text-align: center; }
.match .m-name { font-size: .9rem; margin-bottom: 4px; }
.match .m-pct { font-family: var(--serif); text-align: right; color: var(--gold); }
.match.top .m-name { color: var(--gold-2); font-weight: 700; }

/* Kamera */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(4,3,10,.8); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 520px; background: #120e20; border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.modal-box h3 { margin-bottom: 14px; color: var(--gold); }
.cam-frame { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #000; }
.cam-frame video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

/* Bildirim */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; z-index: 60;
  background: #1c1530; border: 1px solid var(--gold); color: var(--text); padding: 12px 20px; border-radius: 99px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); transition: opacity .3s, transform .3s; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Giriş butonları */
.intro-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-arena, .btn-battle {
  background: linear-gradient(180deg, rgba(255,107,61,.22), rgba(183,40,40,.28)); border-color: rgba(255,120,80,.55);
  box-shadow: 0 8px 30px rgba(255,90,60,.18);
}
.btn-arena:hover, .btn-battle:hover { background: linear-gradient(180deg, rgba(255,107,61,.34), rgba(183,40,40,.4)); border-color: #ff8a5c; }
.btn-battle { grid-column: 1 / -1; font-family: var(--serif); font-size: 1.05rem; padding: 15px 20px; letter-spacing: .03em; }

/* Arena: seçim */
.arena-setup { max-width: 820px; }
.slots { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin: 22px 0 14px; }
.slots-vs { font-family: var(--serif); font-weight: 900; font-size: 2rem; color: var(--gold); text-shadow: 0 0 24px rgba(227,192,122,.6); }
.slot {
  --fc: var(--gold);
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  min-height: 300px; padding: 14px; border-radius: 20px; color: var(--text); font: inherit;
  background: rgba(255,255,255,.035); border: 1px solid color-mix(in srgb, var(--fc) 55%, transparent);
  box-shadow: 0 0 30px color-mix(in srgb, var(--fc) 18%, transparent); transition: transform .18s, box-shadow .2s;
}
.slot:hover { transform: translateY(-3px); box-shadow: 0 0 40px color-mix(in srgb, var(--fc) 35%, transparent); }
.slot:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.slot.empty { justify-content: center; border-style: dashed; border-color: rgba(227,192,122,.35); box-shadow: none; }
.slot-plus { font-size: 3rem; color: var(--gold); line-height: 1; }
.slot-label { color: var(--muted); }
.slot-img { width: 100%; max-width: 200px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; margin-bottom: 8px; border: 1px solid color-mix(in srgb, var(--fc) 60%, transparent); }
.slot-img canvas { width: 100%; height: 100%; display: block; }
.slot-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--gold-2); text-align: center; word-break: break-word; }
.slot-class { font-size: .9rem; color: var(--fc); }
.slot-power { font-size: .8rem; color: var(--muted); }
.slot-change { margin-top: 6px; font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; }
.matchup { text-align: center; color: var(--gold-2); min-height: 1.5em; margin-bottom: 4px; font-size: .95rem; }

/* Seçim penceresi */
.picker { max-width: 620px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.picker-head { display: flex; justify-content: space-between; align-items: center; }
.picker-head h3 { margin: 0; }
.picker h4 { font-family: var(--serif); color: var(--gold); margin: 20px 0 10px; font-size: .95rem; }
.picker h4 small { font-family: var(--sans); color: var(--muted); font-weight: 400; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.r-item { --fc: var(--gold); position: relative; }
.r-pick {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; color: var(--text); font: inherit;
  background: rgba(255,255,255,.04); border: 1px solid color-mix(in srgb, var(--fc) 45%, transparent); border-radius: 14px; padding: 8px;
  transition: background .2s, transform .15s;
}
.r-pick:hover { background: color-mix(in srgb, var(--fc) 14%, transparent); transform: translateY(-2px); }
.r-pic { width: 52px; height: 52px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font-size: 28px; background: rgba(0,0,0,.35); }
.r-pic img { width: 100%; height: 100%; object-fit: cover; }
.r-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.r-txt b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-txt span { font-size: .78rem; color: var(--fc); }
.r-txt small { font-size: .72rem; color: var(--muted); }
.r-del { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: #1c1530; color: var(--muted); font-size: 11px; cursor: pointer; }
.r-del:hover { color: #fff; border-color: #ff6b6b; }
.link-row { display: flex; gap: 8px; }
.link-row input {
  flex: 1; min-width: 0; font: 500 .95rem var(--sans); color: var(--text); background: rgba(0,0,0,.3);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; outline: none;
}
.link-row input:focus { border-color: var(--gold); }

/* Arena: dövüş */
.battle { max-width: 900px; margin: 0 auto; }
.stage {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: start;
  background: radial-gradient(ellipse at 50% 100%, rgba(227,192,122,.12), transparent 60%), var(--panel);
  border: 1px solid var(--line); border-radius: 24px; padding: 40px 24px 24px; overflow: hidden;
}
.stage-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 45%, var(--fc, #fff), transparent 65%); mix-blend-mode: screen; }
.stage-flash.on { animation: flash .9s ease-out; }
@keyframes flash { 15% { opacity: .55; } 100% { opacity: 0; } }
.stage-mid { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 70px; }
.vs-badge {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 900; font-size: 1.4rem;
  color: var(--gold); border: 2px solid var(--gold); background: #120e20; box-shadow: 0 0 30px rgba(227,192,122,.45);
}
.round-no { font-family: var(--serif); color: var(--gold-2); font-size: .9rem; white-space: nowrap; }
.fighter { --fc: var(--gold); display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; transition: opacity .6s, filter .6s; }
.f-pic {
  position: relative; width: 100%; max-width: 240px; aspect-ratio: 1; border-radius: 18px; border: 2px solid var(--fc);
  box-shadow: 0 0 30px color-mix(in srgb, var(--fc) 40%, transparent);
}
.f-pic canvas { width: 100%; height: 100%; display: block; border-radius: 16px; }
.f-crown { position: absolute; top: -36px; left: 50%; transform: translateX(-50%) scale(0); font-size: 44px; line-height: 1; transition: transform .5s cubic-bezier(.3,1.6,.5,1); filter: drop-shadow(0 0 12px gold); z-index: 3; }
.f-name { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; margin-top: 12px; color: var(--gold-2); word-break: break-word; }
.f-class { font-size: .88rem; color: var(--fc); margin-bottom: 10px; }
.hp { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 240px; height: 22px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; border: 1px solid rgba(255,255,255,.12); }
.hp i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #2fbf71, #8be08f); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.hp i.low { background: linear-gradient(90deg, #d9342b, #ff7a59); }
.hp-text { position: relative; font-size: .75rem; font-weight: 700; line-height: 1; text-shadow: 0 1px 2px #000; }
.f-icons { min-height: 1.6em; margin-top: 6px; font-size: 1.1rem; letter-spacing: 2px; }
.fighter.hit .f-pic { animation: shake .45s; }
.fighter.hit-hard .f-pic { animation: shake-hard .55s; }
.fighter.dodge .f-pic { animation: dodge .5s; }
.fighter.lunge-0 .f-pic { animation: lunge-r .4s; }
.fighter.lunge-1 .f-pic { animation: lunge-l .4s; }
.fighter.cast .f-pic { animation: cast 1.2s; }
.fighter.winner .f-crown { transform: translateX(-50%) scale(1); }
.fighter.winner .f-pic { box-shadow: 0 0 50px var(--gold), 0 0 0 3px var(--gold); }
.fighter.loser { opacity: .55; filter: grayscale(.85); }
@keyframes shake { 20% { transform: translateX(-8px) rotate(-2deg); } 40% { transform: translateX(7px) rotate(2deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes shake-hard { 0% { filter: brightness(2.2) saturate(0); } 15% { transform: translateX(-14px) rotate(-4deg) scale(.96); } 35% { transform: translateX(12px) rotate(3deg); } 55% { transform: translateX(-8px); } 75% { transform: translateX(5px); filter: none; } }
@keyframes dodge { 40% { transform: translateY(-14px) translateX(12px) rotate(6deg); opacity: .6; } }
@keyframes lunge-r { 45% { transform: translateX(26px) scale(1.04); } }
@keyframes lunge-l { 45% { transform: translateX(-26px) scale(1.04); } }
@keyframes cast { 30% { transform: scale(1.07); box-shadow: 0 0 70px var(--fc), 0 0 0 4px var(--fc); } }
.float { position: absolute; top: 30%; font-family: var(--serif); font-weight: 900; font-size: 1.9rem; pointer-events: none; transform: translateX(-50%); animation: float-up 1.3s ease-out forwards; text-shadow: 0 2px 6px #000, 0 0 16px currentColor; z-index: 2; }
.float.dmg { color: #fff; }
.float.crit { color: #ffd35a; font-size: 2.6rem; }
.float.burn { color: #ff8a3d; }
.float.heal { color: #6dff9e; }
.float.miss { color: #9fd3ff; font-size: 1.4rem; }
@keyframes float-up { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }
.battle-log {
  margin-top: 16px; height: 240px; overflow-y: auto; background: rgba(0,0,0,.35); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 16px; scroll-behavior: smooth;
}
.battle-log p { margin: 0 0 7px; padding-left: 10px; border-left: 3px solid var(--fc, transparent); font-size: .93rem; animation: log-in .35s ease-out; }
@keyframes log-in { from { opacity: 0; transform: translateY(6px); } }
.battle-log .log-round { border: 0; padding: 0; text-align: center; color: var(--gold); font-family: var(--serif); font-size: .82rem; letter-spacing: .15em; margin: 10px 0 8px; }
.battle-log .log-intro { border: 0; text-align: center; color: var(--gold-2); font-family: var(--serif); }
.battle-log .log-special { color: var(--gold-2); font-weight: 700; font-family: var(--serif); }
.battle-log .log-crit, .battle-log .log-big { color: #ffe6a8; }
.battle-log .log-status, .battle-log .log-dot { color: #c9c0e6; font-style: italic; }
.battle-log .log-dodge { color: #9fd3ff; }
.battle-log .log-end { border: 0; text-align: center; font-family: var(--serif); font-size: 1.1rem; color: var(--gold); margin-top: 12px; }
.battle-controls { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.battle-controls[hidden], .battle-end[hidden] { display: none; }
.battle-end { margin-top: 18px; background: var(--panel); border: 1px solid var(--gold); border-radius: 24px; padding: 28px; text-align: center; animation: screen-in .6s; scroll-margin-top: 16px; }
.battle-end h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 900; color: var(--gold-2); text-shadow: 0 0 30px rgba(227,192,122,.4); word-break: break-word; }
.be-sub { color: var(--muted); margin: 6px 0 20px; }
.odds { max-width: 560px; margin: 0 auto; }
.odds-title { margin: 0 0 8px; font-weight: 600; }
.odds-title small { color: var(--muted); font-weight: 400; }
.odds-bar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.08); }
.odds-bar i { display: block; height: 100%; width: 50%; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.odds-bar i + i { border-left: 2px solid #07060d; }
.odds-labels { display: flex; justify-content: space-between; font-family: var(--serif); font-size: .9rem; margin-top: 6px; gap: 10px; }
.upset { margin: 16px auto 0; max-width: 560px; padding: 10px 14px; border-radius: 12px; background: rgba(255,210,90,.1); border: 1px solid rgba(255,210,90,.4); color: #ffe6a8; }
.upset[hidden] { display: none; }
.be-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; text-align: left; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.be-grid h3 { font-size: 1rem; color: var(--gold); margin-bottom: 10px; }
.why { margin: 0; padding: 0; list-style: none; }
.why li { margin-bottom: 8px; font-size: .92rem; color: #ddd6f0; }
.be-stats { width: 100%; border-collapse: collapse; font-size: .88rem; }
.be-stats th, .be-stats td { padding: 7px 6px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: right; }
.be-stats th { font-family: var(--serif); color: var(--gold-2); font-weight: 700; word-break: break-word; }
.be-stats td:first-child { text-align: left; color: var(--muted); }
.be-stats td.best { color: var(--gold); font-weight: 700; }
.be-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 24px; }

@media (max-width: 640px) {
  .slots { grid-template-columns: 1fr; gap: 8px; }
  .slot { min-height: 0; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
  .slot.empty { min-height: 110px; flex-direction: column; }
  .slot-img { max-width: 110px; margin: 0; }
  .slots-vs { text-align: center; font-size: 1.4rem; }
  .stage { gap: 8px; padding: 36px 10px 16px; }
  .stage-mid { padding-top: 40px; }
  .vs-badge { width: 44px; height: 44px; font-size: 1rem; }
  .f-crown { font-size: 32px; top: -28px; }
  .f-name { font-size: .95rem; }
  .f-class { font-size: .75rem; }
  .hp { height: 18px; }
  .hp-text { font-size: .65rem; }
  .float { font-size: 1.4rem; }
  .float.crit { font-size: 1.8rem; }
  .battle-log { height: 34vh; }
  .be-grid { grid-template-columns: 1fr; }
  .be-actions { grid-template-columns: 1fr 1fr; }
  .battle-end { padding: 22px 16px; }
}

/* Gizli öğeler (.btn gibi display tanımlı sınıfları da ezer) */
[hidden] { display: none !important; }

/* Arena: mod seçimi ve çıkış */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.mode {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; cursor: pointer;
  padding: 12px 10px; border-radius: 16px; color: var(--text); font: inherit;
  background: rgba(255,255,255,.035); border: 1px solid var(--line); transition: border-color .2s, background .2s, transform .15s;
}
.mode:hover { transform: translateY(-2px); border-color: rgba(227,192,122,.55); }
.mode:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mode.active { border-color: var(--gold); background: rgba(227,192,122,.12); box-shadow: 0 0 0 1px var(--gold), 0 0 24px rgba(227,192,122,.18); }
.mode-icon { font-size: 1.6rem; line-height: 1.2; }
.mode b { font-family: var(--serif); font-size: .98rem; color: var(--gold-2); }
.mode small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.slot-role { font-size: .75rem; font-weight: 700; letter-spacing: .06em; color: var(--fc, var(--gold)); background: rgba(0,0,0,.3); border: 1px solid currentColor; border-radius: 99px; padding: 2px 10px; margin-bottom: 6px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-exit { color: #ffb4a8; border-color: rgba(255,120,100,.35); }
.btn-exit:hover { border-color: #ff8a7a; background: rgba(255,90,70,.1); }

/* Arena: seri skoru */
.match-no { font-family: var(--serif); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.series { margin: -4px auto 22px; max-width: 520px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.series.over { background: linear-gradient(180deg, rgba(227,192,122,.16), rgba(227,192,122,.04)); border-color: var(--gold); box-shadow: 0 0 40px rgba(227,192,122,.15); }
.series-title { margin: 0 0 8px; font-family: var(--serif); font-weight: 700; color: var(--gold); letter-spacing: .08em; }
.series.over .series-title { font-size: 1.3rem; }
.series-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.series-score b { font-family: var(--serif); font-size: 2rem; color: #fff; }
.series-name { font-family: var(--serif); color: var(--gold-2); word-break: break-word; }
.series-name:first-child { text-align: right; }
.series-name:last-child { text-align: left; }
.series-verdict { margin: 8px 0 0; color: #ffe6a8; font-weight: 600; }
.be-actions { display: flex; flex-wrap: wrap; justify-content: center; }
.be-actions .btn { flex: 1 1 170px; max-width: 240px; }

/* Arena: oyuncu hamleleri */
.battle.interactive .battle-log { height: 170px; }
.f-role { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin-top: 10px; min-height: 1em; }
.fighter.active-turn .f-pic { box-shadow: 0 0 0 3px var(--fc), 0 0 45px var(--fc); animation: turn-glow 1.6s ease-in-out infinite; }
.fighter.active-turn .f-role { color: var(--fc); }
@keyframes turn-glow { 50% { box-shadow: 0 0 0 3px var(--fc), 0 0 20px var(--fc); } }
.move-panel {
  --fc: var(--gold);
  margin-top: 14px; padding: 16px; border-radius: 20px; background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--fc) 55%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--fc) 12%, transparent);
}
.move-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.move-turn { margin: 0; font-family: var(--serif); font-weight: 700; color: var(--gold-2); }
.move-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.move-grid:empty { display: none; }
.move {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; cursor: pointer;
  padding: 12px 8px 10px; border-radius: 14px; color: var(--text); font: inherit;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: transform .15s, border-color .2s, background .2s;
}
.move:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--fc); background: color-mix(in srgb, var(--fc) 12%, transparent); }
.move:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.move:disabled { opacity: .38; cursor: not-allowed; }
.move-special:not(:disabled) { border-color: var(--fc); background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 22%, transparent), transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--fc) 30%, transparent); }
.mv-icon { font-size: 1.6rem; line-height: 1.2; }
.mv-name { font-family: var(--serif); font-weight: 700; font-size: .92rem; color: var(--gold-2); }
.mv-hint { font-size: .72rem; color: var(--muted); line-height: 1.3; }
.mv-key { position: absolute; top: 6px; right: 8px; font-size: .65rem; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-family: var(--serif); }

@media (max-width: 640px) {
  .modes { grid-template-columns: 1fr; }
  .mode { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; gap: 2px 10px; padding: 10px 14px; }
  .mode small { flex-basis: 100%; padding-left: 2.3rem; }
  .move-head { flex-direction: column; align-items: center; text-align: center; }
  #btn-leave-fight { padding: 5px 14px; font-size: .8rem; }
  .arena-setup .row.between { flex-direction: column-reverse; align-items: stretch; }
  .arena-setup .row.between > .btn, .arena-setup .btn-group > .btn { flex: 1; white-space: nowrap; padding-left: 12px; padding-right: 12px; }
  .arena-setup .btn-group { flex-wrap: nowrap; }
  .move-grid { grid-template-columns: 1fr 1fr; }
  .move-special { grid-column: 1 / -1; }
  .mv-key { display: none; }
  .battle.interactive .battle-log { height: 150px; }
  .series-score b { font-size: 1.5rem; }
}

/* Duyarlı */
@media (max-width: 900px) {
  .result { grid-template-columns: 1fr; }
  .result-card { position: static; max-width: 460px; margin: 0 auto; width: 100%; }
}
@media (max-width: 640px) {
  #app { padding: 20px 12px; align-items: flex-start; }
  .panel, .result-info { padding: 22px 18px; border-radius: 20px; }
  .options, .options.many { grid-template-columns: 1fr; }
  .option { min-height: 0; flex-direction: row; align-items: center; padding: 14px 16px; }
  .opt-key { display: none; }
  .stats-wrap { grid-template-columns: 1fr; }
  .radar { max-width: 260px; margin: 0 auto; }
  .block.two, .info-grid { grid-template-columns: 1fr; }
  .features { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
