/* ============================================================
   STYLE.CSS — Idle RPG Dark Fantasy Teması
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ============ CSS TOKENS ============ */
:root {
  --bg-deep:       #07070f;
  --bg-panel:      #0e0e1c;
  --bg-card:       #13132a;
  --bg-glass:      rgba(15, 15, 30, 0.82);
  --border:        rgba(120, 100, 200, 0.2);
  --border-glow:   rgba(180, 140, 255, 0.5);

  --gold:          #c9a84c;
  --gold-light:    #f0d070;
  --gold-dim:      #7a6030;

  --purple:        #7b5ce5;
  --purple-light:  #a07dff;
  --purple-dark:   #3d2b8a;

  --red:           #e05252;
  --red-dark:      #8c2222;
  --green:         #4caf50;
  --green-dark:    #2e7d32;
  --blue:          #5b8fdc;
  --blue-light:    #82b3ff;
  --orange:        #ff9800;

  --text-primary:  #e8e0f0;
  --text-dim:      #8a80a0;
  --text-gold:     #d4a843;

  --font-title:    'Cinzel', serif;
  --font-body:     'Inter', sans-serif;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow-panel:  0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
  --shadow-glow:   0 0 20px rgba(120, 80, 220, 0.4);
}

/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ============ LAYOUT ============ */
#game-root {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(180deg, #0a0818 0%, #070712 60%, #0a0a14 100%);
  position: relative;
  overflow: hidden;
}

/* Arka plan parlaklığı */
#game-root::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(100, 60, 200, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============ ÜST BAR ============ */
#top-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(10, 8, 24, 0.95);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.top-bar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#current-chapter-display {
  font-family: var(--font-title);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

#total-level {
  font-size: 11px;
  color: var(--purple-light);
}

.top-bar-resources {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}

.resource-item .res-icon { font-size: 15px; }
#gold-amount { color: var(--gold); }
#wood-amount { color: #a0724a; }
#leather-amount { color: #b0824a; }
#iron-amount  { color: #9098a8; }

.top-bar-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 5px 8px;
  transition: all 0.2s;
}
.icon-btn:hover { background: var(--purple-dark); border-color: var(--purple); color: var(--text-primary); }

/* ============ SAVAŞ ALANI ============ */
#battle-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

/* Bölge adı */
#region-name {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-title);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  z-index: 5;
}

/* Aktif efektler */
#active-effects {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--gold);
  z-index: 5;
  white-space: nowrap;
}

/* Canavar alanı */
#monster-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  padding: 16px;
}

#monster-area:active #monster-sprite { transform: scale(0.93); }

#monster-sprite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform 0.12s ease;
  position: relative;
}

.monster-tag {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}
.monster-tag.boss { background: var(--red-dark); color: var(--red); border: 1px solid var(--red); }
.monster-tag.miniboss { background: var(--purple-dark); color: var(--purple-light); border: 1px solid var(--purple); }

#monster-emoji-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse, rgba(80,50,150,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

/* Canavar boss parlaması */
#monster-emoji-wrap.boss-glow {
  box-shadow: 0 0 40px rgba(220, 50, 50, 0.3);
}
#monster-emoji-wrap.miniboss-glow {
  box-shadow: 0 0 30px rgba(120, 80, 220, 0.3);
}

#monster-emoji {
  font-size: 100px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.7));
  transition: transform 0.1s ease;
  display: block;
  text-align: center;
}

#monster-name {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(150, 100, 255, 0.4);
  text-align: center;
}

/* HP Bar */
.monster-hp-wrap {
  width: 260px;
  max-width: 90%;
}
.monster-hp-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.monster-hp-track {
  height: 10px;
  background: var(--bg-card);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
}
#monster-hp-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.15s ease, background-color 0.3s ease;
  box-shadow: 0 0 8px currentColor;
}

/* ============ ALT PANEL — KARAKTERLER ============ */
#bottom-panel {
  flex-shrink: 0;
  background: rgba(8, 8, 18, 0.97);
  border-top: 1px solid var(--border);
  padding: 10px 8px;
  position: relative;
  z-index: 10;
}

#char-row {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 6px;
}

