/*
  iOS 26 Liquid Glass Design System
  True black canvas · frosted panels · luminous borders · layered depth
*/

@font-face{font-family:'Outfit';font-weight:300;src:url(/font/outfit-300.ttf) format('truetype')}
@font-face{font-family:'Outfit';font-weight:400;src:url(/font/outfit-400.ttf) format('truetype')}
@font-face{font-family:'Outfit';font-weight:500;src:url(/font/outfit-500.ttf) format('truetype')}
@font-face{font-family:'Outfit';font-weight:600;src:url(/font/outfit-600.ttf) format('truetype')}
@font-face{font-family:'Outfit';font-weight:700;src:url(/font/outfit-700.ttf) format('truetype')}
@font-face{font-family:'IBM Plex Mono';font-weight:400;src:url(/font/ibm-plex-mono-400.ttf) format('truetype')}
@font-face{font-family:'IBM Plex Mono';font-weight:500;src:url(/font/ibm-plex-mono-500.ttf) format('truetype')}

:root {
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --bg: #000000;
  --glass: rgba(28, 28, 32, 0.55);
  --glass-heavy: rgba(22, 22, 26, 0.78);
  --glass-light: rgba(255, 255, 255, 0.035);
  --glass-input: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.11);
  --border-focus: rgba(10, 132, 255, 0.4);
  --text-1: rgba(255, 255, 255, 0.92);
  --text-2: rgba(255, 255, 255, 0.52);
  --text-3: rgba(255, 255, 255, 0.28);
  --accent: #0A84FF;
  --accent-dim: rgba(10, 132, 255, 0.12);
  --accent-glow: rgba(10, 132, 255, 0.06);
  --green: #30D158;
  --green-dim: rgba(48, 209, 88, 0.12);
  --red: #FF453A;
  --orange: #FF9F0A;
  --orange-dim: rgba(255, 159, 10, 0.12);
  --sidebar-w: 240px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, option { font-family: var(--font); }

/* Noise */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 99999; pointer-events: none;
  opacity: 0.015;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.06); border-radius: 3px; }

/* ═══ GLASS PRIMITIVES ═══ */
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 0.5px solid var(--border);
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.05), 0 8px 32px rgba(0,0,0,0.4);
  border-radius: var(--radius);
}

.glass-card {
  background: var(--glass-light);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}
.glass-card:hover {
  background: var(--glass-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.glass-input {
  width: 100%; padding: 10px 14px;
  background: var(--glass-input);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1); font-size: 14px;
  outline: none; transition: all 0.2s var(--ease);
}
.glass-input::placeholder { color: var(--text-3); }
.glass-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── SELECT DROPDOWNS (dark themed) ── */
.glass-select {
  padding: 8px 12px;
  background: var(--glass-input);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-1); font-size: 13px;
  outline: none; cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.glass-select:focus { border-color: var(--border-focus); }
/* Force dark dropdown on all platforms */
.glass-select option {
  background: #1c1c20;
  color: var(--text-1);
  padding: 8px;
}

.glass-btn {
  padding: 8px 16px;
  background: var(--accent);
  border-radius: var(--radius-xs);
  color: #fff; font-size: 13px; font-weight: 600;
  transition: opacity 0.15s;
}
.glass-btn:hover { opacity: 0.85; }

/* ═══ LAYOUT ═══ */
.layout { display: flex; min-height: 100dvh; }

/* ═══ SIDEBAR ═══ */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w); z-index: 50;
  background: var(--glass-heavy);
  backdrop-filter: blur(60px) saturate(180%);
  -webkit-backdrop-filter: blur(60px) saturate(180%);
  border-right: 0.5px solid var(--border);
  display: flex; flex-direction: column;
  transition: transform 0.35s var(--ease);
}
.sidebar-header { padding: 20px 18px 16px; border-bottom: 0.5px solid var(--border); }
.sidebar-logo { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.sidebar-logo span { color: var(--text-3); font-weight: 400; font-size: 14px; margin-left: 6px; }
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sidebar-section {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-3); padding: 16px 10px 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: all 0.15s var(--ease);
  margin-bottom: 2px; width: 100%; text-align: left;
}
.sidebar-item:hover { background: var(--glass-hover); color: var(--text-1); }
.sidebar-item.active { background: var(--accent-dim); color: var(--accent); }
.sidebar-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.8; fill: none; }
.sidebar-item .count { margin-left: auto; font-size: 11px; font-family: var(--mono); color: var(--text-3); }
.sidebar-footer {
  padding: 14px 18px; border-top: 0.5px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.sidebar-user { flex: 1; min-width: 0; }
.sidebar-user .name { font-size: 13px; font-weight: 600; }
.sidebar-user .role { font-size: 11px; color: var(--text-3); }
.sidebar-logout { color: var(--text-3); transition: color 0.15s; }
.sidebar-logout:hover { color: var(--text-1); }
.sidebar-logout svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ═══ MAIN CONTENT — centered, not hugging the left ═══ */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}
.main-inner {
  width: 100%;
  max-width: 1100px;
  padding: 24px 32px 80px;
}

