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

:root {
  --bg-dark: #030107;
  --bg-card: rgba(12, 8, 20, 0.95);
  --bg-panel: #0d0917;
  --bg-panel-hover: #150f24;
  --bg-panel-light: #18112a;
  --bg-input: #07040e;

  --border: rgba(139, 92, 246, 0.18);
  --border-light: rgba(255, 255, 255, 0.05);
  --border-highlight: rgba(168, 85, 247, 0.5);
  --border-glow: rgba(168, 85, 247, 0.25);

  --accent: #9333ea;
  --accent-bright: #c084fc;
  --accent-glow: rgba(192, 132, 252, 0.35);

  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.35);

  --hp: #f43f5e;
  --hp-glow: rgba(244, 63, 94, 0.35);

  --shield: #06b6d4;
  --shield-glow: rgba(6, 182, 212, 0.35);

  --charge-low: #f97316;
  --charge-opt: #10b981;
  --charge-over: #ec4899;

  --text: #f1f5f9;
  --text-muted: #948ba8;
  --text-dim: #5c5275;

  --q1: #94a3b8; --q2: #22c55e; --q3: #38bdf8; --q4: #c084fc;
  --q5: #f59e0b; --q6: #f43f5e; --q7: #06b6d4; --q8: #ff0055;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Rajdhani', -apple-system, system-ui, sans-serif;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(147, 51, 234, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  padding: 16px 10px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  font-size: 14px; /* Базовый размер шрифта увеличен */
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #05030a; }
::-webkit-scrollbar-thumb { background: #2a1f42; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

#app {
  width: 100%;
  max-width: 980px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(147, 51, 234, 0.08);
  backdrop-filter: blur(12px);
}