/* ============ KARAKTER İKONU ============ */
.char-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: calc(25% - 6px);
  max-width: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 4px 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.char-icon:active { transform: scale(0.95); }

.char-icon:hover:not(.locked) {
  border-color: var(--purple);
  box-shadow: 0 0 12px rgba(120, 80, 220, 0.3);
}

.char-icon.locked {
  opacity: 0.5;
  cursor: default;
}

/* Skill hazır: mavi çerçeve parlaması */
.char-icon.skill-ready {
  border-color: var(--blue);
  box-shadow: 0 0 16px rgba(90, 140, 220, 0.5), inset 0 0 10px rgba(90, 140, 220, 0.1);
  animation: skillPulse 1.5s infinite;
}

/* Taunt aktif: altın çerçeve */
.char-icon.taunting {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(200, 160, 60, 0.5);
}

/* Ölü */
.char-icon.dead {
  opacity: 0.45;
  border-color: var(--red-dark);
  filter: grayscale(0.7);
}

/* Canlanmaya hazır */
.char-icon.revive-ready {
  opacity: 1;
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(76, 175, 80, 0.5);
  animation: revivePulse 0.8s infinite;
}

.char-dps {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 8px;
  color: var(--gold-dim);
}

.char-portrait {
  font-size: 28px;
  line-height: 1;
}
.locked-portrait { opacity: 0.4; }

.char-name {
  font-size: 9px;
  color: var(--text-dim);
  text-align: center;
  font-weight: 500;
}

.char-level {
  font-size: 8px;
  color: var(--purple-light);
}

.char-unlock-hint {
  font-size: 8px;
  color: var(--text-dim);
  text-align: center;
}

.char-cooldown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
  text-shadow: 0 0 8px var(--red);
  z-index: 5;
}

.char-revive-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  z-index: 5;
  white-space: nowrap;
}

.char-bars {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.char-hp-bar-wrap, .char-mana-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}
.char-hp-bar {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.2s ease;
}
.char-mana-bar {
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.skill-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 12px;
  animation: skillPulse 1.5s infinite;
}

/* Alt butonlar */
.bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding: 0 4px;
}

.bottom-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  padding: 5px 10px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bottom-btn:hover { border-color: var(--purple); color: var(--text-primary); }

#chapter-select-btn {
  background: linear-gradient(135deg, var(--purple-dark), rgba(60, 30, 100, 0.8));
  border-color: var(--purple);
  color: var(--purple-light);
  font-weight: 600;
}
#chapter-select-btn:hover { box-shadow: 0 0 12px rgba(120, 80, 220, 0.4); }

#team-btn {
  background: linear-gradient(135deg, rgba(30, 60, 80, 0.9), rgba(20, 40, 60, 0.8));
  border-color: var(--blue);
  color: var(--blue-light);
  font-weight: 600;
}

/* ============ MODAL OVERLAY ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px 16px 32px;
  box-shadow: var(--shadow-panel);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.show .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-title {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.modal-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  transition: all 0.2s;
}
.modal-close:hover { border-color: var(--red); color: var(--red); }

/* ============ CHAPTER MODAL ============ */
.chapter-region {
  margin-bottom: 20px;
}
.chapter-region-title {
  font-family: var(--font-title);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chapter-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-body);
  padding: 10px 12px;
  text-align: left;
  transition: all 0.2s;
  position: relative;
}
.chapter-btn.locked {
  opacity: 0.4;
  cursor: not-allowed;
}
.chapter-btn.unlocked:hover {
  border-color: var(--purple);
  background: rgba(80, 50, 150, 0.15);
}
.chapter-btn.current {
  border-color: var(--gold);
  background: rgba(200, 160, 60, 0.08);
}
.chapter-btn.is-boss { border-color: var(--red-dark); }
.chapter-btn.is-boss.unlocked:hover { border-color: var(--red); }
.chapter-btn.is-miniboss { border-color: var(--purple-dark); }