/* ═══ PAGE HEADER ═══ */
.page-header { margin-bottom: 20px; }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.page-subtitle { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ═══ TOOLBAR ═══ */
.toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar .search-wrap { position: relative; flex: 1; min-width: 200px; }
.toolbar .search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; stroke: var(--text-3); stroke-width: 2; fill: none;
  pointer-events: none;
}
.toolbar .search-wrap input { padding-left: 36px; }
.toolbar-count { font-size: 12px; color: var(--text-3); font-family: var(--mono); margin-left: auto; white-space: nowrap; }

/* ── Role pills ── */
.role-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.role-pill {
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  background: var(--glass-input); border: 0.5px solid var(--border);
  color: var(--text-2); cursor: pointer; transition: all 0.15s var(--ease);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.role-pill:hover { background: var(--glass-hover); color: var(--text-1); }
.role-pill.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(10,132,255,0.2); }
.role-pill .dot { width: 6px; height: 6px; border-radius: 50%; }

/* ═══ COURSE GRID ═══ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  animation: fadeUp 0.35s var(--ease) both;
}

.card-cover { position: relative; width: 100%; background: rgba(255,255,255,0.02); overflow: hidden; }
.card-cover img { width: 100%; height: auto; display: block; opacity: 0.85; transition: opacity 0.3s; }
.glass-card:hover .card-cover img { opacity: 1; }
.card-cover .fade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%); }
.card-cover .progress-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 2.5px; background: rgba(255,255,255,0.06); }
.card-cover .progress-fill { height: 100%; background: var(--accent); border-radius: 0 2px 2px 0; }
.card-body { padding: 12px 14px 14px; }
.card-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 2px 7px; border-radius: 6px; margin-bottom: 6px;
}
.card-badge .dot { width: 4px; height: 4px; border-radius: 50%; }
.b-mid { color: #8b9cf7; background: rgba(139,156,247,0.08); } .b-mid .dot { background: #8b9cf7; }
.b-jungle { color: #5ec87a; background: rgba(94,200,122,0.08); } .b-jungle .dot { background: #5ec87a; }
.b-top { color: #e0807a; background: rgba(224,128,122,0.08); } .b-top .dot { background: #e0807a; }
.b-adc { color: #efa05a; background: rgba(239,160,90,0.08); } .b-adc .dot { background: #efa05a; }
.b-support { color: #5ec8c8; background: rgba(94,200,200,0.08); } .b-support .dot { background: #5ec8c8; }
.b-all { color: #868ba2; background: rgba(134,139,162,0.08); } .b-all .dot { background: #868ba2; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--text-3); font-weight: 500; }
.card-meta svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; vertical-align: -1px; margin-right: 2px; }
.card-meta .done { color: var(--accent); }

/* ═══ DETAIL VIEW ═══ */
.detail-header { padding: 0 0 20px; }
.detail-title { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; margin: 8px 0 12px; }
.detail-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.detail-meta svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; vertical-align: -2px; margin-right: 3px; }
.detail-progress { margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-3); }
.detail-progress-bar { flex: 1; height: 3px; background: rgba(255,255,255,0.06); border-radius: 2px; }
.detail-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.4s; }
.chapter-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); padding: 20px 0 8px; }