/* HEADER */
header {
  background: linear-gradient(180deg, #090612 0%, #06040c 100%);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-highlight);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
}

.logo span {
  color: var(--accent-bright);
  text-shadow: 0 0 12px var(--accent-glow);
}

.header-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.gold-badge { color: var(--gold); border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.04); }
.talent-badge { color: #38bdf8; border-color: rgba(56, 189, 248, 0.35); background: rgba(56, 189, 248, 0.04); }
.void-badge { color: #ec4899; border-color: rgba(236, 72, 153, 0.35); background: rgba(236, 72, 153, 0.04); }
.matter-badge { color: #c084fc; border-color: rgba(192, 132, 252, 0.35); background: rgba(192, 132, 252, 0.04); }

/* NAVIGATION */
nav {
  display: flex;
  background: #06040b;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  padding: 3px;
}

nav button {
  flex: 1;
  min-width: 95px;
  padding: 13px 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

nav button:hover {
  color: #fff;
  background: rgba(168, 85, 247, 0.06);
}

nav button.active {
  color: #fff;
  border-bottom-color: var(--accent-bright);
  background: rgba(147, 51, 234, 0.12);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* VIEWS & HEADINGS */
.view {
  padding: 18px;
  display: none;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.view.active { display: block; }

h2 {
  font-family: 'Cinzel', serif;
  font-size: 14.5px;
  font-weight: 700;
  margin: 16px 0 12px;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.2);
}

/* CARDS & PANELS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 12px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.stat-card:hover { 
  border-color: var(--border-highlight);
  background: var(--bg-panel-hover);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.5px;
}

.stat-card .value {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-top: 3px;
}

.stat-card .sub-desc {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.3;
}

/* LOCKED / HIDDEN STAT CARDS STYLE */
.stat-card.locked-stat, .gear-card.locked {
  opacity: 0.45;
  filter: grayscale(0.5);
  background: rgba(10, 6, 16, 0.5);
  border-color: rgba(239, 68, 68, 0.2);
  pointer-events: none;
}

/* PROGRESS BARS */
.progress-wrap {
  width: 100%;
  height: 8px;
  background: #050308;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  position: relative;
  margin-top: 5px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}

.progress-fill {
  height: 100%;
  width: 100%;
  transition: width 0.15s ease-out;
}

.fill-hp { background: linear-gradient(90deg, #9f1239, var(--hp)); box-shadow: 0 0 8px rgba(244, 63, 94, 0.4); }
.fill-shield { background: linear-gradient(90deg, #0891b2, var(--shield)); box-shadow: 0 0 8px rgba(6, 182, 212, 0.4); }
.fill-enemy-cast { background: linear-gradient(90deg, #6366f1, #ec4899); }
.charge-tier-low { background: linear-gradient(90deg, #ea580c, var(--charge-low)); }
.charge-tier-opt { background: linear-gradient(90deg, #059669, var(--charge-opt)); box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.charge-tier-over { background: linear-gradient(90deg, #be185d, var(--charge-over)); box-shadow: 0 0 12px rgba(236, 72, 153, 0.7); }

/* GEAR & INVENTORY CARDS */
.gear-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.gear-card, .item-card, .shop-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left-width: 4px;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.gear-card:hover, .item-card:hover, .shop-card:hover {
  background: var(--bg-panel-hover);
  border-color: var(--border-highlight);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.gear-card.empty {
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(8, 5, 14, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.item-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.item-rarity-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.affix-container { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.affix-chip {
  background: var(--bg-panel-light);
  border: 1px solid var(--border-light);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.affix-chip.star-chip { color: var(--gold); border-color: rgba(245, 158, 11, 0.35); background: rgba(245,158,11,0.05); }
.affix-chip.rune-chip { color: #d8b4fe; border-color: rgba(168, 85, 247, 0.35); background: rgba(168,85,247,0.05); }
.affix-chip.lvl-chip { color: #f87171; border-color: rgba(248, 113, 113, 0.35); background: rgba(248,113,113,0.05); }

.item-disabled-badge {
  font-size: 9.5px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 800;
  margin-top: 5px;
  display: inline-block;
}

/* RARITY COLORS */
.q-1 { border-left-color: var(--q1) !important; color: var(--q1); }
.q-2 { border-left-color: var(--q2) !important; color: var(--q2); }
.q-3 { border-left-color: var(--q3) !important; color: var(--q3); }
.q-4 { border-left-color: var(--q4) !important; color: var(--q4); }
.q-5 { border-left-color: var(--q5) !important; color: var(--q5); }
.q-6 { border-left-color: var(--q6) !important; color: var(--q6); }
.q-7 { border-left-color: var(--q7) !important; color: var(--q7); }
.q-8 { border-left-color: var(--q8) !important; color: var(--q8); text-shadow: 0 0 10px rgba(255, 0, 85, 0.7); }

.bg-q1 { background-color: var(--q1); color: #000; }
.bg-q2 { background-color: var(--q2); color: #000; }
.bg-q3 { background-color: var(--q3); color: #fff; }
.bg-q4 { background-color: var(--q4); color: #fff; }
.bg-q5 { background-color: var(--q5); color: #000; }
.bg-q6 { background-color: var(--q6); color: #fff; }
.bg-q7 { background-color: var(--q7); color: #000; }
.bg-q8 { background-color: var(--q8); color: #fff; }

/* REFINED BUTTON SYSTEM */
.btn {
  height: 34px;
  padding: 0 16px;
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease-in-out;
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn:hover {
  background: linear-gradient(180deg, #9d6efd 0%, #8b5cf6 100%);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.btn:disabled {
  background: #110d1c !important;
  color: #483f5e !important;
  border-color: rgba(255, 255, 255, 0.03) !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

.btn-sm {
  height: 28px;
  padding: 0 11px;
  font-size: 11px;
}

.btn-secondary {
  background: #1a132c;
  border-color: var(--border-light);
  color: var(--text);
  box-shadow: none;
}
.btn-secondary:hover {
  background: #261d3d;
  border-color: var(--border-highlight);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.btn-danger { background: linear-gradient(180deg, #f43f5e 0%, #e11d48 100%); box-shadow: 0 2px 6px rgba(244, 63, 94, 0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-danger:hover { background: linear-gradient(180deg, #fb7185 0%, #f43f5e 100%); box-shadow: 0 4px 12px rgba(244, 63, 94, 0.45); }

.btn-heal { background: linear-gradient(180deg, #10b981 0%, #059669 100%); box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-heal:hover { background: linear-gradient(180deg, #34d399 0%, #10b981 100%); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45); }

.btn-info { background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%); box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-info:hover { background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%); box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45); }

.btn-gold { background: linear-gradient(180deg, #d97706 0%, #b45309 100%); box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-gold:hover { background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 4px 12px rgba(217, 119, 6, 0.45); }

.btn-forge { background: linear-gradient(135deg, #d97706, #ec4899); }
.btn-rune { background: linear-gradient(135deg, #7c3aed, #db2777); }
.btn-awakened { background: linear-gradient(135deg, #06b6d4, #a855f7); }
.btn-skill { background: #281e47; border: 1px solid #483875; height: 35px; }

.btn-charge-attack {
  height: 44px;
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.9px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-charge-attack.ready-opt {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.btn-charge-attack.ready-over {
  background: linear-gradient(180deg, #ec4899 0%, #be185d 100%);
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.75);
}

/* DUNGEON LIST ROW LAYOUT */
.dungeon-row {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}

.dungeon-row:hover {
  background: var(--bg-panel-hover);
  border-color: var(--border-highlight);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.dungeon-info {
  flex: 1;
  min-width: 0;
}

.dungeon-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.dungeon-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dungeon-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.dungeon-status.ready { color: #34d399; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52,211,153,0.25); }
.dungeon-status.cd { color: #f87171; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248,113,113,0.25); }

.dungeon-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.dungeon-req {
  color: #c084fc;
  font-weight: 700;
}

.dungeon-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dungeon-actions .btn {
  min-width: 100px;
}

/* SPECIAL MODES CARDS */
.special-mode-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.special-mode-card .mode-title {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.special-mode-card .mode-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

.special-mode-card .btn {
  width: 100%;
}

/* SELECT & INPUTS */
select {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-highlight);
  color: #fff;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 12px;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}

/* TALENTS & SKILLS */
.tree-container { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tree-branch {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.tree-branch h4 {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  color: #fff;
  margin-bottom: 10px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.talent-node {
  background: var(--bg-panel-light);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.skill-manager-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-equipped-badge {
  font-size: 10px;
  background: #059669;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 800;
}

.skill-awakened-badge {
  font-size: 10px;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 900;
  box-shadow: 0 0 8px rgba(236,72,153,0.4);
}

/* COMBAT ARENA */
.enemies-arena {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.combat-enemy-box {
  background: var(--bg-panel);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.combat-enemy-box:hover { border-color: var(--border-highlight); }
.combat-enemy-box.selected-target {
  border-color: #ec4899 !important;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
  background: rgba(236, 72, 153, 0.04);
}

.combat-enemy-box.dead {
  opacity: 0.2;
  filter: grayscale(1);
  pointer-events: none;
}

.target-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 900;
  background: #ec4899;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  display: none;
  box-shadow: 0 0 6px rgba(236,72,153,0.8);
}

.combat-enemy-box.selected-target .target-indicator { display: block; }

.combatant-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #05030a;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
}

.combatant-avatar svg { width: 26px; height: 26px; }

.charge-panel {
  background: #07040e;
  border: 1px solid var(--border-highlight);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  margin-bottom: 10px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
}

/* COMBAT LOG */
.combat-log {
  height: 240px;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(10, 6, 18, 0.9);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
}

.log-row { line-height: 1.35; }
.log-hit { color: #34d399; }
.log-crit { color: var(--gold); font-weight: bold; text-shadow: 0 0 6px rgba(245,158,11,0.4); }
.log-over { color: #ec4899; font-weight: 900; text-shadow: 0 0 8px rgba(236,72,153,0.5); }
.log-enemy { color: #f87171; }
.log-aoe { color: #c084fc; font-weight: bold; }
.log-curse { color: #f43f5e; font-weight: bold; }
.log-raid { color: #38bdf8; font-weight: 900; }

/* ASTROLABE */
.astrolabe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.astrolabe-node {
  background: var(--bg-panel-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.astrolabe-node.unlocked {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(2, 1, 5, 0.88);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 14px;
}

.modal-content {
  background: #0d0918;
  border: 1px solid var(--border-highlight);
  border-radius: 12px;
  width: 100%;
  max-width: 650px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.95), 0 0 30px rgba(147, 51, 234, 0.2);
}

/* QUESTS */
.quest-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.quest-card.completed {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
}

.quest-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quest-badge.done { background: #10b981; color: #fff; box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.quest-badge.progress { background: #3b82f6; color: #fff; }
.desc-text { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.35; }

/* TOOLTIP */
#item-tooltip {
  position: fixed;
  background: rgba(10, 6, 18, 0.96);
  border: 1px solid var(--border-highlight);
  backdrop-filter: blur(10px);
  padding: 12px 14px;
  border-radius: 8px;
  z-index: 999;
  display: none;
  pointer-events: none;
  font-size: 12px;
  max-width: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.95), 0 0 15px rgba(147, 51, 234, 0.25);
}

.compare-pos { color: #34d399; font-weight: bold; }
.compare-neg { color: #f87171; font-weight: bold; }

/* =========================================
   STAGE 1: FLOATING COMBAT TEXT & SCREEN FX
   ========================================= */

.shake-sm {
  animation: screenShakeSm 0.18s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.shake-lg {
  animation: screenShakeLg 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screenShakeSm {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-3px, 2px, 0); }
  50% { transform: translate3d(3px, -2px, 0); }
  75% { transform: translate3d(-2px, -1px, 0); }
}

@keyframes screenShakeLg {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  15% { transform: translate3d(-6px, 4px, 0) scale(1.01); }
  35% { transform: translate3d(6px, -5px, 0) scale(0.99); }
  55% { transform: translate3d(-4px, 3px, 0) scale(1.01); }
  75% { transform: translate3d(3px, -2px, 0) scale(1); }
}

.screen-flash {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.3) 0%, rgba(239, 68, 68, 0) 75%);
  pointer-events: none;
  z-index: 9999;
  animation: flashFade 0.25s ease-out forwards;
}

@keyframes flashFade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.fct-item {
  position: absolute;
  pointer-events: none;
  z-index: 1000;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 900;
  letter-spacing: 0.5px;
  animation: floatFadeUp 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  white-space: nowrap;
}

@keyframes floatFadeUp {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
  20% { opacity: 1; transform: translate(-50%, -15px) scale(1.15); }
  70% { opacity: 1; transform: translate(-50%, -35px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50px) scale(0.85); }
}

.fct-hit { color: #f1f5f9; font-size: 14px; text-shadow: 0 0 6px rgba(0,0,0,0.9), 0 0 3px #000; }
.fct-crit { color: #fbbf24; font-size: 18px; text-shadow: 0 0 10px rgba(251, 191, 36, 0.9), 0 0 4px #000; }
.fct-over { color: #ec4899; font-size: 22px; text-shadow: 0 0 14px rgba(236, 72, 153, 1), 0 0 6px #000; }
.fct-nova { color: #c084fc; font-size: 24px; text-shadow: 0 0 18px rgba(192, 132, 252, 1), 0 0 8px #000; }
.fct-heal { color: #34d399; font-size: 15px; text-shadow: 0 0 10px rgba(52, 211, 153, 0.8), 0 0 4px #000; }
.fct-shield { color: #38bdf8; font-size: 15px; text-shadow: 0 0 10px rgba(56, 189, 248, 0.8), 0 0 4px #000; }
.fct-dodge { color: #94a3b8; font-size: 13px; text-shadow: 0 0 4px #000; }
.fct-player-dmg { color: #f87171; font-size: 16px; text-shadow: 0 0 10px rgba(248, 113, 113, 0.9), 0 0 4px #000; }

.dungeon-status.locked {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.dungeon-row.dungeon-locked {
  opacity: 0.65;
}
.dungeon-row.dungeon-locked:hover {
  opacity: 0.9;
}