/* ============================================
   广东龙眼数字科技 - 现代化样式
   纯CSS实现，无第三方依赖
   ============================================ */

/* ===== CSS变量 ===== */
:root {
  /* 主色调 */
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #7dd3fc;
  --secondary: #8b5cf6;
  --accent: #06b6d4;

  /* 中性色 */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;

  /* 语义色 */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

  /* 圆角 */
  --radius-sm: 0.375rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* 间距 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* 字体 */
  --font-sans: system-ui, -apple-system, sans-serif;
}

/* ===== 暗色主题 ===== */
[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-dark: #020617;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-light: #64748b;
  --border: #334155;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-main);
  transition: background-color 0.3s, color 0.3s;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

ul {
  list-style: none;
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s;
}

[data-theme="dark"] .navbar {
  background: rgba(15,23,42,0.9);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.navbar-nav {
  display: flex;
  gap: var(--spacing-sm);
}

.navbar-nav a {
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--primary);
  background: rgba(14,165,233,0.1);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* 主题切换按钮 */
.theme-toggle {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  background: var(--bg-main);
  transform: scale(1.1);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== Hero区域 ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--spacing-2xl) var(--spacing-md);
  margin-top: 70px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  opacity: 0.3;
  filter: blur(100px);
  animation: float 20s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  opacity: 0.2;
  filter: blur(100px);
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}

.hero-content {
  max-width: 900px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(14,165,233,0.1);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--spacing-md);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(14,165,233,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14,165,233,0.5);
}

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

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

/* ===== 特性卡片 ===== */
.features {
  padding: var(--spacing-2xl) var(--spacing-md);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--spacing-xl);
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.features-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid var(--border);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(139,92,246,0.1));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
  color: var(--primary);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== 产品展示区 ===== */
.products {
  padding: var(--spacing-2xl) var(--spacing-md);
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.products::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(14,165,233,0.1) 0%, transparent 50%);
}

.products .section-header h2 {
  color: white;
}

.products .section-header p {
  color: var(--text-light);
}

.product-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-lg);
  position: relative;
}

.product-card {
  background: rgba(30,41,59,0.8);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.product-card:hover {
  background: rgba(30,41,59,0.95);
  transform: translateY(-5px);
  border-color: rgba(14,165,233,0.5);
}

.product-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.product-card h3 svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.product-card p {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.product-tag {
  padding: 0.375rem 0.75rem;
  background: rgba(14,165,233,0.15);
  color: var(--primary-light);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
}

/* ===== 公司简介 ===== */
.about {
  padding: var(--spacing-2xl) var(--spacing-md);
}

.about-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.about-text h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.stat-item {
  text-align: center;
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.about-image {
  position: relative;
}

.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.about-image::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg);
  opacity: 0.2;
  z-index: -1;
  filter: blur(20px);
}

/* ===== 联系我们 ===== */
.contact {
  padding: var(--spacing-2xl) var(--spacing-md);
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-dark) 100%);
}

.contact-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(139,92,246,0.1));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 24px;
  height: 24px;
}

.contact-item-content {
  text-align: left;
  flex: 1;
}

.contact-item-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.contact-item-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ===== 页脚 ===== */
.footer {
  background: var(--bg-dark);
  padding: var(--spacing-xl) var(--spacing-md);
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

.footer-copyright {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-light);
}

.footer-copyright a {
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-copyright img {
  height: 20px;
  vertical-align: middle;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .navbar-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: var(--spacing-lg);
    gap: 0;
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .navbar-nav.active {
    transform: translateX(0);
  }

  .navbar-nav a {
    padding: var(--spacing-sm);
    border-radius: var(--radius);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .hero {
    padding: var(--spacing-xl) var(--spacing-sm);
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
  }

  .contact-item-content {
    text-align: center;
  }
}

/* ===== 页面特定样式 ===== */
.page-header {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  margin-top: 70px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,165,233,0.1) 0%, transparent 100%);
}

.page-header-content {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--spacing-sm);
}

.page-header p {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.content-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border);
}

.content-card h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: var(--spacing-md) 0 var(--spacing-sm);
}

.content-card p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.8;
}

.content-card ul {
  margin: var(--spacing-sm) 0 var(--spacing-md) var(--spacing-md);
}

.content-card li {
  position: relative;
  padding-left: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

.content-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

/* 产品详情页样式 */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-lg);
}

.product-detail-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--primary);
}

.product-detail-info p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}

/* 动画类 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 加载状态 */
.is-loading * {
  pointer-events: none;
}
