:root {
  --bg: #0a0a0f;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(139, 92, 246, 0.06);
  --text: #f0f0f5;
  --text-muted: #9ca3af;
  --accent: #8b5cf6;
  --hot: #ec4899;
  --glass-border: rgba(255, 255, 255, 0.06);
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f9fb;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-hover: rgba(139, 92, 246, 0.08);
    --text: #1f2937;
    --text-muted: #6b7280;
    --glass-border: rgba(0, 0, 0, 0.06);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }
  .aurora-bg { opacity: 0.15 !important; }
}

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

html { scroll-behavior: smooth; }

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

/* ===== 背景特效 ===== */
.aurora-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(139,92,246,0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(236,72,153,0.08), transparent);
  pointer-events: none;
  z-index: 0;
  animation: aurora 20s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -20px) rotate(1deg); }
  66% { transform: translate(-20px, 10px) rotate(-1deg); }
  100% { transform: translate(10px, -10px) rotate(0.5deg); }
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.glow-orb.purple {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.4), transparent 70%);
  top: -100px; right: -100px;
  animation: floatOrb 15s ease-in-out infinite;
}
.glow-orb.pink {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(236,72,153,0.3), transparent 70%);
  bottom: -80px; left: -80px;
  animation: floatOrb 18s ease-in-out infinite reverse;
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -30px); }
}

/* ===== 导航 ===== */
nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--hot));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.brand-mark svg { width: 18px; height: 18px; }

.nav-menu {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
}
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--text); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 60px; right: 20px;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--shadow);
    display: none;
    min-width: 160px;
    z-index: 100;
  }
  .nav-menu.show { display: flex; }
  .nav-link { width: 100%; }
}

/* ===== 主内容 ===== */
main {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===== 平台芯片 ===== */
.platform-chip {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.platform-chip:hover {
  background: rgba(139, 92, 246, 0.2);
  color: var(--text);
  transform: translateY(-1px);
}

/* ===== 视频网格 ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.video-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(139, 92, 246, 0.25);
}

.video-thumb-wrap {
  position: relative;
  padding-top: 56.25%;
  background: #1a1a2e;
  overflow: hidden;
}
.video-thumb-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.video-card:hover .video-thumb-wrap img {
  transform: scale(1.05);
}
.video-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.video-info { padding: 14px; }
.video-title {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.video-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.video-platform {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

/* ===== 平台导航网格 ===== */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}
.platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(139, 92, 246, 0.25);
}
.platform-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.platform-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.platform-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  margin: 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb li:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: var(--text-muted);
  opacity: 0.5;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--accent); }

/* ===== 评论区 ===== */
.comment-section { padding: 24px; margin-top: 32px; }
.comment-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item {
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}
.comment-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.comment-body {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}
.comment-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 0;
  font-size: 0.9rem;
}
.comment-form {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.comment-input {
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  flex: 1;
  min-width: 120px;
}
.comment-input:focus { border-color: var(--accent); }
.comment-input.wide { flex: 3; }
.comment-submit {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), var(--hot));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.comment-submit:hover { opacity: 0.9; }
.comment-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== 骨架屏 ===== */
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== 页脚 ===== */
footer {
  text-align: center;
  padding: 48px 24px 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 48px;
}

/* ===== 页面布局（详情页双栏） ===== */
.page-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.main-content { flex: 1; min-width: 0; }
.global-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  align-self: flex-start;
}

@media (max-width: 1100px) {
  .global-sidebar { display: none !important; }
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .video-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .comment-form { flex-direction: column; }
  .comment-input.wide { flex: 1; }
  .search-box button { padding: 0 14px; font-size: 0.85rem; }
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.4); }

/* ===== 选中高亮 ===== */
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
}