/* ============================================
   Video Portfolio — Categorized Horizontal
   暗色 · 分类滑动 · 精炼
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

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

:root {
  --bg: #08080C;
  --bg-card: #111118;
  --text: #F0F0F5;
  --text-dim: #8888A0;
  --text-muted: #5C5C72;
  --accent-coral: #FF3C78;
  --accent-purple: #7C3AED;
  --accent-cyan: #06B6D4;
  --gradient-hero: linear-gradient(135deg, #FF3C78 0%, #7C3AED 50%, #06B6D4 100%);
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);
  --radius: 14px;
  --radius-lg: 20px;
  --font-en: 'Space Grotesk', sans-serif;
  --font-cn: 'Noto Sans SC', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { font-size: 16px; scroll-behavior: smooth; }

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

::selection { background: var(--accent-coral); color: white; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

/* ========== NAV ========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(8,8,12,0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-logo {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 3px;
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent-coral);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.2;
  animation: shapeFloat 12s ease-in-out infinite;
}
.shape-1 {
  width: 500px; height: 500px;
  background: var(--accent-coral);
  top: -150px; right: -100px;
}
.shape-2 {
  width: 400px; height: 400px;
  background: var(--accent-purple);
  bottom: -80px; left: -80px;
  animation-delay: -4s;
}
.shape-3 {
  width: 300px; height: 300px;
  background: var(--accent-cyan);
  top: 40%; right: 30%;
  animation-delay: -8s;
}
@keyframes shapeFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}
.hero-content { position: relative; z-index: 1; max-width: 900px; }
.hero-eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-coral);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 28px;
}
.hero-title .line {
  font-family: var(--font-cn);
  font-size: clamp(64px, 12vw, 140px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
}
.hero-title .line.accent {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: 60px;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 460px;
}

/* ========== REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========== WORK CONTAINER ========== */
.work-container {
  padding: 0 40px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ========== WORK HEADER ========== */
.work-header {
  margin-bottom: 60px;
  padding-left: 4px;
}
.work-title {
  font-family: var(--font-cn);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.work-subtitle {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* ========== CATEGORY SECTION ========== */
.category-section {
  margin-bottom: 72px;
}
.category-section:last-child { margin-bottom: 0; }

.category-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-left: 4px;
}
.category-label {
  font-family: var(--font-en);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.category-count {
  font-family: var(--font-en);
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* ========== HORIZONTAL SCROLL TRACK ========== */
.scroll-track-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.scroll-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
  padding: 8px 4px 16px;
  flex: 1;
}
.scroll-track::-webkit-scrollbar { display: none; } /* Chrome */

/* ========== SCROLL ARROWS ========== */
.scroll-arrow {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.scroll-arrow:hover {
  border-color: var(--accent-coral);
  color: var(--accent-coral);
  background: rgba(255,60,120,0.08);
}
.scroll-left { margin-right: 12px; }
.scroll-right { margin-left: 12px; }

/* ========== VIDEO CARD ========== */
.video-card {
  flex: 0 0 320px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  scroll-snap-align: start;
}
.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-coral);
  box-shadow: 0 16px 48px rgba(255,60,120,0.12);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0e0e14;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255,60,120,0.3), rgba(124,58,237,0.3));
  transition: opacity 0.4s;
  z-index: 1;
}
.video-card:hover .card-thumb::before { opacity: 1; }
.card-poster {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.play-btn {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  transition: all 0.4s var(--ease-spring);
  z-index: 2;
}
.video-card:hover .play-btn {
  background: var(--accent-coral);
  border-color: var(--accent-coral);
  transform: scale(1.2);
  box-shadow: 0 8px 24px rgba(255,60,120,0.4);
}

.card-info {
  padding: 16px 18px;
}
.card-title {
  font-family: var(--font-cn);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  padding: 48px 40px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-container {
  width: 90%;
  max-width: 900px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: modalIn 0.5s var(--ease-spring);
}
@keyframes modalIn {
  from { transform: scale(0.85) translateY(30px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}
.modal-close-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover {
  border-color: var(--accent-coral);
  color: var(--accent-coral);
  background: rgba(255,60,120,0.1);
}
.modal-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}
.modal-video-wrap iframe,
.modal-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.modal-loading {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-dim);
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 2px;
}
.modal-desc {
  padding: 16px 24px;
  font-size: 15px;
  color: var(--text-dim);
  text-align: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .hero { padding: 20px; }
  .hero-title .line { font-size: clamp(44px, 14vw, 72px); }
  .hero-title .line.accent { margin-left: 30px; }
  .work-container { padding: 0 20px 60px; }
  .video-card { flex: 0 0 280px; }
  .category-label { font-size: 20px; }
  .scroll-arrow { width: 36px; height: 36px; font-size: 16px; }
  .category-section { margin-bottom: 56px; }
}
@media (max-width: 480px) {
  .hero { padding: 16px; }
  .hero-title .line { font-size: 40px; letter-spacing: -1px; }
  .hero-title .line.accent { margin-left: 20px; }
  .hero-sub { font-size: 15px; }
  .video-card { flex: 0 0 260px; }
  .scroll-arrow { display: none; }
  .scroll-track { padding: 8px 0 16px; }
}
