:root {
  --bg-primary: #0a0a0b;
  --bg-secondary: #141417;
  --bg-tertiary: #1c1c21;
  --bg-card: #1a1a1e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a8;
  --text-muted: #6b6b75;
  --accent: #ff2d55;
  --accent-hover: #ff4d6f;
  --border: #2a2a30;
}

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

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.announcement-ribbon {
  background: linear-gradient(135deg, #ff2d55, #ff4d6f);
  color: white;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-img { width: 36px; height: 36px; border-radius: 8px; }

.logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-wrapper { flex: 1; max-width: 600px; position: relative; }

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.15);
}

.search-icon { padding: 0 12px; color: var(--text-muted); }

.search-box input {
  flex: 1;
  padding: 12px 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
}

.search-box input::placeholder { color: var(--text-muted); }

.search-btn {
  padding: 8px 16px;
  margin: 4px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  transition: background 0.2s;
}

.search-btn:hover { background: var(--accent-hover); }

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

.video-count {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 6px 12px;
  border-radius: 20px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 18px;
  transition: all 0.2s;
}

.icon-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.main-content { max-width: 1600px; margin: 0 auto; padding: 24px; }

.layout { display: flex; gap: 32px; }

.sidebar { width: 280px; flex-shrink: 0; }

.sidebar-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.category-nav { display: flex; flex-direction: column; gap: 4px; }

.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
}

.category-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.category-item.active { background: var(--accent); color: white; }
.category-item.active .cat-count { background: rgba(255,255,255,0.2); color: white; }

.cat-icon { font-size: 18px; }
.cat-name { flex: 1; font-size: 14px; font-weight: 500; }

.cat-count {
  font-size: 12px;
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-muted);
}

.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.tag-chip:hover { background: var(--accent); border-color: var(--accent); color: white; }
.tag-chip em { font-size: 11px; opacity: 0.6; font-style: normal; }
.tag-chip.active { background: var(--accent); border-color: var(--accent); color: white; }

.quick-filters { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-btn {
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

.content-area { flex: 1; min-width: 0; }

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  min-height: 40px;
}

.active-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 13px; color: var(--text-muted); }

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent);
  border-radius: 20px;
  font-size: 13px;
  color: white;
}

.filter-tag button { background: none; border: none; color: white; cursor: pointer; padding: 0; font-size: 14px; }

.results-info { font-size: 13px; color: var(--text-muted); }

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

.video-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px var(--accent);
}

.video-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.video-card:hover .video-thumb img { transform: scale(1.05); }

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.video-card:hover .video-overlay { opacity: 1; }

.play-btn {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transform: scale(0.8);
  transition: transform 0.2s;
}

.video-card:hover .play-btn { transform: scale(1); }

.video-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: var(--accent);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.video-info { padding: 14px; }

.video-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.video-category {
  padding: 3px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 11px;
  color: var(--accent);
}

.loading-state { padding: 20px 0; }

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

.skeleton-card { background: var(--bg-card); border-radius: 16px; overflow: hidden; }

.skeleton-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-info { padding: 14px; }

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }

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

.no-results { text-align: center; padding: 80px 20px; }
.no-results-icon { font-size: 64px; margin-bottom: 20px; }
.no-results h3 { font-size: 24px; margin-bottom: 8px; }
.no-results p { color: var(--text-muted); margin-bottom: 24px; }

.reset-btn {
  padding: 12px 24px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.pagination { display: flex; justify-content: center; gap: 8px; padding: 40px 0; }

.page-btn {
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}

.page-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (max-width: 1024px) { .sidebar { width: 240px; } }

@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .header { padding: 12px 16px; gap: 12px; }
  .search-wrapper { display: none; }
}

@media (max-width: 480px) { .video-grid { grid-template-columns: 1fr; } }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }
