/* ═══════════════════════════════════════════════════════
   NEXTVISION — Main Stylesheet
   テーマ: ダーク × サイバーフューチャリスティック
   フォント: Orbitron (Display) + Noto Sans JP (Body) + Space Mono (Code/Data)
═══════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────── */
:root {
  --bg:          #050a14;
  --bg-2:        #090f1e;
  --bg-3:        #0d1527;
  --surface:     #111827;
  --surface-2:   #1a2438;
  --border:      rgba(0, 200, 255, 0.12);
  --border-2:    rgba(0, 200, 255, 0.25);

  --cyan:        #00c8ff;
  --cyan-dim:    rgba(0, 200, 255, 0.15);
  --cyan-glow:   rgba(0, 200, 255, 0.4);
  --magenta:     #ff0090;
  --magenta-dim: rgba(255, 0, 144, 0.15);
  --gold:        #ffd700;
  --gold-dim:    rgba(255, 215, 0, 0.12);

  --text:        #e8edf5;
  --text-2:      #8a9ab5;
  --text-3:      #5a6a85;

  --font-display: 'Orbitron', monospace;
  --font-body:    'Noto Sans JP', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --radius:      6px;
  --radius-lg:   12px;
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h:       64px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
ul, ol { list-style: none; }
input, button, select, textarea { font: inherit; }

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-dim); }

/* ── Container ──────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ══════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(5, 10, 20, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ロゴ */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-icon {
  font-size: 22px;
  color: var(--cyan);
  filter: drop-shadow(0 0 8px var(--cyan-glow));
  animation: hexRotate 8s linear infinite;
}
@keyframes hexRotate { to { filter: drop-shadow(0 0 12px var(--cyan-glow)) hue-rotate(30deg); } }
.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 検索 */
.nav-search { flex: 1; max-width: 420px; }
.search-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 40px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}
.search-wrap input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
}
.search-wrap input::placeholder { color: var(--text-3); }
.search-wrap button {
  padding: 10px 16px;
  color: var(--text-2);
  transition: color var(--transition);
}
.search-wrap button:hover { color: var(--cyan); }
.search-wrap button svg { width: 18px; height: 18px; display: block; }

/* ナビリンク */
.nav-links { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.05em;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--cyan); background: var(--cyan-dim); }
.nav-api { font-family: var(--font-mono); font-size: 11px; }

/* ハンバーガー */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all var(--transition);
}

/* モバイルメニュー */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 10, 20, 0.97);
  backdrop-filter: blur(20px);
  padding: 24px 20px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  z-index: 99;
}
.mobile-menu.open { display: flex; }
.mobile-link {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.mobile-link:hover { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-dim); }

/* ══════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
  padding: 60px 40px 60px max(40px, calc((100vw - 1280px) / 2 + 40px));
  gap: 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom right, transparent, rgba(0,0,0,0.8), transparent);
}
.hero-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,200,255,0.08) 0%, transparent 70%);
  animation: glowPulse 4s ease-in-out infinite alternate;
}
@keyframes glowPulse { to { transform: scale(1.1); opacity: 0.7; } }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid var(--cyan);
  border-radius: 40px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.demo-badge {
  padding: 4px 10px;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--gold);
  letter-spacing: 0.1em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--text-2);
}
.hero-creator, .hero-views {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-creator svg, .hero-views svg { width: 15px; height: 15px; opacity: 0.7; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--cyan), #0088cc);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius);
  letter-spacing: 0.05em;
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--cyan-dim);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--cyan-glow);
}
.btn-primary svg { width: 18px; height: 18px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
.btn-secondary svg { width: 16px; height: 16px; }

/* ── Hero Player ── */
.hero-player {
  position: relative;
  z-index: 1;
}
.player-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-2);
  background: var(--surface);
  aspect-ratio: 16/9;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
}
.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: opacity var(--transition);
}
.player-frame:hover .player-overlay { opacity: 0; }
.player-play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 200, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--cyan-glow);
}
.player-play-icon svg { width: 28px; height: 28px; fill: #000; margin-left: 3px; }
.player-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════
   TICKER
══════════════════════════════════════════════════════ */
.ticker-wrap {
  overflow: hidden;
  background: linear-gradient(90deg, var(--bg-2), var(--surface), var(--bg-2));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.ticker-track {
  display: flex;
  gap: 80px;
  white-space: nowrap;
  animation: ticker 20s linear infinite;
  width: max-content;
}
.ticker-track span {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-3);
  text-transform: uppercase;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ══════════════════════════════════════════════════════
   AI BANNER
══════════════════════════════════════════════════════ */
.ai-banner {
  margin: 32px auto;
  max-width: 1280px;
  padding: 0 20px;
}
.ai-banner-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--bg-3), var(--surface));
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}
.ai-banner-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.ai-icon {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
}
.ai-icon svg { width: 28px; height: 28px; }
.ai-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--cyan-dim);
  animation: pulsate 2s ease-out infinite;
}
@keyframes pulsate { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

.ai-text { flex: 1; }
.ai-text h2 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.ai-text p { font-size: 13px; color: var(--text-2); }

.btn-ai {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--magenta);
  color: var(--magenta);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: all var(--transition);
  background: var(--magenta-dim);
}
.btn-ai:hover {
  background: var(--magenta);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,0,144,0.4);
  transform: translateY(-1px);
}
.btn-ai-arrow { font-size: 18px; transition: transform var(--transition); }
.btn-ai:hover .btn-ai-arrow { transform: translateX(4px); }