.ch-emoji { font-size: 20px; width: 28px; text-align: center; }
.ch-num { font-size: 10px; color: var(--text-dim); min-width: 20px; }
.ch-name { font-size: 12px; font-weight: 500; flex: 1; }
.ch-tag {
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 700;
  background: var(--red-dark);
  color: var(--red);
}
.ch-tag.min { background: var(--purple-dark); color: var(--purple-light); }
.ch-lock { margin-left: auto; font-size: 12px; }

/* ============ EKİP PANELİ ============ */
#team-chars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.team-char-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.team-char-card:hover:not(.locked) { border-color: var(--purple); }
.team-char-card.selected { border-color: var(--gold); background: rgba(200, 160, 60, 0.06); }
.team-char-card.locked { opacity: 0.5; cursor: default; }

.team-char-portrait {
  font-size: 32px;
  flex-shrink: 0;
}
.team-char-portrait.locked { opacity: 0.4; }

.team-char-name { font-size: 13px; font-weight: 600; }
.team-char-role { font-size: 10px; color: var(--text-dim); }
.team-char-level { font-size: 10px; color: var(--purple-light); margin-top: 2px; }
.team-char-locked-hint { font-size: 9px; color: var(--text-dim); margin-top: 4px; }

.team-exp-bar-wrap {
  width: 100%;
  height: 3px;
  background: var(--bg-glass);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.team-exp-bar {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.team-exp-text { font-size: 8px; color: var(--text-dim); margin-top: 2px; }

/* Karakter detay */
#char-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.char-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.char-detail-portrait { font-size: 44px; }
.char-detail-name { font-family: var(--font-title); font-size: 16px; color: var(--gold); }
.char-detail-role { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.char-detail-level { font-size: 11px; color: var(--purple-light); margin-top: 4px; }

.char-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat-item {
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-align: center;
  border: 1px solid var(--border);
}
.stat-icon { font-size: 14px; display: block; margin-bottom: 2px; }
.stat-label { font-size: 9px; color: var(--text-dim); display: block; }
.stat-value { font-size: 13px; font-weight: 600; color: var(--text-primary); display: block; }

.char-skill-box {
  background: rgba(80, 50, 150, 0.12);
  border: 1px solid var(--purple-dark);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 14px;
}
.skill-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-light);
  margin-bottom: 4px;
}
.skill-cost {
  font-size: 10px;
  color: var(--blue-light);
  margin-left: 6px;
}
.skill-desc { font-size: 11px; color: var(--text-dim); line-height: 1.5; }

.section-title {
  font-size: 11px;
  color: var(--gold-dim);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.item-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.item-slot {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  position: relative;
}
.item-slot.filled { border-color: rgba(200, 160, 60, 0.3); }

.item-slot-icon { font-size: 22px; margin-bottom: 4px; }
.item-slot-name { font-size: 10px; color: var(--text-dim); }
.item-slot-level {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  margin: 2px 0;
}
.item-slot-bonus { font-size: 9px; color: var(--green); }
.item-slot-hint { font-size: 9px; color: var(--text-dim); margin-top: 2px; }

.item-upgrade-cost {
  display: flex;
  gap: 4px;
  justify-content: center;
  font-size: 10px;
  margin: 4px 0;
}
.cost-ok { color: var(--green); }
.cost-nok { color: var(--red); }

.upgrade-btn {
  width: 100%;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  margin-top: 4px;
  transition: all 0.2s;
}
.can-upgrade { background: linear-gradient(135deg, var(--green-dark), #1b5e20); color: #c8e6c9; }
.can-upgrade:hover { opacity: 0.85; }
.cant-upgrade { background: var(--bg-card); color: var(--text-dim); cursor: not-allowed; }

/* ============ OFFLİNE POPUP ============ */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.popup-overlay.show { opacity: 1; pointer-events: all; }

.popup-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  box-shadow: var(--shadow-panel), 0 0 60px rgba(100, 60, 200, 0.2);
}

.popup-title {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 6px;
}
.popup-subtitle { font-size: 12px; color: var(--text-dim); margin-bottom: 20px; }

.offline-time-badge {
  display: inline-block;
  background: rgba(120, 80, 220, 0.15);
  border: 1px solid var(--purple);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 14px;
  color: var(--purple-light);
  margin-bottom: 20px;
}

.offline-rewards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.offline-reward-row {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
}
.offline-reward-row:empty { display: none; }

.primary-btn {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border: 1px solid var(--purple-light);
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 32px;
  transition: all 0.2s;
  width: 100%;
}
.primary-btn:hover { opacity: 0.85; box-shadow: 0 0 16px rgba(120, 80, 220, 0.5); }

/* ============ YENİLGİ EKRANI ============ */
#defeat-screen {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  gap: 16px;
}
#defeat-screen.show { opacity: 1; pointer-events: all; }

.defeat-icon { font-size: 72px; animation: float 2s ease-in-out infinite; }
.defeat-title {
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--red);
  text-shadow: 0 0 30px rgba(220, 80, 80, 0.5);
}
.defeat-subtitle { font-size: 13px; color: var(--text-dim); text-align: center; max-width: 260px; line-height: 1.6; }

#restart-btn {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--red-dark), #500);
  border: 1px solid var(--red);
  border-radius: var(--radius-md);
  color: #ffcdd2;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 36px;
  transition: all 0.2s;
}
#restart-btn:hover { opacity: 0.85; box-shadow: 0 0 20px rgba(220, 80, 80, 0.4); }

