/* ============================================================
   DOTA 2 HEROES EXPLORER — MAIN STYLESHEET
   Theme: Dark Fantasy | Gold #c89b3c | Red #e84a4a
   Font: Cinzel (titles) | Rajdhani (body)
============================================================ */

/* ─── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --bg-primary:   #0a0e1a;
  --bg-secondary: #0f1525;
  --bg-card:      #111827;
  --bg-glass:     rgba(17, 24, 39, 0.75);
  --gold:         #c89b3c;
  --gold-light:   #e8b84b;
  --gold-dim:     rgba(200, 155, 60, 0.25);
  --red:          #e84a4a;
  --red-dim:      rgba(232, 74, 74, 0.2);
  --green:        #4caf50;
  --green-dim:    rgba(76, 175, 80, 0.2);
  --blue:         #4a9be8;
  --blue-dim:     rgba(74, 155, 232, 0.2);
  --purple:       #9b59b6;
  --text-primary: #e8e0d0;
  --text-secondary:#a09880;
  --text-muted:   #5a5245;
  --border:       rgba(200, 155, 60, 0.2);
  --border-bright:rgba(200, 155, 60, 0.6);
  --shadow-gold:  0 0 20px rgba(200, 155, 60, 0.3);
  --shadow-red:   0 0 20px rgba(232, 74, 74, 0.4);
  --radius:       12px;
  --radius-lg:    20px;
  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-title:   'Cinzel', serif;
  --font-body:    'Rajdhani', sans-serif;
  --nav-height:   70px;
}

/* ─── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ─── BACKGROUND TEXTURE ─────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(200,155,60,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(232,74,74,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 0% 50%, rgba(74,155,232,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ─── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.5), 0 1px 0 var(--gold-dim);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(200,155,60,0.5));
}
.nav-logo-text {
  font-size: 24px;
}
.nav-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(200,155,60,0.4);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex: 1;
}
.nav-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--gold);
  background: var(--gold-dim);
}
.nav-link:hover::after, .nav-link.active::after {
  left: 14px; right: 14px;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}
#globalSearch {
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 220px;
  padding: 8px 12px 8px 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
}
#globalSearch:focus {
  border-color: var(--gold);
  background: rgba(200,155,60,0.07);
  box-shadow: 0 0 0 3px var(--gold-dim);
  width: 260px;
}
#globalSearch::placeholder { color: var(--text-muted); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: none;
  z-index: 100;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  max-height: 300px;
  overflow-y: auto;
}
.search-dropdown.visible { display: block; }
.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.search-result:hover { background: var(--gold-dim); }
.search-result img {
  width: 40px; height: 23px;
  object-fit: cover;
  border-radius: 4px;
}
.search-result span {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── SECTIONS ───────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(200,155,60,0.4);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 1px;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 16px;
  letter-spacing: 0.05em;
}

/* Section dividers */
.section + .section {
  border-top: 1px solid var(--border);
}

/* ─── FILTER BAR ─────────────────────────────────────────────── */
.filter-bar, .item-filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}
.filter-btn.active {
  background: linear-gradient(135deg, rgba(200,155,60,0.25), rgba(200,155,60,0.1));
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.attr-icon {
  width: 18px; height: 18px;
  object-fit: contain;
}

/* ─── HERO GRID ──────────────────────────────────────────────── */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* Skeleton */
.skeleton-card {
  border-radius: var(--radius);
  background: linear-gradient(90deg, #1a2035 25%, #1f2944 50%, #1a2035 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  height: 220px;
}
.skeleton-card.small { height: 160px; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Hero Card */
.hero-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.hero-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold), 0 20px 40px rgba(0,0,0,0.5);
}
.hero-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(200,155,60,0.5), 0 0 60px rgba(200,155,60,0.2);
}
.hero-card.selected-a { border-color: var(--blue); box-shadow: 0 0 25px rgba(74,155,232,0.5); }
.hero-card.selected-b { border-color: var(--red);  box-shadow: 0 0 25px rgba(232,74,74,0.5); }

.hero-portrait-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.hero-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
  display: block;
}
.hero-card:hover .hero-portrait {
  transform: scale(1.08);
}
.hero-portrait-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,24,39,0.95) 0%, transparent 60%);
}

.hero-attr-badge {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
}
.hero-attr-badge img {
  width: 18px; height: 18px;
  object-fit: contain;
}