/* ═══ VIDEO ITEM ═══ */
.vi {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.15s var(--ease);
  border: 0.5px solid transparent; margin-bottom: 2px;
}
.vi:hover { background: var(--glass-light); border-color: var(--border); }
.vi.playing { background: var(--accent-dim); border-color: rgba(10,132,255,0.12); }
.vi.watched .vi-n { color: var(--green); background: var(--green-dim); }
.vi.watched .vi-n svg { display: block; }
.vi.watched .vi-n .num { display: none; }
.vi-n {
  flex-shrink: 0; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs); background: rgba(255,255,255,0.04);
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
}
.vi-n svg { display: none; width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.5; fill: none; }
.vi-body { flex: 1; min-width: 0; }
.vi-title { font-size: 13.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vi-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; display: flex; gap: 6px; align-items: baseline; }
.vi-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; cursor: pointer; opacity: 0.65; }
.vi-desc:hover { opacity: 1; }
.vi-desc.expanded { white-space: normal; max-width: none; opacity: 1; }
.vi-progress { margin-top: 3px; height: 2px; background: rgba(255,255,255,0.06); border-radius: 1px; }
.vi-progress-fill { height: 100%; background: var(--accent); opacity: 0.5; border-radius: 1px; }
.vi-dur { flex-shrink: 0; font-family: var(--mono); font-size: 11px; color: var(--text-3); padding: 3px 7px; background: rgba(255,255,255,0.03); border-radius: 6px; }
.vi-check {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03); border: 0.5px solid var(--border); transition: all 0.15s;
}
.vi-check:hover { background: var(--green-dim); border-color: rgba(48,209,88,0.2); }
.vi-check svg { width: 13px; height: 13px; stroke: var(--text-3); stroke-width: 2; fill: none; }
.vi.watched .vi-check { background: var(--green-dim); border-color: rgba(48,209,88,0.2); }
.vi.watched .vi-check svg { stroke: var(--green); }

/* ═══ PLAYER ═══ */
.player { display: none; margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; border: 0.5px solid var(--border); background: #000; }
.player.on { display: block; }
.player.theatre {
  width: calc(100vw - var(--sidebar-w));
  margin-left: calc(-1 * (100vw - var(--sidebar-w) - 100%) / 2);
  margin-right: calc(-1 * (100vw - var(--sidebar-w) - 100%) / 2);
  border-radius: 0; border-left: none; border-right: none;
  position: static; transform: none;
}
.p-wrap { position: relative; cursor: pointer; user-select: none; }
.p-wrap video { width: 100%; display: block; max-height: 70vh; min-height: 300px; background: #000; }
@media (min-width: 768px) { .p-wrap video { min-height: 400px; } }
.player.theatre video { max-height: 80vh; }
.p-wrap.loading::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 2.5px solid rgba(255,255,255,0.12);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.6s linear infinite; z-index: 4;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Player controls ── */
.p-controls {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 36px 14px 10px; opacity: 0; transition: opacity 0.25s;
}
.p-wrap:hover .p-controls, .p-wrap.paused .p-controls, .p-wrap.seeking .p-controls { opacity: 1; }

.p-progress { position: relative; width: 100%; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; cursor: pointer; margin-bottom: 8px; transition: height 0.1s; }
.p-progress:hover, .p-wrap.seeking .p-progress { height: 5px; }
.p-buffer { position: absolute; top: 0; left: 0; height: 100%; background: rgba(255,255,255,0.2); border-radius: 2px; pointer-events: none; }
.p-played { position: absolute; top: 0; left: 0; height: 100%; background: var(--accent); border-radius: 2px; pointer-events: none; }
.p-thumb {
  position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); transform: translate(-50%,-50%);
  opacity: 0; transition: opacity 0.1s; pointer-events: none;
  box-shadow: 0 0 6px rgba(10,132,255,0.4);
}
.p-progress:hover .p-thumb, .p-wrap.seeking .p-thumb { opacity: 1; }
.p-hover-time {
  position: absolute; bottom: 12px; transform: translateX(-50%);
  background: rgba(0,0,0,0.7); color: #fff; font-size: 11px; font-family: var(--mono);
  padding: 2px 6px; border-radius: 4px; pointer-events: none; opacity: 0;
}
.p-progress:hover .p-hover-time { opacity: 1; }

/* ── Control bar: volume LEFT, utils RIGHT ── */
.p-bar { display: flex; align-items: center; gap: 4px; }
.p-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: background 0.1s; flex-shrink: 0;
}
.p-btn:hover { background: rgba(255,255,255,0.1); }
.p-btn svg { width: 18px; height: 18px; fill: #fff; }
.p-time { font-size: 12px; color: rgba(255,255,255,0.7); font-family: var(--mono); white-space: nowrap; margin: 0 4px; }
.p-spacer { flex: 1; }

.p-vol { display: flex; align-items: center; gap: 2px; }
.p-vol-slider { width: 0; overflow: hidden; transition: width 0.2s; display: flex; align-items: center; }
.p-vol:hover .p-vol-slider { width: 56px; }
.p-vol-slider input {
  -webkit-appearance: none; width: 56px; height: 3px;
  background: rgba(255,255,255,0.2); border-radius: 2px; outline: none;
  margin: 0; vertical-align: middle;
}
.p-vol-slider input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: #fff;
  margin-top: 0;
}