/* ============ BİLDİRİMLER ============ */
#notifications {
  position: fixed;
  top: 60px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 500;
  pointer-events: none;
  max-width: 220px;
}

.notification {
  background: rgba(15, 15, 30, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 11px;
  color: var(--text-primary);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
  backdrop-filter: blur(6px);
}
.notification.show { transform: translateX(0); opacity: 1; }
.notif-loot { border-color: var(--gold-dim); color: var(--gold); }
.notif-levelup { border-color: var(--purple); color: var(--purple-light); }
.notif-chapter { border-color: var(--blue); color: var(--blue-light); }
.notif-skill { border-color: var(--blue-light); color: var(--blue-light); }
.notif-death { border-color: var(--red-dark); color: var(--red); }
.notif-revive { border-color: var(--green-dark); color: var(--green); }
.notif-item { border-color: var(--gold); color: var(--gold-light); }
.notif-upgrade { border-color: var(--green); color: var(--green); }
.notif-unlock { border-color: var(--gold); color: var(--gold-light); font-weight: 600; }
.notif-error { border-color: var(--red); color: var(--red); }

/* ============ HASAR SAYILARI ============ */
.damage-number {
  position: absolute;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 0 12px rgba(150, 100, 255, 0.4);
  pointer-events: none;
  opacity: 0;
  transform: translateY(0) scale(0.5);
  z-index: 50;
}
.damage-number.fly {
  animation: flyUp 1.1s ease-out forwards;
}
.damage-number.click-dmg {
  color: var(--gold);
  font-size: 20px;
  text-shadow: 0 0 16px var(--gold);
}
.damage-number.skill-dmg {
  color: var(--purple-light);
  font-size: 24px;
  text-shadow: 0 0 20px var(--purple);
}

.char-damage-number {
  position: absolute;
  top: -10px;
  right: -4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  animation: flyUp 0.8s ease-out forwards;
  pointer-events: none;
  z-index: 20;
}

/* ============ ANİMASYONLAR ============ */
@keyframes flyUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.6); }
  15%  { opacity: 1; transform: translateY(-10px) scale(1.2); }
  80%  { opacity: 0.8; transform: translateY(-45px) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.8); }
}

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

.shake { animation: shake 0.4s ease; }

@keyframes skillPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(90, 140, 220, 0.4); }
  50%       { box-shadow: 0 0 20px rgba(90, 140, 220, 0.8), 0 0 40px rgba(90, 140, 220, 0.3); }
}

@keyframes revivePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(76, 175, 80, 0.4); }
  50%       { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--purple-dark); border-radius: 2px; }

/* ============ RESPONSIVE ============ */
@media (min-width: 481px) {
  #game-root {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 0 80px rgba(80, 40, 160, 0.2);
  }
}

@media (max-height: 700px) {
  #monster-emoji { font-size: 72px; }
  #monster-emoji-wrap { width: 100px; height: 100px; }
  .char-portrait { font-size: 22px; }
}
