:root {
  --bg: #0b0d17;
  --surface: #131626;
  --surface-2: #1b2036;
  --border: #2a314d;
  --text: #f3f5ff;
  --muted: #a6b0cf;
  --crimson: #e50945;
  --cyan: #00e5ff;
  --radius: 16px;
}

:root[data-theme="light"] {
  --bg: #f6f7fc;
  --surface: #ffffff;
  --surface-2: #eef1fa;
  --border: #d8deef;
  --text: #111526;
  --muted: #525d7a;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(11, 13, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

:root[data-theme="light"] .topbar {
  background: rgba(246, 247, 252, 0.94);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 1.15rem;
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--crimson), var(--cyan));
  color: #fff;
  font-weight: 900;
}

.search-wrap {
  flex: 1;
  max-width: 440px;
}

.search-wrap input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
}

.actions { display: flex; gap: 8px; align-items: center; }

.btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 60px);
}

.sidebar {
  padding: 18px 12px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
}

.nav-btn.active, .nav-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-btn.active {
  border-left: 3px solid var(--crimson);
}

.main {
  padding: 20px;
  padding-bottom: 130px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.hero {
  background: linear-gradient(135deg, rgba(229, 9, 69, 0.28), rgba(0, 229, 255, 0.14)), var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 20px;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.chip.active {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}

.card:hover { transform: translateY(-2px); }

.thumb {
  height: 150px;
  background: linear-gradient(135deg, #1b2240, #2c142e);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-title { font-weight: 700; font-size: 1rem; margin: 0; }
.card-meta { color: var(--muted); font-size: 0.85rem; margin: 0; }

.player-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 22px;
}

.player-panel video {
  width: 100%;
  max-height: 440px;
  border-radius: 14px;
  background: #000;
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.music-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
}

.shorts-stage {
  max-width: 420px;
  margin: 0 auto;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  padding: 12px;
}

.shorts-stage video {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  border-radius: 16px;
}

.mini-audio {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-audio audio { flex: 1; min-width: 220px; max-width: 460px; }

.footer {
  margin-top: 36px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: var(--surface);
  border-top: 1px solid var(--border);
  justify-content: space-around;
  padding: 6px 4px;
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .mini-audio { bottom: 56px; }
  .main { padding-bottom: 180px; }
}