.p-speed-menu {
  position: absolute; bottom: 48px; right: 8px;
  background: rgba(20,20,24,0.92); backdrop-filter: blur(20px);
  border: 0.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 0; min-width: 110px; display: none; z-index: 10;
}
.p-speed-menu.open { display: block; }
.p-speed-opt {
  padding: 7px 14px; font-size: 13px; color: rgba(255,255,255,0.6);
  cursor: pointer; transition: all 0.1s; display: flex; align-items: center; gap: 6px;
}
.p-speed-opt:hover { background: rgba(255,255,255,0.05); color: #fff; }
.p-speed-opt.active { color: var(--accent); font-weight: 600; }

/* ── Player info bar ── */
.p-info {
  padding: 14px 16px; background: rgba(18,18,22,0.9);
  backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--border);
  display: flex; gap: 12px; align-items: flex-start;
}
.p-info-body { flex: 1; min-width: 0; }
.p-info-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.p-info-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--text-3); }
.p-info-date { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--accent); background: var(--accent-dim); padding: 2px 7px; border-radius: 4px; }
.p-info-desc { font-size: 13px; color: var(--text-2); line-height: 1.45; margin-top: 6px; }
.p-info .mark-btn {
  flex-shrink: 0; padding: 5px 12px; border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.04); border: 0.5px solid var(--border);
  font-size: 11px; font-weight: 600; color: var(--text-2);
  transition: all 0.15s; display: flex; align-items: center; gap: 5px; margin-top: 2px;
}
.p-info .mark-btn:hover { background: var(--green-dim); color: var(--green); border-color: rgba(48,209,88,0.2); }
.p-info .mark-btn.is-done { background: var(--green-dim); color: var(--green); border-color: rgba(48,209,88,0.2); }
.p-info .mark-btn svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ═══ COMMENTARY ITEM ═══ */
.com-item {
  display: flex; flex-direction: column; gap: 0;
  padding: 0; border-radius: var(--radius-sm);
  background: var(--glass-light); border: 0.5px solid var(--border);
  cursor: pointer; transition: all 0.15s var(--ease); overflow: hidden;
}
.com-item:hover { border-color: var(--border-light); background: var(--glass-hover); }

.com-item-top {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 8px;
}
.com-item .champs { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.com-item .champs .vs { color: var(--text-3); font-weight: 400; font-size: 11px; margin: 0 4px; }

.com-item-stats {
  display: flex; align-items: center; gap: 0;
  padding: 6px 12px;
  background: rgba(255,255,255,0.02);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}
.com-stat { flex: 1; text-align: center; padding: 2px 0; }
.com-stat-val { display: block; font-size: 13px; font-weight: 600; font-family: var(--mono); }
.com-stat-label { display: block; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-top: 1px; }
.com-stat-sep { width: 0.5px; height: 24px; background: var(--border); flex-shrink: 0; }

.com-item-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px;
}
.com-coach { font-size: 12px; font-weight: 500; color: var(--text-2); }
.com-date { font-size: 11px; font-family: var(--mono); color: var(--text-3); }