.hero-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.hero-name {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
}
.hero-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 4px;
}
.mini-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.mini-stat-icon { font-size: 0.7rem; opacity: 0.7; }
.mini-stat-val { color: var(--text-primary); font-weight: 600; }

.hero-select-hint {
  position: absolute;
  inset: 0;
  background: rgba(200,155,60,0.15);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border-radius: var(--radius);
}
.hero-card:hover .hero-select-hint { opacity: 1; }

/* ─── COMPARISON ─────────────────────────────────────────────── */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
}
.comparison-slot {
  min-height: 200px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  overflow: hidden;
  position: relative;
}
.comparison-slot:has(.slot-hero[style*="display: block"]) {
  border-style: solid;
}
.slot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  padding: 40px;
  text-align: center;
}
.slot-icon {
  font-size: 2.5rem;
  opacity: 0.4;
}
.slot-placeholder p {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.comparison-vs {
  text-align: center;
  flex-shrink: 0;
}
.comparison-vs span {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(200,155,60,0.6);
  display: block;
  animation: pulse-vs 2s ease-in-out infinite;
}
@keyframes pulse-vs {
  0%, 100% { text-shadow: 0 0 20px rgba(200,155,60,0.4); transform: scale(1); }
  50%       { text-shadow: 0 0 40px rgba(200,155,60,0.8); transform: scale(1.05); }
}

.slot-hero {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.slot-hero-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.slot-hero-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: center top;
}
.slot-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 60%);
}
.slot-hero-info {
  padding: 12px 16px 16px;
  width: 100%;
}
.slot-hero-name {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.slot-hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 10px;
}

/* Stat Comparison */
.stat-comparison {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  animation: fadeInUp 0.5s ease;
}
.stat-comparison-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.08em;
}
.stat-bar-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.stat-bar-left, .stat-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  position: relative;
}
.stat-bar-left { justify-content: flex-end; flex-direction: row-reverse; }
.stat-bar-right { justify-content: flex-start; }

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2px;
  max-width: 100%;
}
.stat-bar-left .stat-bar-fill {
  background: linear-gradient(to left, var(--blue), rgba(74,155,232,0.4));
  border-radius: 4px 0 0 4px;
}
.stat-bar-right .stat-bar-fill {
  background: linear-gradient(to right, var(--red), rgba(232,74,74,0.4));
  border-radius: 0 4px 4px 0;
}
.stat-bar-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
  min-width: 40px;
  text-align: center;
}
.stat-bar-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-align: center;
  flex-shrink: 0;
  min-width: 80px;
}
.stat-bar-wrap {
  height: 100%;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.stat-winner { color: var(--gold); }

.btn-clear {
  display: block;
  margin: 28px auto 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 30px;
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 30px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-clear:hover {
  background: var(--red-dim);
  box-shadow: var(--shadow-red);
}

/* ─── ITEM EXPLORER ──────────────────────────────────────────── */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.item-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  gap: 10px;
  text-align: center;
}
.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.item-img-wrap {
  width: 76px; height: 56px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0e1a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.item-name {
  font-family: var(--font-title);
  font-size: 0.72rem;
  color: var(--gold);
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.item-cost {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.item-cost::before { content: '💎 '; font-size: 0.7rem; }

.item-stat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}
.item-stat-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(200,155,60,0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* Item Tooltip */
.item-tooltip {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 280px;
  box-shadow: var(--shadow-gold), 0 20px 40px rgba(0,0,0,0.8);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(20px);
}
.item-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
.tooltip-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.tooltip-img {
  width: 60px; height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.tooltip-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 3px;
}
.tooltip-cost {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.tooltip-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}
.tooltip-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.tooltip-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}
.tooltip-stat-key { color: var(--text-secondary); }
.tooltip-stat-val { color: var(--gold); font-weight: 700; }
.tooltip-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
}

/* ─── PATCH TRACKER ──────────────────────────────────────────── */
.patch-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.patch-select-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.patch-select-wrapper label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}
.patch-select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  min-width: 220px;
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c89b3c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.patch-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.patch-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.patch-legend {
  display: flex;
  gap: 20px;
  align-items: center;
}
.legend-item {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-item.buff { color: var(--green); }
.legend-item.nerf { color: var(--red); }

.patch-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 40px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: center;
}
.patch-placeholder-icon { font-size: 3rem; opacity: 0.4; }
.patch-placeholder p { font-size: 0.95rem; letter-spacing: 0.05em; }

.patch-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  animation: fadeInUp 0.5s ease;
}