.ai-result {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.8;
  display: none;
}
.ai-result.show { display: block; }

/* ══════════════════════════════════════════════════════
   FILTER TAGS
══════════════════════════════════════════════════════ */
.filter-section { padding: 8px 0 20px; }
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-tags::-webkit-scrollbar { display: none; }
.filter-tag {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 40px;
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}
.filter-tag:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
.filter-tag.active { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }

/* ══════════════════════════════════════════════════════
   VIDEO GRID
══════════════════════════════════════════════════════ */
.videos-section { padding: 20px 0 60px; }

.search-result-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.search-result-header h2 { font-size: 18px; }
.search-result-header em { color: var(--cyan); font-style: normal; }
.count { font-size: 13px; color: var(--text-2); margin-left: 8px; }
.clear-search { font-size: 13px; color: var(--text-3); transition: color var(--transition); }
.clear-search:hover { color: var(--magenta); }

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

/* ── Video Card ── */
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  animation: fadeUp 0.5s var(--delay, 0s) both ease-out;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.video-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px var(--border-2);
}

/* サムネイル */
.card-thumb-link { display: block; }
.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-3);
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.video-card:hover .card-thumb img { transform: scale(1.06); }

/* プレースホルダー */
.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--bg-3), var(--surface-2));
}
.thumb-hex {
  font-size: 32px;
  color: var(--cyan);
  opacity: 0.3;
  filter: drop-shadow(0 0 12px var(--cyan-glow));
  animation: hexRotate 12s linear infinite;
}
.thumb-number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.1em;
}

/* プレイオーバーレイ */
.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.video-card:hover .card-play-overlay { opacity: 1; }
.play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0,200,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.8);
  transition: transform var(--transition);
  box-shadow: 0 0 20px var(--cyan-glow);
}
.video-card:hover .play-circle { transform: scale(1); }
.play-circle svg { width: 22px; height: 22px; fill: #000; margin-left: 3px; }

/* カード内動画プレビュー */
.card-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
}
.card-preview.playing { opacity: 1; }

/* Duration バッジ */
.card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.8);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
}

/* カード本文 */
.card-body { padding: 16px; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.card-tag {
  font-size: 11px;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 2px 8px;
  border-radius: 4px;
  transition: background var(--transition);
}
.card-tag:hover { background: rgba(0,200,255,0.25); }

.card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a:hover { color: var(--cyan); }

.card-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.card-creator { font-weight: 500; }
.card-views { display: flex; align-items: center; gap: 4px; }
.card-views svg { width: 13px; height: 13px; }

/* AI ミニボタン */
.btn-ai-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid rgba(255,0,144,0.3);
  border-radius: var(--radius);
  font-size: 11px;
  color: var(--magenta);
  background: var(--magenta-dim);
  transition: all var(--transition);
  letter-spacing: 0.05em;
}
.btn-ai-mini:hover { border-color: var(--magenta); background: rgba(255,0,144,0.2); }
.ai-spark { font-size: 14px; }

