:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --bg-hover: #1e2d45;
  --accent-blue: #1a9cff;
  --accent-gold: #c89b3c;
  --accent-red: #e84057;
  --text-primary: #e8e8e8;
  --text-secondary: #8b9bb4;
  --text-muted: #5a6880;
  --border: #1e2d45;
  --tier-s: #ff6b35;
  --tier-a: #f0a500;
  --tier-b: #52a8ff;
  --tier-c: #8b9bb4;
  --tier-d: #5a6880;
  --nav-height: 48px;
  --sidebar-width: 200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ─── TOP NAV ─────────────────────────────────────────────── */
.top-nav {
  height: var(--nav-height);
  background: #0d1117;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-nav .logo {
  font-size: 20px;
  font-weight: 800;
  color: white;
  letter-spacing: 1px;
  margin-right: 12px;
  white-space: nowrap;
  background: linear-gradient(135deg, #ff6b35, #f0a500, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.4));
}

.top-nav .logo span {
  -webkit-text-fill-color: transparent;
  background: linear-gradient(135deg, #1a9cff, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
}

.game-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.game-tab:hover { background: var(--bg-card); color: var(--text-primary); }
.game-tab.active { color: white; background: var(--bg-card); }
.game-tab .game-icon { width: 18px; height: 18px; border-radius: 3px; }

.badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.badge-new { background: var(--accent-blue); color: white; }
.badge-soon { background: var(--text-muted); color: white; }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  gap: 8px;
  width: 240px;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--accent-blue); }
.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar svg { color: var(--text-muted); flex-shrink: 0; }

.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.lang-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lang-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.lang-btn.active { color: white; background: var(--accent-blue); }
.lang-flag { font-size: 14px; }

.btn-primary {
  background: var(--accent-red);
  color: white;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.85; }

/* ─── LAYOUT ──────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}

/* ─── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: #0d1117;
  border-right: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
}
.sidebar-item:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-item.active { color: white; background: var(--bg-hover); border-left: 3px solid var(--accent-blue); padding-left: 13px; }
.sidebar-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-divider { height: 1px; background: var(--border); margin: 8px 16px; }

.sidebar-user {
  padding: 12px 16px;
  margin-top: auto;
}

/* ─── MAIN CONTENT ────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 32px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ─── PAGE HEADER ─────────────────────────────────────────── */
.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}
.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ─── TABS ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin: 24px 0;
}
.tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }

/* ─── FILTERS ─────────────────────────────────────────────── */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--accent-blue); color: var(--text-primary); }
.filter-btn.active { background: var(--accent-blue); color: white; border-color: var(--accent-blue); }

.role-icon { margin-right: 4px; }

.filters-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: var(--accent-blue); }

/* ─── CHAMPION GRID ───────────────────────────────────────── */
.champion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
}

.champion-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 6px;
  border-radius: 8px;
  transition: background 0.15s, transform 0.15s;
  position: relative;
}
.champion-card:hover { background: var(--bg-card); transform: translateY(-2px); }

.champion-img-wrap {
  position: relative;
  width: 64px;
  height: 64px;
}
.champion-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border);
  transition: border-color 0.15s;
  background: var(--bg-card);
}
.champion-card:hover .champion-img { border-color: var(--accent-blue); }