.chart-wrapper {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  height: 380px;
}
.chart-wrapper canvas {
  max-height: 320px;
}

.patch-change-log {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.patch-entry {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
  padding: 14px 16px;
  transition: transform var(--transition);
}
.patch-entry:hover { transform: translateX(4px); }
.patch-entry.buff { border-left-color: var(--green); background: rgba(76,175,80,0.06); }
.patch-entry.nerf { border-left-color: var(--red);   background: rgba(232,74,74,0.06); }

.patch-entry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.patch-version {
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.07);
  color: var(--text-secondary);
}
.patch-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}
.patch-type-badge.buff { background: var(--green-dim); color: var(--green); }
.patch-type-badge.nerf { background: var(--red-dim);   color: var(--red);   }

.patch-entry-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}
.patch-entry-delta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}
.delta-before { color: var(--text-muted); }
.delta-arrow { color: var(--text-secondary); }
.delta-after.buff { color: var(--green); }
.delta-after.nerf { color: var(--red); }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  background: rgba(6, 9, 18, 0.95);
  border-top: 1px solid var(--border);
  padding: 60px 24px 40px;
  margin-top: 40px;
}
.footer-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}
.footer-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ─── SCROLL TO TOP ──────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #a07830);
  border: none;
  color: #0a0e1a;
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(200,155,60,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(200,155,60,0.6);
}

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.appear {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.appear.in {
  opacity: 1;
  transform: translateY(0);
}

/* ─── ATTRIBUTE COLORS ───────────────────────────────────────── */
.attr-strength   .hero-attr-badge { background: rgba(205,70,70,0.4); }
.attr-agility    .hero-attr-badge { background: rgba(70,190,120,0.4); }
.attr-intelligence .hero-attr-badge { background: rgba(70,130,200,0.4); }
.attr-universal  .hero-attr-badge { background: rgba(180,120,200,0.4); }

/* ─── HERO MODAL / DETAIL OVERLAY ───────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,8,16,0.92);
  backdrop-filter: blur(10px);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.closing { animation: fadeOut 0.3s ease forwards; }
@keyframes fadeOut { to { opacity: 0; } }

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-gold), 0 40px 80px rgba(0,0,0,0.9);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
  from { transform: translateY(60px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-hero-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center top;
}
.modal-body { padding: 24px; }
.modal-hero-name {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}
.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.modal-stat {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  border: 1px solid var(--border);
}
.modal-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.modal-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-modal {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid;
  flex: 1;
}
.btn-modal-a {
  background: rgba(74,155,232,0.15);
  border-color: var(--blue);
  color: var(--blue);
}
.btn-modal-a:hover { background: rgba(74,155,232,0.3); }
.btn-modal-b {
  background: rgba(232,74,74,0.15);
  border-color: var(--red);
  color: var(--red);
}
.btn-modal-b:hover { background: rgba(232,74,74,0.3); }
.btn-modal-patch {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.btn-modal-patch:hover { background: rgba(200,155,60,0.3); }
.btn-modal-close {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-modal-close:hover { border-color: var(--red); color: var(--red); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(10,14,26,0.98);
    backdrop-filter: blur(20px);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
    z-index: 999;
    animation: fadeInDown 0.3s ease;
  }
  @keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .hamburger { display: flex; }
  .nav-search { margin-left: auto; }
  #globalSearch { width: 140px; }
  #globalSearch:focus { width: 160px; }
  .comparison-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .comparison-vs { order: 1; transform: rotate(90deg); }
  .stat-bar-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .section { padding: 80px 16px 40px; }
  .hero-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .modal-stats { grid-template-columns: repeat(2, 1fr); }
  .scroll-top { bottom: 16px; right: 16px; }
  .chart-wrapper { height: 300px; padding: 16px; }
  .patch-change-log { grid-template-columns: 1fr; }
  #globalSearch { width: 100px; }
}

/* ─── MISC UTILITY ───────────────────────────────────────────── */
.hidden { display: none !important; }
.text-gold { color: var(--gold); }
.text-red  { color: var(--red);  }
.text-green { color: var(--green); }

/* Glow effects */
.glow-gold { box-shadow: var(--shadow-gold); }
.glow-red  { box-shadow: var(--shadow-red);  }