.ai-desc-result {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
  display: none;
  padding: 10px;
  background: var(--bg-3);
  border-radius: var(--radius);
  border-left: 2px solid var(--magenta);
}
.ai-desc-result.show { display: block; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}
.empty-icon { font-size: 64px; margin-bottom: 20px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--text-2); margin-bottom: 24px; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}
.page-btn {
  padding: 10px 24px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-2);
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
.page-current {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════════════════════
   WATCH PAGE
══════════════════════════════════════════════════════ */
.watch-page { background: var(--bg); }
.watch-main { padding-top: 24px; }
.watch-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

/* プレーヤー */
.player-section {}
.player-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 16/9;
  margin-bottom: 24px;
}
.player-container video {
  width: 100%;
  height: 100%;
  background: #000;
}
.player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
}
.player-loading.hidden { display: none; }
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 動画情報 */
.video-info { padding-bottom: 32px; }
.video-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.video-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.video-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.video-meta-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.video-meta-right { display: flex; align-items: center; gap: 8px; }
.creator-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.creator-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}
.view-count { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.view-count svg { width: 16px; height: 16px; }
.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-2);
  transition: all var(--transition);
}
.action-btn:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
.action-btn svg { width: 16px; height: 16px; }
.action-btn.liked { border-color: var(--magenta); color: var(--magenta); background: var(--magenta-dim); }
.video-description {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 24px;
}

/* AI パネル */
.ai-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ai-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg-3), var(--surface));
}
.ai-panel-header h3 { font-size: 14px; font-weight: 600; }
.ai-spark-icon { color: var(--magenta); font-size: 16px; }
.ai-panel-body { padding: 16px 20px; }
.ai-watch-result {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
  display: none;
}
.ai-watch-result.show { display: block; }

/* 関連動画 */
.related-section { position: sticky; top: calc(var(--nav-h) + 16px); }
.related-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.related-list { display: flex; flex-direction: column; gap: 16px; }
.related-card { display: flex; gap: 12px; }
.related-thumb-link { flex-shrink: 0; }
.related-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  position: relative;
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder.small .thumb-hex { font-size: 20px; }
.related-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity var(--transition);
}
.related-card:hover .related-play { opacity: 1; }
.related-play svg { width: 20px; height: 20px; fill: #fff; }
.related-info { flex: 1; min-width: 0; }
.related-info h4 { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.related-info h4 a:hover { color: var(--cyan); }
.related-creator, .related-views { font-size: 11px; color: var(--text-3); }
.no-related { font-size: 13px; color: var(--text-3); }

/* ══════════════════════════════════════════════════════
   ERROR PAGE
══════════════════════════════════════════════════════ */
.error-main {
  min-height: calc(100vh - var(--nav-h) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.error-content { text-align: center; padding: 40px 20px; }
.error-glitch {
  font-family: var(--font-display);
  font-size: clamp(80px, 15vw, 180px);
  font-weight: 900;
  color: var(--cyan);
  position: relative;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 20px var(--cyan-glow));
}
.error-content h1 { font-size: 20px; margin-bottom: 12px; }
.error-content p { color: var(--text-2); margin-bottom: 32px; }

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 40px;
  background: var(--bg-2);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand .logo-icon { font-size: 24px; display: inline-block; }
.footer-brand .logo-text { display: inline-block; margin-left: 8px; }
.footer-tagline { font-size: 13px; color: var(--text-3); margin-top: 8px; font-family: var(--font-display); font-size: 11px; letter-spacing: 0.1em; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col h4 { font-size: 11px; font-family: var(--font-display); letter-spacing: 0.15em; color: var(--text-3); margin-bottom: 14px; text-transform: uppercase; }
.footer-col a { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; transition: color var(--transition); }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.footer-tech { font-family: var(--font-mono); font-size: 11px; }

/* ══════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* フォーカスアクセシビリティ */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* スクリーンリーダー専用 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding: 48px 20px; }
  .hero-player { display: none; }
  .watch-layout { grid-template-columns: 1fr; }
  .related-section { position: static; }
  .related-list { grid-template-columns: repeat(2, 1fr); display: grid; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; }
  .nav-search { display: none; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 36px 16px; min-height: auto; }
  .hero-title { font-size: clamp(20px, 6vw, 30px); }
  .ai-banner-inner { flex-wrap: wrap; }
  .btn-ai { width: 100%; justify-content: center; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .watch-layout { padding: 0 12px; }
  .video-meta-row { flex-direction: column; align-items: flex-start; }
  .related-list { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .video-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 12px; }
  .card-title { font-size: 12px; }
}

/* ══════════════════════════════════════════════════════
   DARK PREFERS
══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 準備中バッジ (AI バナー) ───────────────────────────────── */
.btn-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px dashed var(--text-3);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  flex-shrink: 0;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.03);
  cursor: default;
  user-select: none;
}
.coming-soon-icon {
  font-size: 15px;
  animation: wrench 2.5s ease-in-out infinite;
  display: inline-block;
}
@keyframes wrench {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-20deg); }
  40%       { transform: rotate(20deg); }
  60%       { transform: rotate(-10deg); }
  80%       { transform: rotate(0deg); }
}