.com-type {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 4px; flex-shrink: 0;
}
.com-type.smurf { color: var(--accent); background: var(--accent-dim); }
.com-type.high-elo { color: var(--orange); background: var(--orange-dim); }
.com-type.earpiece { color: var(--green); background: var(--green-dim); }

/* ═══ EMPTY ═══ */
.empty { text-align: center; padding: 60px 20px; grid-column: 1 / -1; }
.empty h3 { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.empty p { font-size: 13px; color: var(--text-3); }
.hidden { display: none !important; }

/* ═══ MOBILE ═══ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); z-index: 200; width: 280px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 199; background: rgba(0,0,0,0.5); }
  .sidebar.open ~ .sidebar-backdrop { display: block; }
  .main { margin-left: 0; }
  .main-inner { padding: 16px 16px 80px; }
  .mobile-header { display: flex !important; align-items: center; gap: 12px; padding: 12px 0 16px; }
  .mobile-menu-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-xs); background: rgba(255,255,255,0.04); border: 0.5px solid var(--border);
  }
  .mobile-menu-btn svg { width: 18px; height: 18px; stroke: var(--text-2); stroke-width: 2; fill: none; }
  .page-title { font-size: 22px; }
  .player.theatre { width: 100vw; margin-left: -16px; margin-right: -16px; }
  .com-list-grid { grid-template-columns: 1fr !important; }
}
@media (min-width: 769px) {
  .mobile-header { display: none !important; }
  .sidebar-backdrop { display: none !important; }
}
@media (max-width: 480px) {
  .rune-trees { grid-template-columns: 1fr; }
}

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

/* ═══ WIKI GRID ═══ */
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  animation: fadeUp 0.35s var(--ease) both;
}
.wiki-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}

/* ── Stat filter pills ── */
.stat-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.stat-pill {
  padding: 4px 10px; border-radius: 14px; font-size: 11px; font-weight: 500;
  background: var(--glass-input); border: 0.5px solid var(--border);
  color: var(--text-3); cursor: pointer; transition: all 0.15s var(--ease);
  white-space: nowrap;
}
.stat-pill:hover { background: var(--glass-hover); color: var(--text-2); }
.stat-pill.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(10,132,255,0.2); }

/* ── Item category headers ── */
.item-cat-header {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 18px 0 8px; margin-top: 4px;
  border-bottom: 0.5px solid var(--border); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.item-cat-header:first-child { padding-top: 0; margin-top: 0; }
.item-cat-count {
  font-size: 11px; font-family: var(--mono); color: var(--text-3); font-weight: 400;
}

.wiki-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; border-radius: var(--radius-sm);
  background: var(--glass-light); border: 0.5px solid transparent;
  cursor: pointer; transition: all 0.15s var(--ease); text-align: center;
}
.wiki-cell:hover {
  background: var(--glass-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.wiki-cell img {
  width: 52px; height: 52px; border-radius: var(--radius-xs);
  image-rendering: auto;
}
.wiki-grid-sm .wiki-cell img { width: 40px; height: 40px; }
.wiki-cell-name {
  font-size: 11px; font-weight: 500; color: var(--text-2);
  line-height: 1.2; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  max-width: 100%;
}

/* ═══ WIKI TOOLTIP ═══ */
.wiki-tooltip {
  position: fixed; z-index: 10000; display: none;
  background: rgba(16, 16, 20, 0.96);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 0 0.5px rgba(255,255,255,0.05) inset;
  padding: 14px;
  overflow-y: auto;
  pointer-events: none;
}

.wt-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.wt-icon {
  width: 40px; height: 40px; border-radius: var(--radius-xs);
  border: 0.5px solid var(--border);
  flex-shrink: 0;
}
.wt-name { font-size: 15px; font-weight: 700; color: var(--text-1); }
.wt-sub { font-size: 12px; color: var(--text-3); font-style: italic; margin-top: 1px; }
.wt-gold {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: #f5c542; margin-top: 2px;
}
.wt-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.wt-tag {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 2px 8px; border-radius: 4px;
  background: var(--accent-dim); color: var(--accent);
}
.wt-stats {
  margin-bottom: 8px; padding: 8px 0;
  border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border);
}
.wt-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 0; font-size: 12px;
}
.wt-stat-row span:first-child { color: var(--text-3); }
.wt-stat-row span:last-child { color: var(--text-1); font-family: var(--mono); font-weight: 500; }
.wt-desc {
  font-size: 12px; color: var(--text-2); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.wt-build {
  margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--border);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.wt-build-label { font-size: 11px; color: var(--text-3); font-weight: 600; }
.wt-build-icon {
  width: 24px; height: 24px; border-radius: 4px;
  border: 0.5px solid var(--border);
}

/* ═══ CHAMPION DETAIL ═══ */
/* ── Game mode bar ── */
.build-mode-bar {
  display: flex; gap: 4px; margin-bottom: 10px;
}
.mode-pill {
  padding: 5px 14px; border-radius: 16px; font-size: 12px; font-weight: 500;
  background: var(--glass-input); border: 0.5px solid var(--border);
  color: var(--text-3); cursor: pointer; transition: all 0.15s;
}
.mode-pill:hover { color: var(--text-1); }
.mode-pill.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(10,132,255,0.2); }