.tier-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bg-primary);
}
.tier-S { background: var(--tier-s); color: white; }
.tier-A { background: var(--tier-a); color: #111; }
.tier-B { background: var(--tier-b); color: white; }
.tier-C { background: var(--tier-c); color: #111; }
.tier-D { background: var(--tier-d); color: white; }

.champion-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.champion-card:hover .champion-name { color: var(--text-primary); }

.champion-wr {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}
.wr-good { color: #4ade80; }
.wr-bad  { color: #f87171; }

/* ─── TIER LIST VIEW ──────────────────────────────────────── */
.tier-list { display: flex; flex-direction: column; gap: 8px; }

.tier-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.tier-label {
  width: 52px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.tier-champions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 8px;
  align-items: center;
  flex: 1;
}

.tier-champ-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}
.tier-champ-item:hover { background: var(--bg-hover); }
.tier-champ-item img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  border: 2px solid transparent;
}
.tier-champ-item:hover img { border-color: var(--accent-blue); }
.tier-champ-item span {
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── SEARCH RESULTS ──────────────────────────────────────── */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: none;
}
.search-dropdown.open { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s;
}
.search-result-item:hover { background: var(--bg-hover); }
.search-result-item img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.search-result-item .sr-name { font-weight: 600; font-size: 13px; }
.search-result-item .sr-role { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ─── CHAMPION MODAL ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  border: 3px solid var(--accent-blue);
}
.modal-header .modal-title { font-size: 22px; font-weight: 700; color: white; }
.modal-header .modal-subtitle { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.modal-close {
  margin-left: auto;
  width: 32px; height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--bg-hover); color: white; }

.modal-body { padding: 24px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
}
.stat-card .stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-card .stat-value { font-size: 20px; font-weight: 700; color: white; }
.stat-card .stat-value.good { color: #4ade80; }
.stat-card .stat-value.ok   { color: var(--accent-gold); }
.stat-card .stat-value.bad  { color: #f87171; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.role-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.role-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-top     { background: rgba(255,107,53,0.2); color: #ff6b35; border: 1px solid #ff6b35; }
.role-jungle  { background: rgba(74,222,128,0.2); color: #4ade80; border: 1px solid #4ade80; }
.role-mid     { background: rgba(26,156,255,0.2); color: var(--accent-blue); border: 1px solid var(--accent-blue); }
.role-bot     { background: rgba(240,165,0,0.2);  color: var(--accent-gold); border: 1px solid var(--accent-gold); }
.role-support { background: rgba(168,85,247,0.2); color: #a855f7; border: 1px solid #a855f7; }

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { opacity: 0.3; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ─── FOOTER ──────────────────────────────────────────────── */
footer {
  background: #0d1117;
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  margin-top: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer .footer-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ff6b35, #f0a500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
footer .footer-logo span {
  background: linear-gradient(135deg, #1a9cff, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
footer p { color: var(--text-muted); font-size: 12px; max-width: 500px; }
footer .footer-copy { color: var(--text-muted); font-size: 11px; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 24px 20px; }
  .champion-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .top-nav .game-tab:not(.active) { display: none; }
  .search-bar { width: 160px; }
  .filters-right { display: none; }
  footer { flex-direction: column; }
}

/* ─── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── ANIMATION ───────────────────────────────────────────── */
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.champion-card { animation: fadeIn 0.2s ease both; }

.search-wrap { position: relative; }

/* ═══════════════════════════════════════════════════════════
   DETAIL PAGE
═══════════════════════════════════════════════════════════ */
.detail-page {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--bg-primary);
  flex-direction: column;
  overflow-y: auto;
}

/* ─── Header ──────────────────────────────────────────────── */
.detail-header {
  position: relative;
  min-height: 200px;
  overflow: visible;
}
.detail-bg {
  position: absolute;
  inset: -8px;          /* compensate for scale so edges don't show */
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: brightness(0.35) saturate(1.2);
  overflow: hidden;
  border-radius: 0;
}
.detail-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg-primary) 100%),
              linear-gradient(to right, rgba(0,0,0,0.7) 0%, transparent 60%);
}
.detail-header-content {
  position: relative;
  z-index: 2;
  padding: 16px 24px 32px;
}
.detail-back-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.detail-back-btn:hover { background: rgba(255,255,255,0.18); color: white; }

.detail-champ-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.detail-tier-wrap { position: relative; }
.detail-icon {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  border: 3px solid var(--accent-blue);
  object-fit: cover;
}
.detail-tier-val {
  position: absolute;
  top: -8px;
  left: -8px;
  font-size: 13px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 5px;
  border: 2px solid var(--bg-primary);
}
.tier-color-S { background: var(--tier-s); color: white; }
.tier-color-A { background: var(--tier-a); color: #111; }
.tier-color-B { background: var(--tier-b); color: white; }
.tier-color-C { background: var(--tier-c); color: #111; }
.tier-color-D { background: var(--tier-d); color: white; }

.detail-title-block { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }

.detail-name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-champ-name { font-size: 28px; font-weight: 800; color: white; }
.detail-build-title { font-size: 16px; font-weight: 400; color: var(--text-secondary); }
.detail-patch { font-size: 12px; color: var(--accent-blue); font-weight: 600; padding: 2px 8px; border: 1px solid rgba(26,156,255,0.3); border-radius: 4px; background: rgba(26,156,255,0.08); white-space: nowrap; }
.detail-lore { color: var(--text-secondary); font-size: 13px; max-width: 600px; line-height: 1.6; margin: 0; }

.detail-abilities {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}
.detail-ability {
  position: relative;
  cursor: pointer;
}
.detail-ability img {
  width: 46px; height: 46px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.15);
  object-fit: cover;
  transition: border-color 0.15s, transform 0.15s;
  display: block;
  background: var(--bg-card);
}
.detail-ability:hover img { border-color: var(--accent-blue); transform: scale(1.1); }
.detail-ability:hover img { border-color: var(--accent-blue); }
.ability-key {
  position: absolute;
  bottom: 2px; right: 2px;
  font-size: 9px; font-weight: 800;
  background: rgba(0,0,0,0.75);
  padding: 1px 3px;
  border-radius: 2px;
  color: var(--accent-gold);
}

/* ─── Nav tabs ────────────────────────────────────────────── */
.detail-nav {
  background: #0d1117;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.detail-nav-inner {
  display: flex;
  padding: 0 24px;
  gap: 0;
  overflow-x: auto;
}
.detail-tab {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.detail-tab:hover { color: var(--text-primary); }
.detail-tab.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }

/* ─── Filter bar ──────────────────────────────────────────── */
.detail-filter-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-filter-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.15s;
}
.detail-filter-btn.active { background: var(--accent-blue); color: white; border-color: var(--accent-blue); }
.detail-rank-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.detail-vs-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  margin-left: auto;
}
.detail-close-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.detail-close-btn:hover { background: var(--accent-red); color: white; border-color: var(--accent-red); }

/* ─── Stats bar ───────────────────────────────────────────── */
.detail-stats-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}
.dsb-item {
  padding: 16px 24px;
  border-right: 1px solid var(--border);
  min-width: 90px;
}
.dsb-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.dsb-value { font-size: 18px; font-weight: 700; color: white; }
.stat-good { color: #4ade80; }
.stat-ok   { color: var(--accent-gold); }
.stat-bad  { color: #f87171; }
.dsb-plus {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  flex: 1;
  background: linear-gradient(90deg, rgba(200,155,60,0.08), transparent);
  border-right: none;
  flex-wrap: wrap;
}
.dsb-plus-badge {
  background: var(--accent-gold);
  color: #111;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
}
.dsb-plus-title { font-size: 14px; font-weight: 700; color: var(--accent-gold); }
.dsb-plus-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.dsb-plus-stats { display: flex; gap: 16px; color: var(--text-muted); font-size: 12px; filter: blur(4px); user-select: none; }

/* ─── Build content layout ────────────────────────────────── */
.detail-build-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.detail-col-left, .detail-col-right { display: flex; flex-direction: column; gap: 16px; }

.detail-alt-content {
  width: 100%;
}
/* Coming-soon placeholder (non-ARAM tabs) */
.alt-coming-soon {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 24px;
}
.alt-coming-soon svg { opacity: 0.3; margin-bottom: 12px; }
.alt-coming-soon p { font-size: 15px; }

/* ─── ARAM Modifications panel ──────────────────────────── */
.aram-mods-list {
  list-style: none;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aram-mod-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.aram-mod-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.aram-mod-text { flex: 1; }
.aram-mod-none { color: var(--text-muted); font-style: italic; }

.aram-buff { color: #4ade80; font-weight: 700; }
.aram-nerf { color: #f87171; font-weight: 700; }
.aram-mod-dot.aram-buff { background: #4ade80; }
.aram-mod-dot.aram-nerf { background: #f87171; }

/* ─── Section card ────────────────────────────────────────── */
.detail-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.section-title-text { font-size: 13px; font-weight: 700; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.5px; }
.section-wr { font-size: 12px; color: #4ade80; font-weight: 600; }

/* ─── Runes ───────────────────────────────────────────────── */
.rune-panel {
  display: flex;
  gap: 0;
}
.rune-primary, .rune-secondary {
  flex: 1;
  padding: 16px;
}
.rune-divider { width: 1px; background: var(--border); }
.rune-path-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.rune-path-header img { width: 20px; height: 20px; object-fit: contain; }

.rune-keystone-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.rune-keystone-slot:hover { background: rgba(255,255,255,0.08); }
.rune-keystone-slot img { width: 48px; height: 48px; object-fit: contain; }
.rune-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.rune-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.rune-slot {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  background: rgba(255,255,255,0.03);
}
.rune-slot:hover { border-color: var(--accent-blue); transform: scale(1.08); }
.rune-slot.active { border-color: var(--accent-blue); background: rgba(26,156,255,0.1); }
.rune-slot img { width: 32px; height: 32px; object-fit: contain; }
.rune-slot.secondary-rune.active { border-color: #c03a2b; background: rgba(192,58,43,0.12); }
.rune-slot.shard { width: 32px; height: 32px; border-radius: 4px; }
.rune-slot.shard img { width: 24px; height: 24px; }
.shards-row { gap: 6px; }

/* ─── Skill Order ─────────────────────────────────────────── */
.skill-order-wrap { padding: 14px 14px 8px; overflow-x: auto; }
.skill-levels-header { display: flex; align-items: center; margin-bottom: 4px; }
.skill-icon-spacer { width: 52px; flex-shrink: 0; }
.skill-level-nums { display: flex; gap: 2px; }
.skill-level-num { width: 22px; text-align: center; font-size: 10px; color: var(--text-muted); }

.skill-row { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.skill-icon-wrap {
  position: relative;
  width: 46px; height: 46px;
  flex-shrink: 0;
}
.skill-icon-wrap img {
  width: 42px; height: 42px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.skill-icon-placeholder {
  width: 42px; height: 42px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-secondary);
}
.skill-key {
  position: absolute;
  bottom: 1px; right: 1px;
  font-size: 9px; font-weight: 800;
  background: rgba(0,0,0,0.8);
  color: var(--accent-gold);
  padding: 1px 3px;
  border-radius: 2px;
}
.skill-cells { display: flex; gap: 2px; }
.skill-cell {
  width: 22px; height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: background 0.1s;
}
.skill-cell.active { color: white; font-size: 10px; }
.skill-cell.sk-Q { background: rgba(26,156,255,0.5); border-color: var(--accent-blue); }
.skill-cell.sk-W { background: rgba(74,222,128,0.45); border-color: #4ade80; }
.skill-cell.sk-E { background: rgba(240,165,0,0.45);  border-color: var(--accent-gold); }
.skill-cell.sk-R { background: rgba(232,64,87,0.55);  border-color: var(--accent-red); }

/* ─── Summoner Spells ─────────────────────────────────────── */
.spells-row { display: flex; gap: 12px; padding: 16px 18px; align-items: center; }
.spell-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.spell-item:hover { border-color: var(--accent-blue); }
.spell-item img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); }
.spell-item span { font-size: 13px; font-weight: 600; color: var(--text-primary); }

/* ─── Item Build ──────────────────────────────────────────── */
.item-build { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.item-row { display: flex; align-items: center; gap: 10px; }
.item-row-label { font-size: 11px; color: var(--text-muted); width: 80px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.4px; }
.item-row-slots { display: flex; gap: 6px; flex-wrap: wrap; }
.item-slot {
  width: 44px; height: 44px;
  border-radius: 6px;
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  background: var(--bg-card);
}
.item-slot:hover { border-color: var(--accent-gold); transform: scale(1.08); }
.item-slot img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Counter Tips ────────────────────────────────────────── */
.counter-tips {
  padding: 14px 18px 14px 34px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.counter-tips li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.counter-tips li::marker { color: var(--accent-blue); }

/* ─── Responsive detail ───────────────────────────────────── */
@media (max-width: 900px) {
  .detail-build-content { grid-template-columns: 1fr; padding: 16px; }
  .rune-panel { flex-direction: column; }
  .rune-divider { width: auto; height: 1px; }
  .dsb-item { padding: 12px 16px; min-width: 70px; }
  .dsb-value { font-size: 15px; }
}
@media (max-width: 600px) {
  .detail-champ-name { font-size: 20px; }
  .detail-build-title { font-size: 14px; }
  .detail-tab { padding: 10px 14px; font-size: 12px; }
}
