/* ==========================================================
   Kawaii Pet Adventure - arayüz
   Mobil öncelikli. Renkler CSS değişkenleriyle; koyu tema [data-theme="dark"].
   ========================================================== */

@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito.ttf') format('truetype');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #fff5fa;
  --bg2: #f3f0ff;
  --card: #ffffff;
  --card2: #fff7fb;
  --ink: #5b4a6b;
  --muted: #9b89aa;
  --line: #f1e3f0;
  --pink: #ff9ec7;
  --pink-d: #f06fa6;
  --mint: #8fe3c8;
  --mint-d: #4cc5a0;
  --sky: #bfe3ff;
  --lemon: #ffe27a;
  --lemon-d: #f2c14e;
  --lilac: #cdb4ff;
  --lilac-d: #a582f0;
  --coral: #ff8f8f;
  --shadow: 0 8px 24px rgba(190, 120, 170, .16);
  --shadow-sm: 0 3px 10px rgba(190, 120, 170, .14);
  --radius: 22px;
  --sky-top: #bfe6ff;
  --sky-bot: #ffe1ef;
  --hill1: #b8efcf;
  --hill2: #9fe3bf;
  --ground: #c6f1d6;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1f1a2b;
  --bg2: #241d33;
  --card: #2d2540;
  --card2: #342b4a;
  --ink: #f4eaff;
  --muted: #b3a2c8;
  --line: #3f3458;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-sm: 0 3px 10px rgba(0, 0, 0, .3);
  --sky-top: #2b2f63;
  --sky-bot: #5a3f78;
  --hill1: #3c6a63;
  --hill2: #2f5752;
  --ground: #375e57;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Nunito', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, #ffe3f1 0, transparent 40%),
    radial-gradient(circle at 100% 30%, #e7e0ff 0, transparent 40%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[data-theme="dark"] body {
  background:
    radial-gradient(circle at 10% 0%, #3a2747 0, transparent 40%),
    radial-gradient(circle at 100% 30%, #2c2a52 0, transparent 40%),
    var(--bg);
}

button { font: inherit; color: inherit; }

/* ---------- Butonlar ---------- */
.btn {
  border: 0;
  border-radius: 999px;
  padding: .7em 1.3em;
  font-weight: 800;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
  user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(3px); }
.btn:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .55; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #ffadd2, var(--pink-d));
  box-shadow: 0 4px 0 #d9548d, var(--shadow-sm);
  text-shadow: 0 1px 0 rgba(180, 50, 110, .35);
}
.btn-primary:active:not(:disabled) { box-shadow: 0 1px 0 #d9548d; }
.btn-mint {
  color: #fff;
  background: linear-gradient(180deg, #a6efd6, var(--mint-d));
  box-shadow: 0 4px 0 #34a382;
  text-shadow: 0 1px 0 rgba(30, 120, 90, .35);
}
.btn-mint:active:not(:disabled) { box-shadow: 0 1px 0 #34a382; }
.btn-soft {
  background: var(--card2);
  border: 2px solid var(--line);
  color: var(--ink);
}
.btn-block { width: 100%; }
.btn-sm { padding: .45em .95em; font-size: .9rem; }

/* ---------- Açılış ---------- */
.boot {
  position: fixed; inset: 0; display: grid; place-content: center; text-align: center;
  color: var(--muted); font-weight: 700;
}
.boot-paw { font-size: 3rem; animation: bob 1s ease-in-out infinite; }

/* ---------- Giriş ---------- */
.auth {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 32px;
  padding: 18px 26px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 3px solid var(--line);
}
.auth-hero { display: flex; justify-content: center; align-items: flex-end; height: 124px; margin-top: -4px; }
.show-slot { width: 104px; height: 112px; margin: 0 -6px; display: grid; place-items: end center; animation: bob 2.4s ease-in-out infinite; }
.show-slot.pet { width: 90px; height: 92px; animation-delay: -.8s; }
.show-slot:nth-child(3) { animation-delay: -1.6s; }
.show-slot .art { width: 100%; height: 100%; }
.show-slot.swap .art { animation: show-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes show-pop { 0% { transform: scale(.4) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .show-slot.swap .art { animation: none; } }
.g-fallback {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 360px; margin: 0 auto;
  font: inherit; font-weight: 800; font-size: .95rem; color: #3c4043; background: #fff; cursor: pointer;
  border: 1.5px solid #dadce0; border-radius: 999px; padding: .65em 1em; min-height: 44px;
}
.g-fallback svg { width: 20px; height: 20px; }
.g-fallback:active { transform: scale(.98); }
[data-theme="dark"] .g-fallback { background: #202124; color: #e8eaed; border-color: #5f6368; }
.google-btn[hidden], .g-fallback[hidden] { display: none; }
.logo {
  margin: 4px 0 2px;
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--lilac-d);
  line-height: 1.1;
}
.logo span { color: var(--pink-d); }
.tagline { margin: 0 0 18px; color: var(--muted); font-weight: 700; }

.seg {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg2); border-radius: 999px; padding: 4px; margin-bottom: 16px;
}
.seg-btn {
  border: 0; background: transparent; border-radius: 999px; padding: .6em; font-weight: 800;
  color: var(--muted); cursor: pointer;
}
.seg-btn.is-active { background: var(--card); color: var(--pink-d); box-shadow: var(--shadow-sm); }

.auth-form { display: grid; gap: 12px; text-align: left; }
.field span { display: block; font-weight: 800; font-size: .88rem; margin: 0 0 4px 12px; color: var(--muted); }
.field input {
  width: 100%;
  font: inherit; font-weight: 700;
  color: var(--ink);
  background: var(--card2);
  border: 2.5px solid var(--line);
  border-radius: 16px;
  padding: .75em 1em;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 158, 199, .25); }
.form-error {
  margin: 0; padding: .6em .9em; border-radius: 14px;
  background: #ffe3e8; color: #c2416b; font-weight: 700; font-size: .9rem;
}
[data-theme="dark"] .form-error { background: #4a2738; color: #ffb3c8; }

/* ---------- Oyun yerleşimi ---------- */
.game {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap;
  background: var(--card); border-radius: var(--radius); padding: 8px 12px;
  box-shadow: var(--shadow-sm); border: 2px solid var(--line);
}
.profile { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 220px; }
.avatar {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: linear-gradient(180deg, #ffe1ef, #e9e1ff); overflow: hidden;
  border: 2.5px solid #fff; box-shadow: var(--shadow-sm);
}
.avatar .art { width: 120%; height: 120%; margin: -2px 0 0 -10%; }
.profile-info { min-width: 0; flex: 1; max-width: 300px; }
.profile-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.username { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 900; }
.lv-badge {
  flex: none; background: linear-gradient(180deg, #d7c4ff, var(--lilac-d)); color: #fff;
  border-radius: 999px; padding: 1px 9px; font-size: .8rem; font-weight: 900;
}
.resources { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 1 auto; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--card2); border: 2px solid var(--line); border-radius: 999px;
  padding: 3px 10px 3px 6px; font-weight: 900; font-size: .95rem; white-space: nowrap;
}
.chip-ico { font-size: 1.05rem; }
.chip.bump { animation: bump .35s ease; }

/* ---------- Çubuklar ---------- */
.bar {
  position: relative; height: 16px; border-radius: 999px; overflow: hidden;
  background: var(--bg2); border: 2px solid var(--line);
}
.bar-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: 999px;
  transition: width .35s ease;
}
.bar-fill::after {
  content: ''; position: absolute; left: 6px; right: 6px; top: 2px; height: 3px;
  border-radius: 999px; background: rgba(255, 255, 255, .55);
}
.bar-text {
  position: relative; display: block; text-align: center; font-size: .7rem; font-weight: 900;
  line-height: 12px; color: var(--ink); text-shadow: 0 0 3px var(--card), 0 0 3px var(--card);
}
.xp-bar .bar-fill { background: linear-gradient(90deg, #c7b0ff, #ff9ec7); }
.hp-bar .bar-fill { background: linear-gradient(90deg, #ff9eb5, #ff7aa2); }
.enemy-hp .bar-fill { background: linear-gradient(90deg, #ffd27a, #ff9a76); }

/* ---------- Savaş alanı ---------- */
.layout { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }

.arena {
  position: relative;
  height: clamp(270px, 46vh, 440px);
  border-radius: 28px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
  isolation: isolate;
  flex: none;
}
[data-theme="dark"] .arena { border-color: var(--line); }

.scene { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky-top), var(--sky-bot) 70%); z-index: -1; }
.sun {
  position: absolute; right: 9%; top: 9%; width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff7c2, #ffd76e);
  box-shadow: 0 0 0 10px rgba(255, 230, 140, .35), 0 0 40px rgba(255, 210, 100, .6);
}
[data-theme="dark"] .sun {
  background: radial-gradient(circle at 35% 35%, #fffbe8, #e8e0ff);
  box-shadow: 0 0 0 10px rgba(230, 220, 255, .12), 0 0 40px rgba(220, 210, 255, .4);
}
.stars { position: absolute; inset: 0 0 50% 0; opacity: 0; transition: opacity .4s; }
[data-theme="dark"] .stars {
  opacity: 1;
  background-image:
    radial-gradient(2px 2px at 12% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 30% 35%, #fff, transparent),
    radial-gradient(2px 2px at 48% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 62% 30%, #fff, transparent),
    radial-gradient(2px 2px at 72% 8%, #ffe8a8, transparent),
    radial-gradient(1.5px 1.5px at 88% 40%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 22% 6%, #fff, transparent);
  animation: twinkle 3s ease-in-out infinite alternate;
}
.cloud {
  position: absolute; background: #fff; border-radius: 999px; opacity: .9;
  animation: drift linear infinite;
}
[data-theme="dark"] .cloud { opacity: .18; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud.c1 { width: 90px; height: 26px; top: 14%; animation-duration: 70s; animation-delay: -20s; }
.cloud.c1::before { width: 40px; height: 40px; left: 14px; top: -20px; }
.cloud.c1::after { width: 30px; height: 30px; left: 44px; top: -13px; }
.cloud.c2 { width: 70px; height: 20px; top: 28%; animation-duration: 95s; animation-delay: -60s; }
.cloud.c2::before { width: 30px; height: 30px; left: 10px; top: -15px; }
.cloud.c2::after { width: 24px; height: 24px; left: 34px; top: -10px; }
.cloud.c3 { width: 110px; height: 30px; top: 6%; animation-duration: 120s; animation-delay: -90s; }
.cloud.c3::before { width: 46px; height: 46px; left: 18px; top: -24px; }
.cloud.c3::after { width: 36px; height: 36px; left: 56px; top: -16px; }

.hill { position: absolute; border-radius: 50%; }
.hill.h1 { width: 75%; height: 46%; left: -15%; bottom: 8%; background: var(--hill1); }
.hill.h2 { width: 80%; height: 50%; right: -20%; bottom: 4%; background: var(--hill2); }
.ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background:
    radial-gradient(circle at 15% 30%, #ffc2dc 0 4px, transparent 5px),
    radial-gradient(circle at 35% 70%, #fff1a8 0 4px, transparent 5px),
    radial-gradient(circle at 58% 40%, #ffc2dc 0 3px, transparent 4px),
    radial-gradient(circle at 80% 65%, #d8c6ff 0 4px, transparent 5px),
    radial-gradient(circle at 92% 25%, #fff1a8 0 3px, transparent 4px),
    var(--ground);
  border-radius: 50% 50% 0 0 / 22px 22px 0 0;
}
.petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -12px; width: 10px; height: 8px; border-radius: 10px 0 10px 0;
  background: #ffc2dc; opacity: .85;
  animation: petal-fall linear forwards;
}

.stage-pill {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(6px);
  border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: .85rem;
  box-shadow: var(--shadow-sm); color: #5b4a6b; z-index: 2;
}
[data-theme="dark"] .stage-pill { background: rgba(45, 37, 64, .85); color: var(--ink); }
.stage-pill .dot { color: var(--pink); }
.stage-progress {
  background: var(--pink); color: #fff; border-radius: 999px; padding: 0 8px; font-size: .78rem;
}
.stage-pill.guard .stage-progress { background: var(--coral); }

.fighters {
  position: absolute; left: 0; right: 0; bottom: 13%;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 6%;
}
.team { position: relative; display: flex; align-items: flex-end; gap: 0; }
.item-chips { display: contents; }
.unit { position: relative; display: flex; flex-direction: column; align-items: center; }
.unit .sprite { position: relative; z-index: 1; transform-origin: 50% 100%; }
.unit .shadow {
  width: 70%; height: 10px; margin-top: -6px; border-radius: 50%;
  background: rgba(90, 60, 110, .16);
}
.hero .sprite { width: clamp(64px, 18vw, 130px); animation: bob 2.2s ease-in-out infinite; }
.pet .sprite { width: clamp(42px, 11.5vw, 98px); animation: bob 1.8s ease-in-out infinite; animation-delay: -.5s; }
.pet { margin-left: -14px; }
.fighters > .enemy { flex: none; }
.team { flex: 0 1 auto; min-width: 0; }
.pet-dog .sprite { animation-delay: -1.1s; }
.pet-bunny .sprite { animation: hop-idle 1.3s ease-in-out infinite; }
/* Papağan takımın üstünde uçar */
.pet-parrot { position: absolute; left: 34%; bottom: 72%; margin: 0; }
.pet-parrot .sprite { animation: fly 2.6s ease-in-out infinite; }
.pet-parrot .shadow { display: none; }
.enemy .sprite { width: clamp(76px, 20vw, 130px); animation: squish 1.6s ease-in-out infinite; }
.enemy.is-guard .sprite { width: clamp(110px, 30vw, 175px); }
.art { display: block; width: 100%; height: auto; overflow: visible; }
.cat-art .tail { transform-origin: 30px 96px; animation: wag 1.4s ease-in-out infinite; }
.enemy-art .wing { transform-box: fill-box; transform-origin: 50% 100%; animation: flap .18s linear infinite alternate; }

.enemy-head { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 4px; width: clamp(90px, 24vw, 150px); }
.enemy-name {
  font-weight: 900; font-size: .8rem; background: rgba(255, 255, 255, .85); color: #5b4a6b;
  border-radius: 999px; padding: 1px 9px; white-space: nowrap;
}
[data-theme="dark"] .enemy-name { background: rgba(45, 37, 64, .85); color: var(--ink); }
.enemy.is-guard .enemy-name { background: #ffd6d6; color: #b4405c; }
.enemy-hp { width: 100%; height: 14px; }
.enemy-hp .bar-text { line-height: 10px; font-size: .62rem; }

.player-hp {
  position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px;
  width: min(48%, 260px);
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(6px);
  padding: 4px 10px 4px 6px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .player-hp { background: rgba(45, 37, 64, .85); }
.player-hp .bar { flex: 1; }
.hp-ico { font-size: 1rem; }

/* Animasyon durumları */
.unit.attack .sprite { animation: lunge-right .32s ease; }
.enemy.attack .sprite { animation: lunge-left .32s ease; }
.pet.attack .sprite { animation: pounce .45s ease; }
.unit.hurt .sprite { animation: hurt .3s ease; }
.enemy.spawn .sprite { animation: pop-in .4s cubic-bezier(.3, 1.6, .5, 1); }
.enemy.dead .sprite { animation: poof .45s ease forwards; }
.enemy.empty { visibility: hidden; }
.hero.fainted .sprite { animation: none; transform: rotate(-80deg) translate(20px, 10px); filter: grayscale(.8); opacity: .7; transition: all .4s; }
.pet.purr .sprite { animation: purr .6s ease; }
.pet.bark .sprite { animation: bark .5s ease; }
.pet.dash .sprite { animation: dash .75s ease-in-out; }
.pet.hop .sprite { animation: hop-attack .6s ease; }
.pet.swoop .sprite { animation: swoop .55s ease-in-out; }
.pet.sing .sprite { animation: sing 1s ease-in-out; }

/* Güçlendirme auraları */
.team.buff-atk .unit .sprite { filter: drop-shadow(0 0 5px #ffb3f0) drop-shadow(0 0 10px #c7b0ff); }
.team.buff-luck .unit .shadow { background: radial-gradient(rgba(120, 220, 150, .55), transparent 70%); }
.team.buff-atk.buff-luck .unit .sprite { filter: drop-shadow(0 0 5px #ffb3f0) drop-shadow(0 0 10px #a6f0c6); }
.hero .guard-bubble {
  position: absolute; left: 50%; bottom: 0; width: 120%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; border: 3px solid rgba(160, 210, 255, .9);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(190, 225, 255, .18) 60%);
  opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 2;
}
.team.guarded .hero .guard-bubble { opacity: 1; animation: bubble 2s ease-in-out infinite; }
.ring {
  position: absolute; width: 30px; height: 30px; border-radius: 50%; border: 4px solid #bfe3ff;
  transform: translate(-50%, -50%); animation: ring .7s ease-out forwards;
}
.float.crit { color: #ffe27a; -webkit-text-stroke-color: #c2416b; font-size: 1.6rem; }
.float.block { color: #bfe3ff; -webkit-text-stroke-color: #3b6ea8; }
.float.info { color: #fff; -webkit-text-stroke-color: #6a4bb0; font-size: .95rem; }

.faint-msg {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, .92); color: #5b4a6b; font-weight: 900;
  padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow); z-index: 3;
}

/* Efekt katmanı */
.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.float {
  position: absolute; transform: translate(-50%, 0);
  font-weight: 1000; font-size: 1.05rem; white-space: nowrap;
  color: #fff; -webkit-text-stroke: 4px #5b4a6b; paint-order: stroke fill;
  animation: float-up 1s ease-out forwards;
}
.float.big { font-size: 1.4rem; }
.float.dmg-paw { color: #ff9ec7; -webkit-text-stroke-color: #b0477b; }
.float.dmg-enemy { color: #ffb0b0; -webkit-text-stroke-color: #a33c55; }
.float.heal { color: #a6f0c6; -webkit-text-stroke-color: #2f8a63; }
.float.gold { color: #ffe27a; -webkit-text-stroke-color: #a8762a; font-size: .95rem; }
.float.xp { color: #d7c4ff; -webkit-text-stroke-color: #6a4bb0; font-size: .95rem; }
.float.item { font-size: 1.5rem; -webkit-text-stroke: 0; animation: item-pop 1.1s ease-out forwards; }
.heart { position: absolute; font-size: 1.1rem; animation: heart-up 1.1s ease-out forwards; }
.paw-fx { position: absolute; width: 44px; height: 44px; transform: translate(-50%, -50%); animation: paw-hit .5s ease-out forwards; }
.sparkle {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--c, #ffe27a); animation: sparkle .6s ease-out forwards;
}
.confetti {
  position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 3px;
  animation: confetti 1.8s ease-in forwards;
}

.levelup-banner {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%);
  text-align: center; z-index: 5; pointer-events: none;
  animation: banner 2.2s ease forwards;
}
.levelup-banner .lu-title {
  font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 1000; color: #fff;
  -webkit-text-stroke: 6px #b0477b; paint-order: stroke fill; letter-spacing: .5px;
}
.levelup-banner .lu-sub {
  display: inline-block; margin-top: 4px; background: #fff; color: var(--pink-d);
  border-radius: 999px; padding: 2px 14px; font-weight: 900; box-shadow: var(--shadow-sm);
}

/* ---------- Panel ---------- */
.panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  border: 2px solid var(--line); display: flex; flex-direction: column; min-height: 0; flex: 1;
}
.tabs {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 6px;
  border-bottom: 2px solid var(--line); position: sticky; top: 0; background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0; z-index: 2;
}
.tab {
  border: 0; background: transparent; border-radius: 16px; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 0; cursor: pointer;
  font-size: 1.15rem; color: var(--muted);
}
.tab span { font-size: .72rem; font-weight: 800; }
.tab { position: relative; }
.tab-dot { position: absolute; top: 4px; right: 18%; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--card); }
.tab.is-active { background: linear-gradient(180deg, #ffe3f0, #ffd0e5); color: var(--pink-d); }
[data-theme="dark"] .tab.is-active { background: #4a3358; color: #ffc2dc; }
.tab-body { padding: 12px; overflow: auto; }
.tab-pane { display: none; }
.tab-pane.is-active { display: block; animation: fade-in .2s ease; }

.section-title { margin: 4px 4px 10px; font-size: 1rem; font-weight: 900; display: flex; align-items: center; gap: 6px; }
.section-title small { color: var(--muted); font-weight: 700; font-size: .8rem; }

/* Hayvan kartları */
.pet-card {
  background: var(--card2); border: 2px solid var(--line); border-radius: 20px;
  padding: 10px; margin-bottom: 10px;
}
.pet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pet-portrait {
  width: 58px; height: 58px; flex: none; border-radius: 18px;
  background: linear-gradient(180deg, #fff0d9, #ffe1ef); padding: 2px;
}
[data-theme="dark"] .pet-portrait { background: linear-gradient(180deg, #4a3b5e, #3a2f4f); }
.pet-head h3 { margin: 0; font-size: 1.05rem; font-weight: 900; }
.pet-head p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; font-weight: 700; }
.pet-card.locked .pet-portrait { filter: grayscale(1) brightness(1.05); opacity: .55; }
.pet-card.locked { opacity: .9; }
.lock-badge {
  display: inline-block; margin-top: 5px; flex: none; font-size: .75rem; font-weight: 900; border-radius: 999px; padding: 3px 9px;
  background: var(--bg2); color: var(--muted); white-space: nowrap;
}
.lock-badge.soon { background: #fff1c2; color: #a8762a; }
[data-theme="dark"] .lock-badge.soon { background: #4f4527; color: #ffe27a; }

.skill {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center;
  background: var(--card); border-radius: 16px; padding: 8px; margin-top: 6px; border: 2px solid var(--line);
}
.skill-ico {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 1.3rem;
  background: linear-gradient(180deg, #ffe3f0, #f3e6ff);
}
[data-theme="dark"] .skill-ico { background: linear-gradient(180deg, #4a3358, #3b3060); }
.skill-name { font-weight: 900; font-size: .92rem; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.skill-lv { font-size: .72rem; color: var(--lilac-d); background: var(--bg2); border-radius: 999px; padding: 0 7px; }
.skill-desc { font-size: .78rem; color: var(--muted); font-weight: 700; margin-top: 1px; }
.skill-desc b { color: var(--ink); }
.skill-desc .up { color: var(--mint-d); }
.skill-prog { height: 6px; border-radius: 999px; background: var(--bg2); margin-top: 5px; overflow: hidden; }
.skill-prog > div { height: 100%; background: linear-gradient(90deg, #c7b0ff, #ff9ec7); border-radius: 999px; }
.skill .btn { min-width: 86px; display: flex; flex-direction: column; line-height: 1.05; padding: .45em .8em; }
.skill .btn small { font-size: .72rem; font-weight: 800; opacity: .95; }

/* Geliştirmeler */
.up-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center;
  background: var(--card2); border: 2px solid var(--line); border-radius: 18px; padding: 10px; margin-bottom: 8px;
}
.up-ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem;
  background: linear-gradient(180deg, #fff6c9, #ffe3b0);
}
[data-theme="dark"] .up-ico { background: linear-gradient(180deg, #4f4527, #4a3a2a); }
.up-name { font-weight: 900; }
.up-desc { font-size: .8rem; color: var(--muted); font-weight: 700; }

/* Envanter */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.inv-slot {
  min-height: 96px; border-radius: 18px; background: var(--card2); border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative;
  font-size: 1.8rem; text-align: center; padding: 8px 4px; line-height: 1.15;
}
/* Miktar ismin altında kendi satırında (isimle üst üste binmez) */
.inv-slot .qty {
  font-size: .76rem; font-weight: 900; line-height: 1.5;
  background: var(--pink); color: #fff; border-radius: 999px; padding: 0 8px; max-width: 100%;
}
.inv-slot .nm { font-size: .66rem; font-weight: 800; color: var(--muted); line-height: 1.15; padding: 0 2px; overflow-wrap: anywhere; }
.inv-slot.empty { opacity: .45; font-size: 1.2rem; }
.muted { color: var(--muted); font-weight: 700; font-size: .85rem; }

/* Profil */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.stat {
  background: var(--card2); border: 2px solid var(--line); border-radius: 16px; padding: 8px 10px;
}
.stat .k { font-size: .75rem; color: var(--muted); font-weight: 800; }
.stat .v { font-size: 1.1rem; font-weight: 1000; }
.settings { display: grid; gap: 8px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card2); border: 2px solid var(--line); border-radius: 16px; padding: 8px 10px; font-weight: 800;
}
.soon-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.soon-list span {
  background: var(--bg2); border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 800; color: var(--muted);
}

/* Bildirimler */
.toasts {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  display: flex; flex-direction: column-reverse; gap: 6px; align-items: center; pointer-events: none;
  width: min(92vw, 420px);
}
.toast {
  background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 800;
  box-shadow: var(--shadow); border: 2px solid var(--line); animation: toast-in .25s ease, toast-out .3s ease 2.6s forwards;
  text-align: center;
}
.toast.err { border-color: #ffb3c8; color: #c2416b; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(70, 40, 80, .35); backdrop-filter: blur(4px); animation: fade-in .2s ease;
}
.modal {
  width: min(100%, 380px); background: var(--card); border-radius: 30px; padding: 20px 22px 22px;
  text-align: center; box-shadow: var(--shadow); border: 3px solid var(--line);
  animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1);
}
.modal h2 { margin: 6px 0 4px; font-size: 1.35rem; font-weight: 1000; color: var(--pink-d); }
.modal-art { display: flex; justify-content: center; }
.modal-art .art { width: 100px; animation: bob 1.8s ease-in-out infinite; }
.report { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 6px; text-align: left; }
.report li {
  background: var(--card2); border: 2px solid var(--line); border-radius: 14px; padding: 6px 12px; font-weight: 800;
  display: flex; justify-content: space-between; gap: 8px;
}
.report li b { color: var(--pink-d); }
.modal p { color: var(--muted); font-weight: 700; margin: 4px 0; }

/* ---------- Masaüstü ---------- */
@media (min-width: 900px) {
  .game { height: 100vh; padding: 16px; }
  .layout { flex-direction: row; }
  .arena { flex: 1; height: auto; min-height: 480px; }
  .panel { flex: none; width: 400px; }
  .tab-body { flex: 1; }
  .topbar { padding: 10px 16px; }
  .fighters { bottom: 12%; padding: 0 8%; }
  .fighters { padding: 0 6%; }
  .hero .sprite, .enemy .sprite { width: clamp(120px, 11vw, 170px); }
  .pet .sprite { width: clamp(80px, 7.5vw, 115px); }
  .pet { margin-left: -18px; }
  .enemy.is-guard .sprite { width: clamp(170px, 19vw, 250px); }
  .enemy-head { width: clamp(150px, 15vw, 200px); }
  .float { font-size: 1.3rem; }
  .float.big { font-size: 1.7rem; }
}
@media (max-width: 600px) {
  .resources { flex: 1 1 100%; justify-content: space-between; gap: 4px; flex-wrap: nowrap; }
  .resources .chip { font-size: .8rem; padding: 2px 7px 2px 4px; gap: 2px; }
  .resources .chip-ico { font-size: .9rem; }
}
@media (max-width: 420px) {
  .chip { font-size: .85rem; padding: 2px 8px 2px 5px; }
  .avatar { width: 40px; height: 40px; }
  .stage-pill { font-size: .75rem; }
}

/* ---------- Animasyonlar ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes squish { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.04, .95); } }
@keyframes wag { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.6); } }
@keyframes drift { from { transform: translateX(-140px); } to { transform: translateX(110vw); } }
@keyframes twinkle { from { opacity: .5; } to { opacity: 1; } }
@keyframes lunge-right { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(22px) rotate(4deg); } }
@keyframes lunge-left { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(-26px) rotate(-5deg); } }
@keyframes pounce { 0%, 100% { transform: translate(0, 0); } 45% { transform: translate(40px, -26px) rotate(10deg); } 70% { transform: translate(56px, 0) scale(1.08, .92); } }
@keyframes purr { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.08, .94); } 60% { transform: scale(.96, 1.05); } }
@keyframes hurt { 0%, 100% { transform: translateX(0); filter: none; } 25% { transform: translateX(-6px); filter: brightness(1.4) saturate(.6); } 60% { transform: translateX(5px); } }
@keyframes pop-in { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes poof { 0% { transform: scale(1); opacity: 1; } 40% { transform: scale(1.15, .8); } 100% { transform: scale(.1) translateY(-20px); opacity: 0; } }
@keyframes float-up { 0% { transform: translate(-50%, 0) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -8px) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -54px) scale(1); opacity: 0; } }
@keyframes item-pop { 0% { transform: translate(-50%, 0) scale(.3); opacity: 0; } 25% { transform: translate(-50%, -30px) scale(1.25); opacity: 1; } 100% { transform: translate(-50%, -70px) scale(.8); opacity: 0; } }
@keyframes heart-up { 0% { transform: translateY(0) scale(.4); opacity: 0; } 20% { opacity: 1; transform: translateY(-10px) scale(1.1); } 100% { transform: translateY(-60px) translateX(var(--dx, 0)) scale(.8); opacity: 0; } }
@keyframes paw-hit { 0% { transform: translate(-50%, -50%) scale(.3) rotate(-20deg); opacity: 0; } 30% { transform: translate(-50%, -50%) scale(1.2) rotate(0); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; } }
@keyframes sparkle { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }
@keyframes confetti { to { transform: translateY(110%) translateY(400px) rotate(540deg); opacity: .2; } }
@keyframes banner { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 0; } }
@keyframes bump { 50% { transform: scale(1.15); } }
@keyframes fly { 0%, 100% { transform: translate(0, 0) rotate(-3deg); } 50% { transform: translate(6px, -9px) rotate(4deg); } }
@keyframes hop-idle { 0%, 60%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-8px) scale(.97, 1.04); } }
@keyframes bark { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.15, .9) translateX(6px); } 60% { transform: scale(.95, 1.06); } }
@keyframes dash { 0%, 100% { transform: translateX(0); filter: none; } 45% { transform: translateX(var(--reach, 120px)) scaleX(1.15); filter: blur(1.5px); } }
@keyframes hop-attack { 0%, 100% { transform: translate(0, 0); } 40% { transform: translate(calc(var(--reach, 100px) * .5), -60px) rotate(12deg); } 70% { transform: translate(var(--reach, 100px), 0) scale(1.1, .9); } }
@keyframes swoop { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(var(--reach, 120px), 50px) rotate(20deg); } }
@keyframes sing { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg) translateY(-4px); } 75% { transform: rotate(10deg) translateY(-4px); } }
@keyframes ring { from { width: 20px; height: 20px; opacity: 1; } to { width: 120px; height: 120px; opacity: 0; } }
@keyframes bubble { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.04); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(12px); opacity: 0; } }
@keyframes petal-fall {
  0% { transform: translate(0, 0) rotate(0); }
  100% { transform: translate(var(--dx, -60px), 420px) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}


/* =================== 3. Aşama =================== */

.title-line { font-size: .72rem; font-weight: 900; color: var(--lilac-d); margin: -2px 0 3px; }

/* Bölge teması: JS .scene üzerine --sky-top vb. yazar. Koyu temada üstüne gece örtüsü. */
.scene::after { content: ''; position: absolute; inset: 0; background: rgba(25, 15, 50, 0); transition: background .4s; pointer-events: none; }
[data-theme="dark"] .scene::after { background: rgba(25, 15, 50, .42); }
.scene, .hill, .ground { transition: background-color .6s, background .6s; }

.season-chip {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(255, 255, 255, .85); color: #5b4a6b; border-radius: 999px; padding: 3px 10px;
  font-weight: 900; font-size: .78rem; box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .season-chip { background: rgba(45, 37, 64, .85); color: var(--ink); }
@media (max-width: 520px) {
  .season-chip { top: 44px; left: 50%; transform: translateX(-50%); }
}

/* Mevsim parçacıkları */
.petal.snow { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgba(255, 255, 255, .9); opacity: .95; }
.petal.leaf { width: 12px; height: 9px; border-radius: 12px 0 12px 0; background: #ff9b4d; }
.petal.leaf:nth-child(3n) { background: #f2c14e; }
.petal.leaf:nth-child(3n+1) { background: #e8743b; }
.petal.sparkle-sun { width: 6px; height: 6px; border-radius: 50%; background: #fff7c2; box-shadow: 0 0 8px #ffe27a; }
.season-winter .ground::after, .season-winter .hill::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .55) 30%, rgba(255, 255, 255, .15));
}
.season-autumn .hill.h1 { filter: hue-rotate(-60deg) saturate(1.2); }
.season-autumn .hill.h2 { filter: hue-rotate(-45deg) saturate(1.1); }
.season-summer .sun { transform: scale(1.25); box-shadow: 0 0 0 16px rgba(255, 230, 140, .35), 0 0 60px rgba(255, 200, 80, .8); }

/* Boss */
.enemy.is-boss .sprite { width: clamp(118px, 32vw, 200px); filter: drop-shadow(0 0 10px rgba(255, 120, 170, .55)); }
.enemy.is-boss .enemy-name { background: linear-gradient(90deg, #ffd6e8, #e8dcff); color: #a3366a; }
.enemy.is-boss .enemy-hp { height: 16px; }
.enemy.is-boss .enemy-hp .bar-fill { background: linear-gradient(90deg, #ff7aa2, #c77dff); }
@media (min-width: 900px) { .enemy.is-boss .sprite { width: clamp(170px, 16vw, 240px); } }
.stage-pill.boss .stage-progress { background: linear-gradient(90deg, #ff7aa2, #c77dff); }
.stage-pill.cleared .stage-progress { background: var(--mint-d); }
.arena.shake { animation: shake .45s ease; }
.float.special { color: #fff; -webkit-text-stroke-color: #a3366a; font-size: 1.35rem; }

/* Kartlar: harita, görevler, başarımlar */
.zone-card {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center;
  border: 2px solid var(--line); border-radius: 18px; padding: 8px; margin-bottom: 8px; background: var(--card2);
}
.zone-card.current { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 158, 199, .25); }
.zone-card.locked { opacity: .6; }
.zone-swatch {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 1.5rem;
  border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
.zone-card h3 { margin: 0; font-size: .98rem; font-weight: 900; }
.zone-meta { font-size: .76rem; color: var(--muted); font-weight: 800; }
.zone-meta b { color: var(--ink); }
.zone-prog { height: 6px; border-radius: 999px; background: var(--bg2); margin-top: 4px; overflow: hidden; }
.zone-prog > div { height: 100%; background: linear-gradient(90deg, #a6efd6, #4cc5a0); }
.badge { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: .72rem; font-weight: 900; background: var(--bg2); color: var(--muted); }
.badge.ok { background: #d9f7ea; color: #2f8a63; }
[data-theme="dark"] .badge.ok { background: #24493e; color: #a6f0c6; }

.quest {
  border: 2px solid var(--line); border-radius: 18px; padding: 10px; margin-bottom: 8px; background: var(--card2);
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center;
}
.quest.seasonal { border-color: #cfe6ff; background: linear-gradient(135deg, var(--card2), rgba(191, 227, 255, .25)); }
.quest.done { opacity: .6; }
.quest-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 1.3rem; background: linear-gradient(180deg, #fff6c9, #ffe3b0); }
[data-theme="dark"] .quest-ico { background: linear-gradient(180deg, #4f4527, #4a3a2a); }
.quest-name { font-weight: 900; font-size: .92rem; }
.quest-text { font-size: .78rem; color: var(--muted); font-weight: 700; }
.quest-bar { position: relative; height: 12px; border-radius: 999px; background: var(--bg2); margin-top: 5px; overflow: hidden; }
.quest-bar > div { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ffe27a, #ff9ec7); border-radius: 999px; transition: width .3s; }
.quest-bar > span { position: relative; display: block; text-align: center; font-size: .62rem; font-weight: 900; line-height: 12px; }
.reset-note { font-size: .78rem; color: var(--muted); font-weight: 800; margin: -4px 4px 10px; }

.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ach {
  border: 2px solid var(--line); border-radius: 16px; padding: 8px; background: var(--card2);
  display: grid; grid-template-columns: 32px 1fr; gap: 6px; align-items: center;
}
.ach .e { font-size: 1.4rem; filter: grayscale(1); opacity: .5; text-align: center; }
.ach.got .e { filter: none; opacity: 1; }
.ach.got { border-color: #ffe27a; background: linear-gradient(135deg, var(--card2), rgba(255, 226, 122, .18)); }
.ach .n { font-weight: 900; font-size: .82rem; line-height: 1.1; }
.ach .d { font-size: .7rem; color: var(--muted); font-weight: 700; line-height: 1.15; }
.ach .t { font-size: .66rem; font-weight: 900; color: var(--lilac-d); }

.col-group { margin-bottom: 12px; }
.col-group h3 { font-size: .85rem; font-weight: 900; margin: 0 4px 6px; display: flex; justify-content: space-between; }
.col-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.col-item {
  aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); background: var(--card2);
  display: grid; place-items: center; font-size: 1.5rem; position: relative;
}
.col-item.missing { color: transparent; text-shadow: 0 0 0 rgba(120, 100, 140, .28); }
[data-theme="dark"] .col-item.missing { text-shadow: 0 0 0 rgba(220, 200, 240, .22); }
.col-item .qty { position: absolute; right: 3px; bottom: 1px; font-size: .62rem; font-weight: 900; color: var(--muted); }
.col-trophies { grid-template-columns: repeat(5, 1fr); }

@keyframes shake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-6px, 3px); } 40% { transform: translate(6px, -3px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }

/* =================== Görünümler & Yeniden Doğuş =================== */
.skins { margin-top: 8px; }
.skins summary {
  cursor: pointer; font-weight: 900; font-size: .88rem; padding: 6px 10px; border-radius: 12px;
  background: var(--card); border: 2px solid var(--line); list-style: none;
}
.skins summary::-webkit-details-marker { display: none; }
.skins summary::after { content: ' ▾'; color: var(--muted); }
.skins[open] summary::after { content: ' ▴'; }
.skin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.skin-tile {
  border: 2px solid var(--line); border-radius: 14px; background: var(--card); padding: 4px 2px 5px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px; position: relative; transition: transform .1s;
}
.skin-tile:active { transform: scale(.96); }
.skin-prev { width: 100%; max-width: 70px; }
.skin-name { font-size: .68rem; font-weight: 900; line-height: 1.1; text-align: center; }
.skin-cat { font-size: .58rem; font-weight: 800; color: var(--muted); }
.skin-state { font-size: .66rem; font-weight: 900; color: var(--lilac-d); }
.skin-tile.cat-profession { background: linear-gradient(180deg, var(--card), rgba(191, 227, 255, .25)); }
.skin-tile.cat-fantasy { background: linear-gradient(180deg, var(--card), rgba(205, 180, 255, .3)); }
.skin-tile:not(.owned) .skin-prev { filter: saturate(.35) brightness(1.05); opacity: .75; }
.skin-tile.poor .skin-state { color: var(--muted); }
.skin-tile.worn { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 158, 199, .3); }
.skin-tile.worn .skin-state { color: var(--pink-d); }

.rebirth-card {
  border-radius: 20px; padding: 10px; margin-bottom: 12px;
  background: linear-gradient(135deg, #fff3c4, #ffd6e8 60%, #e8dcff);
  border: 2px solid #ffe27a; color: #5b4a6b;
}
[data-theme="dark"] .rebirth-card { background: linear-gradient(135deg, #4f4527, #4a3358 60%, #3b3060); color: var(--ink); border-color: #8a7a3a; }
.rb-top { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; }
.rb-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(255, 255, 255, .7); }
.rebirth-card .up-desc { color: inherit; opacity: .85; }
.rebirth-card > .up-desc { margin-top: 6px; }
.modal-cancel { margin-top: 8px; }

/* =================== Ses ve pencereler =================== */
.sound-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .85); box-shadow: var(--shadow-sm); cursor: pointer; font-size: 1rem;
}
[data-theme="dark"] .sound-btn { background: rgba(45, 37, 64, .85); }
.sound-row { display: flex; align-items: center; gap: 8px; }
.sound-row input[type="range"] { width: 110px; accent-color: var(--pink-d); }
/* Uzun içerikli pencereler kaydırılır, butonlar her zaman görünür */
.modal { max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.modal #modal-body { overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
.modal-art { flex: none; }
.report-h { font-size: .9rem; font-weight: 900; margin: 10px 4px 0; text-align: left; }
.ach-report li { font-size: .85rem; }
.ach-report li b { font-size: .75rem; text-align: right; }

/* =================== Mobil düzenlemeler =================== */
.loot-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.loot {
  background: var(--card2); border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px;
  font-weight: 900; font-size: .85rem;
}
.loot.rare { border-color: #ffe27a; background: linear-gradient(135deg, var(--card2), rgba(255, 226, 122, .25)); }
.ach-details > summary { cursor: pointer; list-style: none; }
.ach-details > summary::-webkit-details-marker { display: none; }
.ach-details > summary::after { content: '▾'; color: var(--muted); font-size: .8rem; margin-left: auto; }
.ach-details[open] > summary::after { content: '▴'; }
.theme-btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.resources::-webkit-scrollbar { display: none; }

@media (max-width: 600px) {
  .resources { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 4px; scrollbar-width: none; }
  .resources .chip { font-size: .76rem; padding: 2px 7px 2px 4px; gap: 2px; flex: none; }
  .resources .chip-ico { font-size: .82rem; }
  .theme-btns .btn { padding: .35em .65em; font-size: .78rem; min-height: 34px; }
  .setting-row { padding: 8px; }
  .sound-row input[type="range"] { width: 90px; height: 24px; }
  /* Başarımlar: tek sütun, kompakt satır */
  .ach-grid { grid-template-columns: 1fr; gap: 5px; }
  .ach { grid-template-columns: 28px 1fr; padding: 6px 8px; }
  .ach .e { font-size: 1.15rem; }
  .ach .t { display: inline; margin-left: 4px; }
  .quest { grid-template-columns: 36px 1fr auto; gap: 8px; padding: 8px; }
  .quest-ico { width: 36px; height: 36px; }
  .quest .btn { padding: .45em .75em; font-size: .82rem; }
  .pet-head p { font-size: .78rem; }
  .skill { grid-template-columns: 34px 1fr auto; padding: 6px; }
  .skill-ico { width: 34px; height: 34px; font-size: 1.1rem; }
  .skill .btn { min-width: 76px; }
}
@media (max-width: 380px) {
  .tab span { font-size: .64rem; }
  .tab { font-size: 1.05rem; padding: 5px 2px; }
  .stage-pill { font-size: .7rem; padding: 3px 9px; gap: 4px; }
  .zone-card { grid-template-columns: 44px 1fr auto; gap: 8px; }
  .zone-swatch { width: 44px; height: 44px; font-size: 1.25rem; }
}


/* ===================== Giriş: Google ve 2FA ===================== */
.google-area { margin-top: 14px; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; font-size: .85rem; margin-bottom: 12px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
.twofa-head { font-size: 1.1rem; text-align: center; }
.hint { color: var(--muted); font-weight: 700; font-size: .85rem; margin: 0; line-height: 1.35; }

/* ===================== Karakter seçimi ===================== */
.hero-pick {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: rgba(70, 40, 80, .45); backdrop-filter: blur(5px); animation: fade-in .25s ease;
}
.hero-pick[hidden] { display: none; }
.hero-pick-card {
  width: min(100%, 460px); background: var(--card); border-radius: 30px; padding: 20px; text-align: center;
  box-shadow: var(--shadow); border: 3px solid var(--line); animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1);
  max-height: calc(100dvh - 32px); overflow-y: auto;
}
.hero-pick-card h2 { margin: 0 0 4px; color: var(--pink-d); }
.hero-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.hero-choice {
  font: inherit; color: var(--ink); cursor: pointer; border: 3px solid var(--line); border-radius: 24px; padding: 10px 8px 12px;
  background: linear-gradient(180deg, var(--card2), var(--bg2)); display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .15s, border-color .15s;
}
.hero-choice:hover:not(:disabled), .hero-choice:focus-visible { border-color: var(--pink); transform: translateY(-3px); }
.hero-choice:active:not(:disabled) { transform: scale(.97); }
.hero-choice b { font-size: 1.15rem; }
.hero-choice span { font-size: .78rem; color: var(--muted); font-weight: 700; line-height: 1.25; }
.hero-choice-art { width: min(140px, 34vw); animation: bob 2.4s ease-in-out infinite; }
.hero-choice:nth-child(2) .hero-choice-art { animation-delay: -1.1s; }

/* ===================== Profil alt sekmeleri ===================== */
.seg.seg-4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 12px; }
.seg.seg-4 .seg-btn { padding: .55em .2em; font-size: .8rem; white-space: nowrap; }
.sub-pane { animation: fade-in .2s ease; }
.sub-pane[hidden] { display: none; }

.hero-stage {
  display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center;
  background: linear-gradient(180deg, #ffeef7, #f1ebff); border-radius: 24px; padding: 10px 14px; margin-bottom: 12px;
  border: 2px solid var(--line);
}
[data-theme="dark"] .hero-stage { background: linear-gradient(180deg, #3b2f52, #2f2846); }
.hero-big { width: 130px; animation: bob 2.4s ease-in-out infinite; }
.hero-name { font-size: 1.3rem; font-weight: 1000; color: var(--pink-d); margin-bottom: 4px; }
.gear-sum { display: grid; gap: 2px; font-size: .86rem; font-weight: 800; color: var(--muted); }
.gear-sum b { color: var(--ink); }

.slot-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 14px; }
.slot {
  font: inherit; color: var(--ink); cursor: pointer; border: 2px solid var(--line); border-radius: 16px; background: var(--card2);
  padding: 6px 3px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
}
.slot-k { font-size: .62rem; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.slot-ico { font-size: 1.6rem; line-height: 1.2; }
.slot-nm { font-size: .62rem; font-weight: 800; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.slot.empty .slot-ico { opacity: .3; filter: grayscale(1); }
.slot.empty .slot-nm { color: var(--muted); }

.hero-row { display: grid; gap: 8px; }
.hero-opt {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center;
  background: var(--card2); border: 2px solid var(--line); border-radius: 18px; padding: 6px 10px;
}
.hero-opt.on { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 158, 199, .25); }
.hero-opt-art { width: 56px; }
.hero-opt .muted { font-size: .78rem; }

/* Ekipman */
.gear-res { display: flex; gap: 8px; margin-bottom: 6px; }
.gear-help { margin: 4px 2px 10px; font-size: .8rem; line-height: 1.35; }
.chip-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 4px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-btn {
  font: inherit; font-weight: 800; font-size: .8rem; color: var(--muted); cursor: pointer; white-space: nowrap;
  border: 2px solid var(--line); background: var(--card2); border-radius: 999px; padding: .35em .9em;
}
.chip-btn.is-active { background: var(--pink); border-color: var(--pink); color: #fff; }
.gear-list { display: grid; gap: 6px; }
.gear-card {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center;
  background: var(--card2); border: 2px solid var(--line); border-radius: 18px; padding: 8px;
}
.gear-card[hidden] { display: none; }
.gear-ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45rem;
  background: var(--rar-bg, var(--bg2)); box-shadow: inset 0 0 0 2px var(--rar, transparent);
}
.gear-main { min-width: 0; }
.gear-btns { display: flex; flex-direction: column; gap: 4px; min-width: 92px; }
.gear-btns .btn { padding: .4em .7em; font-size: .8rem; }
.gear-btns .btn[hidden] { display: none; }
.gear-btns .btn.poor { filter: saturate(.4); opacity: .75; }
.gear-card.worn { border-color: var(--pink); }
.gear-card:not(.owned) .gear-ico { filter: saturate(.6); }
.rar { font-size: .64rem; font-weight: 900; border-radius: 999px; padding: 0 7px; color: #fff; background: var(--rar); }
.r-common { --rar: #9fb3c8; --rar-bg: #eef3f8; }
.r-rare { --rar: #5aa9f0; --rar-bg: #e3f1ff; }
.r-epic { --rar: #a582f0; --rar-bg: #efe6ff; }
.r-legendary { --rar: #f2a93b; --rar-bg: #fff3d6; }
[data-theme="dark"] .r-common { --rar-bg: #3a3f4f; }
[data-theme="dark"] .r-rare { --rar-bg: #2b3d58; }
[data-theme="dark"] .r-epic { --rar-bg: #3e3160; }
[data-theme="dark"] .r-legendary { --rar-bg: #4f4527; }
.slot.r-common, .slot.r-rare, .slot.r-epic, .slot.r-legendary { border-color: var(--rar); background: var(--rar-bg); }
.gear-card.r-legendary.owned { background: linear-gradient(90deg, var(--card2), rgba(255, 226, 122, .18)); }

/* Hesap */
.account { display: grid; gap: 8px; margin-bottom: 14px; }
.acc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--card2); border: 2px solid var(--line); border-radius: 16px; padding: 8px 10px; font-weight: 800;
}
.acc-block { background: var(--card2); border: 2px solid var(--line); border-radius: 16px; padding: 10px; display: grid; gap: 8px; justify-items: start; }
.acc-details { display: block; }
.acc-details[open] > summary { margin-bottom: 8px; }
.acc-title { font-weight: 900; display: flex; align-items: center; gap: 6px; cursor: default; }
summary.acc-title { cursor: pointer; }
.acc-text { margin: 0; font-size: .84rem; font-weight: 700; line-height: 1.35; }
.acc-inline { display: flex; gap: 6px; width: 100%; }
.acc-input {
  flex: 1; min-width: 0; font: inherit; font-weight: 700; color: var(--ink); background: var(--card);
  border: 2px solid var(--line); border-radius: 12px; padding: .45em .7em;
}
.acc-form { display: grid; gap: 6px; width: 100%; }
.acc-form .btn { justify-self: start; }
.g-logo {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  color: #4285f4; font-weight: 1000; font-size: .8rem; box-shadow: 0 0 0 1.5px #dadce0;
}
.acc-block .google-btn { width: 100%; }
.totp-setup { display: grid; gap: 8px; width: 100%; }
.acc-steps { margin: 0; padding-left: 20px; font-size: .82rem; font-weight: 700; line-height: 1.35; }
.qr { width: min(200px, 60vw); justify-self: center; background: #fff; border-radius: 14px; padding: 4px; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { font-weight: 900; letter-spacing: .04em; word-break: break-all; color: var(--ink); }
.recovery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.recovery code { background: var(--bg2); border-radius: 10px; padding: 6px; font-weight: 900; font-size: .95rem; letter-spacing: .05em; }

@media (max-width: 600px) {
  .hero-stage { grid-template-columns: 104px 1fr; padding: 8px 10px; }
  .hero-big { width: 104px; }
  .slot-grid { gap: 4px; }
  .slot { padding: 5px 2px; border-radius: 13px; }
  .slot-ico { font-size: 1.35rem; }
  .gear-card { grid-template-columns: 38px 1fr auto; gap: 6px; padding: 7px; }
  .gear-ico { width: 38px; height: 38px; font-size: 1.25rem; border-radius: 12px; }
  .gear-btns { min-width: 84px; }
}
@media (max-width: 380px) {
  .seg.seg-4 .seg-btn { font-size: .72rem; }
  .slot-nm { font-size: .56rem; }
}
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

.legal { margin: 14px 0 0; font-size: .78rem; font-weight: 700; }
.legal a { color: var(--muted); }

.acc-danger { border-color: #ffc2d1; }
.acc-danger > summary { color: #d9466f; }
.btn-danger { color: #fff; background: linear-gradient(180deg, #ff9aa8, #e5536f); box-shadow: 0 4px 0 #b83a55; }
.btn-danger:active:not(:disabled) { box-shadow: 0 1px 0 #b83a55; }
[data-theme="dark"] .acc-danger { border-color: #6b3446; }

/* =================== Oyun açıkken bonus, reklamlar, boss dirilişi =================== */
.rate-chip {
  position: absolute; top: 48px; right: 8px; z-index: 3;
  background: linear-gradient(180deg, #fff3b0, var(--lemon)); color: #8a5a00; border-radius: 999px;
  padding: 2px 9px; font-weight: 1000; font-size: .78rem; box-shadow: var(--shadow-sm);
  animation: rate-glow 2.4s ease-in-out infinite;
}
@keyframes rate-glow { 50% { box-shadow: 0 0 0 4px rgba(255, 226, 122, .45), var(--shadow-sm); } }

/* Kayan bilgi şeridi */
.ticker {
  position: absolute; left: 0; right: 0; top: 34%; z-index: 4; overflow: hidden; pointer-events: none;
  background: linear-gradient(90deg, rgba(240, 111, 166, .0), rgba(240, 111, 166, .92) 12%, rgba(165, 130, 240, .92) 88%, rgba(165, 130, 240, 0));
  padding: 7px 0; transform: rotate(-2deg);
  box-shadow: 0 4px 14px rgba(160, 60, 130, .25);
  animation: ticker-in .35s ease;
}
.ticker span {
  display: inline-block; white-space: nowrap; padding-left: 100%; color: #fff; font-weight: 1000; font-size: .95rem;
  text-shadow: 0 1px 0 rgba(120, 30, 90, .4);
  animation: ticker-move 11s linear forwards;
}
@keyframes ticker-move { to { transform: translateX(-100%); } }
@keyframes ticker-in { from { opacity: 0; transform: rotate(-2deg) scaleY(0); } }
@media (prefers-reduced-motion: reduce) {
  .ticker span { animation-duration: 16s; }
  .rate-chip { animation: none; }
}

/* Reklam butonu: dikkat çeken sarı-turuncu */
.btn-ad {
  color: #6b3d00;
  background: linear-gradient(180deg, #fff1a8, var(--lemon-d));
  box-shadow: 0 4px 0 #d39a22, var(--shadow-sm);
}
.btn-ad:active:not(:disabled) { box-shadow: 0 1px 0 #d39a22; }
.btn.btn-ad.offer { animation: offer-pulse 1.4s ease-in-out infinite; }
@keyframes offer-pulse { 50% { transform: scale(1.06); } }
.ad-dot { background: var(--lemon-d); }

.revive-overlay, .ad-overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: rgba(50, 25, 60, .5); backdrop-filter: blur(4px); animation: fade-in .2s ease;
}
.ad-overlay { z-index: 80; background: rgba(20, 12, 30, .82); }
.revive-box, .ad-box {
  width: min(100%, 360px); background: var(--card); border-radius: 28px; padding: 20px; text-align: center;
  border: 3px solid var(--line); box-shadow: var(--shadow); animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1);
}
.revive-box h2 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 1000; color: var(--pink-d); }
.revive-box p { color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.revive-bar, .ad-bar { height: 10px; margin: 4px 0 14px; }
.revive-bar .bar-fill { background: linear-gradient(90deg, var(--coral), var(--pink-d)); transition: width .1s linear; }
.revive-btns { display: grid; gap: 8px; }
.ad-top { display: flex; justify-content: space-between; align-items: center; }
.ad-tag { font-size: .75rem; font-weight: 900; color: var(--muted); background: var(--card2); border-radius: 8px; padding: 2px 8px; }
.ad-close { border: 0; background: transparent; font-size: 1.1rem; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.ad-body { padding: 10px 0; }
.ad-body p { margin: 4px 0; font-weight: 700; }
.ad-emoji { font-size: 3rem; }
.ad-bar .bar-fill { background: linear-gradient(90deg, var(--lemon), var(--lemon-d)); }
.ad-count { color: var(--muted); }
.rate-note { background: #fff7d6; color: #8a5a00 !important; border-radius: 12px; padding: 6px 10px; }
[data-theme="dark"] .rate-note { background: rgba(255, 226, 122, .15); color: var(--lemon) !important; }

/* Bilgiler */
.info-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.info-list li {
  background: var(--card2); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; font-weight: 700;
  font-size: .9rem; line-height: 1.4;
}
.info-list b { color: var(--pink-d); }
