/**
 * OneTV Official Website - Main Styles
 * Vercel风格的现代化设计
 */

/* ==================== 全局样式重置 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #000;
  background: #fafafa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== 布局容器 ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 60px 0;
}

/* ==================== 头部导航 ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #eaeaea;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: #000;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(45deg, #0070f3, #00a8ff);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #000;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0070f3;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  background: #000;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-cta:hover {
  background: #333;
  transform: translateY(-1px);
}

/* ==================== 英雄区域 ==================== */
.hero {
  padding: 120px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(45deg, #000, #333);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  font-size: 16px;
}

.btn-primary {
  background: #000;
  color: white;
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: white;
  color: #000;
  border: 1px solid #eaeaea;
}

.btn-secondary:hover {
  border-color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hero-preview {
  margin-top: 60px;
  position: relative;
}

.preview-image {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid #eaeaea;
}

/* 轮播中的图片样式已合并到 .carousel-slide img 中 */

/* ==================== 功能特色 ==================== */
.features {
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.feature-card {
  text-align: center;
  padding: 40px 24px;
  border-radius: 12px;
  border: 1px solid #eaeaea;
  transition: all 0.3s ease;
  background: white;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-color: #ddd;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: linear-gradient(45deg, #0070f3, #00a8ff);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #000;
}

.feature-description {
  color: #666;
  line-height: 1.6;
}

/* ==================== 技术栈展示 ==================== */
.tech-stack {
  background: #fafafa;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.tech-item {
  text-align: center;
  padding: 24px;
  background: white;
  border-radius: 12px;
  border: 1px solid #eaeaea;
  transition: all 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.tech-logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.tech-name {
  font-weight: 600;
  color: #000;
  font-size: 14px;
}

/* ==================== 统计数据 ==================== */
.stats {
  background: #000;
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(45deg, #0070f3, #00a8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: #999;
  font-weight: 500;
}

/* ==================== 标题样式 ==================== */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  color: #000;
}

.section-subtitle {
  font-size: 1.125rem;
  color: #666;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== 页脚 ==================== */
.footer {
  background: #000;
  color: white;
  padding: 60px 0 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: white;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright {
  color: #666;
  font-size: 14px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-link:hover {
  background: #0070f3;
  transform: translateY(-2px);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .nav-menu {
    display: none;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* ==================== 实用工具类 ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-4 { gap: 16px; }
.gap-8 { gap: 32px; }

/* ==================== 轮播组件样式 ==================== */
.carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  padding: 0;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  height: 500px; /* 设置固定高度 */
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

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

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  opacity: 0.7;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}

.carousel-btn.prev {
  left: 20px;
}

.carousel-btn.next {
  right: 20px;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  position: relative;
  z-index: 3;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.indicator.active {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
  border-color: white;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

/* 移除标签按钮样式，因为不再需要分类切换 */

/* 移动端轮播适配 */
@media (max-width: 768px) {
  .carousel-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .carousel-wrapper {
    height: 300px;
  }
  
  .carousel-slide img {
    height: 100%;
  }
  
  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .carousel-btn.prev {
    left: 5px;
  }
  
  .carousel-btn.next {
    right: 5px;
  }
}

/* ==================== 固定飞机群图片 ==================== */
.airplane-group {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  left: auto !important;
  top: auto !important;
  width: 80px !important;
  height: 80px !important;
  z-index: 9999 !important;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  background: white;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 4px !important;
  float: none !important;
  clear: none !important;
}

.airplane-group:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 112, 243, 0.3);
}

.airplane-group img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.airplane-group::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #0070f3, #00a8ff, #52c41a, #fa541c);
  border-radius: 50%;
  z-index: -1;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.airplane-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(10px);
}

.airplane-group:hover .airplane-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.airplane-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 12px;
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .airplane-group {
    width: 60px !important;
    height: 60px !important;
    bottom: 15px !important;
    right: 15px !important;
    left: auto !important;
    top: auto !important;
  }
}

/* 强制右下角定位 - 最高优先级 */
body .airplane-group,
html .airplane-group,
.airplane-group {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  left: auto !important;
  top: auto !important;
  width: 80px !important;
  height: 80px !important;
  z-index: 99999 !important;
  margin: 0 !important;
  padding: 4px !important;
  border-radius: 8px !important;
  background: white !important;
  float: none !important;
  clear: none !important;
  transform: none !important;
}

@media (max-width: 768px) {
  body .airplane-group,
  html .airplane-group,
  .airplane-group {
    width: 60px !important;
    height: 60px !important;
    bottom: 15px !important;
    right: 15px !important;
  }
}