.champ-build-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 16px;
}
.champ-build-panel { padding: 16px; }
.build-section-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 0.5px solid var(--border);
}
.level-slider {
  -webkit-appearance: none; width: 120px; height: 3px;
  background: rgba(255,255,255,0.12); border-radius: 2px; outline: none;
}
.level-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 0 6px rgba(10,132,255,0.4);
}

/* Item slots */
.item-slots { display: grid; grid-template-columns: repeat(3, 48px); gap: 6px; margin-bottom: 8px; justify-content: center; }
.item-slot {
  width: 48px; height: 48px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s; overflow: hidden;
}
.item-slot.empty {
  background: var(--glass-input); border: 1px dashed var(--border);
  color: var(--text-3); font-size: 18px;
}
.item-slot.empty:hover { border-color: var(--accent); color: var(--accent); }
.item-slot.filled {
  background: var(--glass-light); border: 0.5px solid var(--border); position: relative;
}
.item-slot.filled:hover { border-color: var(--red); }
.item-slot.filled img { width: 100%; height: 100%; object-fit: cover; }
.item-slot.filled span { display: none; }

/* Item picker dropdown */
.item-picker {
  border-top: 0.5px solid var(--border); padding-top: 8px; margin-top: 4px;
}
.item-picker-results { max-height: 200px; overflow-y: auto; }
.item-pick-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12px;
  transition: background 0.1s;
}
.item-pick-row:hover { background: var(--glass-hover); }
.item-pick-row img { width: 24px; height: 24px; border-radius: 4px; }
.item-pick-row span { flex: 1; }
.item-pick-gold { color: #f5c542; font-family: var(--mono); font-size: 11px; flex: none !important; }

.stat-bonus { color: var(--green); font-size: 11px; margin-left: 4px; }

.champ-ability {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 0.5px solid var(--border);
}
.champ-ability:last-child { border-bottom: none; }
.ability-icon {
  width: 40px; height: 40px; border-radius: var(--radius-xs);
  border: 0.5px solid var(--border); flex-shrink: 0;
}
.ability-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.ability-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.ability-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-3); margin-top: 6px; font-family: var(--mono);
}

.champ-stats-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.champ-stat {
  display: flex; justify-content: space-between; padding: 5px 0;
  border-bottom: 0.5px solid var(--border); font-size: 12px;
}
.champ-stat:last-child { border-bottom: none; }
.champ-stat-label { color: var(--text-3); }
.champ-stat-val { font-family: var(--mono); font-weight: 500; }

