/* ============================================
   吃瓜网短视频热门合集与病毒传播追踪平台 - 全局样式
   Global Stylesheet - Cyberpunk Orange+Black Theme
   ============================================ */

/* === CSS变量定义 === */
:root {
  --primary: #FF5722;
  --secondary: #E64A19;
  --bg: #1A1A1A;
  --card-bg: #2C2C2C;
  --accent: #FF7043;
  --text: #FFFFFF;
  --text-muted: #B0B0B0;
  --border: #3D3D3D;
  --success: #4CAF50;
  --danger: #F44336;
  --font-heading: 'Oswald', 'Impact', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Roboto', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(255, 87, 34, 0.4);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1400px;
}

/* === 全局重置 === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* === 排版系统 === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* === 容器 === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

/* === 导航栏 === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 26, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand img {
  height: 40px;
  width: auto;
}

.navbar-brand span {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 700;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-menu a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  text-decoration: none;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--primary);
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 100%;
}

.navbar-search {
  position: relative;
}

.navbar-search input {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  color: var(--text);
  font-size: 0.85rem;
  width: 200px;
  transition: var(--transition);
}

.navbar-search input:focus {
  outline: none;
  border-color: var(--primary);
  width: 280px;
  box-shadow: var(--shadow-glow);
}

.navbar-search .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* === 跑马灯 === */
.live-ticker {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 999;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  padding: 0.4rem 0;
  overflow: hidden;
}

.ticker-content {
  display: flex;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}

.ticker-content span {
  padding: 0 3rem;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === 英雄区域/轮播 === */
.hero-section {
  position: relative;
  height: 85vh;
  min-height: 500px;
  margin-top: 90px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.95), rgba(26, 26, 26, 0.3));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.hero-counter {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: var(--primary);
  color: var(--text);
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  animation: pulse-glow 2s infinite;
}

.hero-btn:hover {
  background: var(--secondary);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
  color: var(--text);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 87, 34, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 87, 34, 0.8); }
}

/* === 视频卡片 === */
.video-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.video-card:hover {
  transform: scale(1.03);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

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

.video-card-thumb.landscape {
  aspect-ratio: 16/9;
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.platform-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(26, 26, 26, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 2;
}

.viral-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--danger);
  border-radius: 4px;
  font-size: 0.65rem;
  color: var(--text);
  font-weight: 700;
  animation: pulse-glow 1.5s infinite;
}

.video-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  opacity: 0;
  transition: var(--transition);
}

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

.video-card-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.video-card-stats span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.video-card-body {
  padding: 1rem;
}

.video-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === 瀑布流布局 === */
.waterfall-grid {
  columns: 4;
  column-gap: 1.2rem;
  padding: 2rem 0;
}

.waterfall-grid .video-card {
  break-inside: avoid;
  margin-bottom: 1.2rem;
}

/* === 排行榜 === */
.leaderboard {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.leaderboard-header {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.leaderboard-header h3 {
  font-size: 1.1rem;
  color: var(--text);
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.leaderboard-item:hover {
  background: rgba(255, 87, 34, 0.1);
}

.leaderboard-rank {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 2rem;
  text-align: center;
}

.leaderboard-rank.gold { color: #FFD700; }
.leaderboard-rank.silver { color: #C0C0C0; }
.leaderboard-rank.bronze { color: #CD7F32; }

.leaderboard-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.leaderboard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-title {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-score {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 700;
}

/* === 病毒指数仪表盘 === */
.viral-gauge {
  position: relative;
  width: 200px;
  height: 120px;
  margin: 0 auto;
}

.gauge-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 12;
}

.gauge-fill {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s ease;
}

.gauge-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  fill: var(--primary);
}

/* === 传播路径图 === */
.spread-graph {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.spread-graph::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 87, 34, 0.05), transparent 70%);
  pointer-events: none;
}

/* === 标签云 === */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  padding: 2rem;
}

.tag-item {
  padding: 0.4rem 1rem;
  background: rgba(255, 87, 34, 0.1);
  border: 1px solid rgba(255, 87, 34, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent);
  transition: var(--transition);
  cursor: pointer;
}

.tag-item:hover {
  background: var(--primary);
  color: var(--text);
  transform: scale(1.1);
}

.tag-item.hot {
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(255, 87, 34, 0.2);
}

.tag-item.super-hot {
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--primary);
  color: var(--text);
  animation: pulse-glow 2s infinite;
}

/* === 评论卡片 === */
.comment-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  min-width: 300px;
  flex-shrink: 0;
  transition: var(--transition);
}

.comment-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.comment-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.comment-likes {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

/* === 横向滚动容器 === */
.scroll-container {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--card-bg);
}

.scroll-container::-webkit-scrollbar {
  height: 6px;
}

.scroll-container::-webkit-scrollbar-track {
  background: var(--card-bg);
  border-radius: 3px;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

/* === 按钮系统 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--secondary);
  box-shadow: var(--shadow-glow);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--text);
}

.btn-ghost {
  background: rgba(255, 87, 34, 0.1);
  color: var(--accent);
}

.btn-ghost:hover {
  background: rgba(255, 87, 34, 0.2);
}

/* === 页脚 === */
.footer {
  background: #111111;
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.3rem 0;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-disclaimer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-disclaimer strong {
  color: var(--primary);
}

/* === Cookie横幅 === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transform: translateY(100%);
  transition: var(--transition);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* === 骨架屏 === */
.skeleton {
  background: linear-gradient(90deg, var(--card-bg) 25%, #3a3a3a 50%, var(--card-bg) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius);
}

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

/* === 面包屑 === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .separator {
  color: var(--border);
}

/* === 筛选器 === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  padding: 0.4rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text);
}

/* === 搜索页 === */
.search-hero {
  text-align: center;
  padding: 6rem 0 3rem;
}

.search-input-lg {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-input-lg input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 30px;
  color: var(--text);
  font-size: 1.1rem;
  transition: var(--transition);
}

.search-input-lg input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* === 响应式设计 === */
@media (max-width: 1200px) {
  .waterfall-grid {
    columns: 3;
  }
}

@media (max-width: 992px) {
  .waterfall-grid {
    columns: 2;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .navbar-menu {
    display: none;
  }
  
  .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero-section {
    height: 60vh;
    margin-top: 80px;
  }
  
  .hero-overlay {
    padding: 2rem;
  }
  
  .hero-counter {
    font-size: 1.5rem;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .waterfall-grid {
    columns: 1;
  }
  
  .hero-section {
    height: 50vh;
  }
  
  .hero-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}

/* === 工具类 === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.hidden { display: none; }
.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;
}