/* ── Rune selector ── */
.rune-tree-picker {
  display: flex; align-items: center; gap: 4px; margin-bottom: 6px;
  flex-wrap: wrap;
}
.rune-pick-label {
  font-size: 9px; font-weight: 600; color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.04em; width: 100%; flex-shrink: 0; margin-bottom: 4px;
}
.rune-tree-btn {
  width: 28px; height: 28px; border-radius: 6px; padding: 3px;
  background: var(--glass-input); border: 1px solid transparent;
  cursor: pointer; transition: all 0.15s;
}
.rune-tree-btn img { width: 100%; height: 100%; }
.rune-tree-btn:hover { border-color: var(--border-light); }
.rune-tree-btn.active { border-color: var(--tc); box-shadow: 0 0 8px color-mix(in srgb, var(--tc) 30%, transparent); }
.rune-pick-row {
  display: flex; gap: 4px; justify-content: center; padding: 4px 0;
}
.rune-pick-btn {
  width: 36px; height: 36px; border-radius: 50%; padding: 4px;
  background: rgba(255,255,255,0.03); border: 1.5px solid var(--border);
  cursor: pointer; transition: all 0.15s; opacity: 0.5;
}
.rune-pick-btn.minor { width: 30px; height: 30px; padding: 3px; }
.rune-pick-btn img { width: 100%; height: 100%; border-radius: 50%; }
.rune-pick-btn:hover { opacity: 0.8; border-color: var(--border-light); }
.rune-pick-btn.selected { opacity: 1; border-color: var(--tc); box-shadow: 0 0 8px color-mix(in srgb, var(--tc) 40%, transparent); }

/* ── Stat shards ── */
.shard-row { display: flex; gap: 4px; margin-bottom: 4px; }
.shard-btn {
  flex: 1; padding: 4px 6px; border-radius: 6px; font-size: 10px; font-weight: 500;
  background: var(--glass-input); border: 0.5px solid var(--border);
  color: var(--text-3); cursor: pointer; transition: all 0.15s; text-align: center;
}
.shard-btn:hover { color: var(--text-2); }
.shard-btn.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(10,132,255,0.2); }

@media (max-width: 768px) {
  .champ-build-row { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .champ-build-row { grid-template-columns: 1fr 1fr; }
}

/* ═══ RUNE TREES ═══ */
.rune-trees {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeUp 0.35s var(--ease) both;
}
.rune-trees > .rune-tree {
  flex: 1 1 180px;
  min-width: 180px;
}
.rune-tree { padding: 16px; }
.rune-tree-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.rune-tree-icon {
  width: 32px; height: 32px;
  filter: drop-shadow(0 0 6px var(--tree-color));
}
.rune-tree-name {
  font-size: 15px; font-weight: 700; color: var(--tree-color);
}
.rune-slot {
  display: flex; gap: 4px; justify-content: center;
  padding: 10px 0; border-top: 0.5px solid var(--border);
}
.rune-slot.keystones { padding: 12px 0; }
.rune-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px; border-radius: var(--radius-xs); cursor: pointer;
  transition: all 0.15s var(--ease); flex: 1; min-width: 0;
}
.rune-cell:hover {
  background: var(--glass-hover);
}
.rune-icon {
  width: 44px; height: 44px;
  filter: grayscale(20%);
  transition: all 0.2s;
}
.rune-icon.keystone { width: 56px; height: 56px; }
.rune-cell:hover .rune-icon {
  filter: grayscale(0%) drop-shadow(0 0 8px var(--tree-color));
  transform: scale(1.08);
}
.rune-name {
  font-size: 10px; font-weight: 500; color: var(--text-2); text-align: center;
  line-height: 1.2; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ═══ SUMMONER SPELLS ═══ */
.spell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
  animation: fadeUp 0.35s var(--ease) both;
}
.spell-card {
  display: flex; gap: 14px; padding: 16px; cursor: default;
}
.spell-card-icon {
  width: 48px; height: 48px; border-radius: var(--radius-xs);
  border: 0.5px solid var(--border); flex-shrink: 0;
}
.spell-card-body { flex: 1; min-width: 0; }
.spell-card-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.spell-card-meta { font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-bottom: 6px; }
.spell-card-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.spell-card-modes {
  margin-top: 6px; font-size: 10px; font-weight: 600;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .wiki-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
  .wiki-cell img { width: 44px; height: 44px; }
  .wiki-cell-name { font-size: 10px; }
  .wiki-tooltip { max-width: 280px !important; }
  .rune-icon { width: 36px; height: 36px; }
  .rune-icon.keystone { width: 44px; height: 44px; }
  .spell-grid { grid-template-columns: 1fr; }
}
