/* ========================================
   AI硬件展 - Makeshift风格设计
   米色背景 + 红蓝色块 + 斜切卡片
   ======================================== */

:root {
  --bg-cream: #f5ebe0;
  --bg-white: #ffffff;
  --text-dark: #1a1a2e;
  --text-blue: #2541b2;
  --text-muted: #666;
  --accent-red: #e63946;
  --accent-blue: #2541b2;
  --accent-coral: #ff6b6b;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.6;
}

/* ========================================
   Header - 阿里云通义智能硬件展
   ======================================== */

/* 品牌合作栏 - Hero下方 */
.header-brand-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  border-bottom: 1px solid #eee;
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.aliyun-text {
  background: linear-gradient(135deg, #FF6A00 0%, #FF8C00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.waytoagi-text {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-divider {
  width: 2px;
  height: 18px;
  background: linear-gradient(180deg, #ddd 0%, #bbb 100%);
  border-radius: 1px;
}

.brand-label {
  font-size: 0.9rem;
  color: #888;
  margin-left: 0.3rem;
  font-weight: 500;
}

/* 更新提示条 */
.update-hint-bar {
  text-align: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.12) 50%, rgba(99, 102, 241, 0.08) 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.update-hint-text {
  color: #6366f1;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* Hero区域 - 动态渐变背景 */
.header-hero {
  background: linear-gradient(-45deg, #6366f1, #8b5cf6, #a78bfa, #7c3aed, #6366f1);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  padding: 3.5rem 2rem 3rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

/* 背景渐变动画 */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 背景光晕效果 */
.header-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(251, 191, 36, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 40%);
  animation: floatGlow 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

.header-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.header-badge {
  display: inline-block;
  padding: 0.5rem 1.8rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.2em;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4), 0 0 40px rgba(251, 191, 36, 0.2);
  animation: badgeGlow 3s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4), 0 0 40px rgba(251, 191, 36, 0.2); }
  50% { box-shadow: 0 4px 25px rgba(249, 115, 22, 0.5), 0 0 60px rgba(251, 191, 36, 0.3); }
}

.header-main-title {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-sub-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
  opacity: 0.95;
}

/* 按钮容器 - 横向排列 */
.header-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.header-slogan {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.8rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  position: relative;
}

.header-slogan::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent, rgba(255,255,255,0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.header-slogan:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
}

.header-slogan:hover::after {
  opacity: 1;
}

.header-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  border-radius: 50px;
  box-shadow: 0 4px 25px rgba(249, 115, 22, 0.5), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.header-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.header-stats:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(249, 115, 22, 0.6);
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.95;
}

/* 装饰元素 */
.header-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.deco-shape {
  position: absolute;
  opacity: 0.15;
}

/* 左侧大圆 - 脉冲动画 */
.deco-circle-left {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, rgba(249, 115, 22, 0.1) 40%, transparent 70%);
  border-radius: 50%;
  top: -80px;
  left: -100px;
  opacity: 0.8;
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 0.6; }
}

/* 右侧圆圈组 - 旋转动画 */
.deco-circle-right {
  width: 180px;
  height: 180px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  bottom: -40px;
  right: 3%;
  opacity: 0.6;
  animation: rotateRing 30s linear infinite;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.deco-circle-right::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: rotateRing 20s linear infinite reverse;
}

/* 三角形 - 浮动动画 */
.deco-triangle {
  width: 0;
  height: 0;
  border-left: 45px solid transparent;
  border-right: 45px solid transparent;
  border-bottom: 75px solid rgba(251, 191, 36, 0.6);
  top: 10%;
  right: 10%;
  transform: rotate(15deg);
  opacity: 0.3;
  animation: floatUp 6s ease-in-out infinite;
  filter: blur(1px);
}

@keyframes floatUp {
  0%, 100% { transform: rotate(15deg) translateY(0); }
  50% { transform: rotate(18deg) translateY(-15px); }
}

/* 六边形 - 呼吸动画 */
.deco-hexagon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.5) 0%, rgba(96, 165, 250, 0.3) 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  top: 35%;
  right: 5%;
  opacity: 0.25;
  animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.25; }
  50% { transform: scale(1.15) rotate(10deg); opacity: 0.35; }
}

/* ========================================
   品类导航栏
   ======================================== */
.zone-nav {
  background: var(--bg-white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--text-dark);
}

.zone-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.zone-nav-inner::-webkit-scrollbar {
  display: none;
}

.zone-nav-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 2px solid var(--text-dark);
  background: var(--bg-white);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.zone-nav-btn:hover {
  background: var(--accent-blue);
  color: var(--bg-white);
}

.zone-nav-btn.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
}

/* ========================================
   搜索栏
   ======================================== */
.search-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 0 1rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.8rem 3rem 0.8rem 1rem;
  border: 2px solid var(--text-dark);
  font-size: 1rem;
  background: var(--bg-white);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--accent-blue);
}

.search-clear {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}

.search-clear.visible {
  opacity: 1;
}

/* ========================================
   主内容区
   ======================================== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

/* ========================================
   品类区块 - 斜切色块设计
   ======================================== */
.zone-section {
  margin-bottom: 4rem;
  position: relative;
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--accent-blue);
  color: white;
  transform: skewX(-3deg);
}

.zone-header > * {
  transform: skewX(3deg);
}

/* 交替颜色 */
.zone-section:nth-child(even) .zone-header {
  background: var(--accent-red);
}

.zone-section:nth-child(3n) .zone-header {
  background: var(--text-dark);
}

.zone-title {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.zone-count {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.8;
}

/* ========================================
   品牌卡片网格
   ======================================== */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.search-results-grid {
  margin: 0 !important;
}

/* ========================================
   品牌卡片 - 斜切悬浮效果
   ======================================== */
.brand-card {
  background: var(--bg-white);
  border: 2px solid var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.brand-card::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: -6px;
  bottom: -6px;
  background: var(--accent-blue);
  z-index: -1;
  transition: var(--transition);
}

.brand-card:nth-child(even)::before {
  background: var(--accent-red);
}

.brand-card:nth-child(3n)::before {
  background: var(--accent-coral);
}

.brand-card:hover {
  transform: translate(-4px, -4px);
}

.brand-card:hover::before {
  top: 10px;
  left: 10px;
}

.brand-card-inner {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
}

.brand-logo-wrap {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-cream);
  border: 1px solid #ddd;
}

.brand-logo {
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
}

.brand-logo-placeholder {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-blue);
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
}

.brand-card:nth-child(even) .brand-logo-placeholder {
  background: var(--accent-red);
}

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

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

.brand-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   搜索结果
   ======================================== */
.search-results-info {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.no-results-text {
  font-size: 1.1rem;
}

/* ========================================
   模态框
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 200;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg-white);
  border: 3px solid var(--text-dark);
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 201;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 2px solid var(--text-dark);
  background: var(--bg-white);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1;
}

.modal-close:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
}

.modal-body {
  padding: 2rem;
}

.modal-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--bg-cream);
}

.modal-logo-wrap {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-cream);
  border: 2px solid var(--text-dark);
}

.modal-brand-logo {
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
}

.modal-title-wrap {
  flex: 1;
}

.modal-brand-name {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

.modal-brand-category {
  color: var(--accent-blue);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-brand-description {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* 产品图片画廊 */
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.modal-gallery-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 2px solid var(--bg-cream);
}

.modal-gallery-item.modal-screenshot {
  grid-column: 1 / -1;
  aspect-ratio: 16/10;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  cursor: zoom-in;
}

.modal-gallery-item:hover .modal-image {
  transform: scale(1.05);
}

.modal-gallery-item.img-error {
  display: none;
}

/* 暂无图片提示 */
.modal-no-images {
  background: var(--bg-cream);
  border: 2px dashed #ccc;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.no-images-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.preview-link {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: var(--bg-white);
  color: var(--accent-blue);
  text-decoration: none;
  border: 2px solid var(--accent-blue);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.preview-link:hover {
  background: var(--accent-blue);
  color: white;
}

.modal-footer {
  padding-top: 1rem;
  border-top: 2px solid var(--bg-cream);
}

.modal-website-link {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--accent-blue);
  color: white;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid var(--accent-blue);
  transition: var(--transition);
}

.modal-website-link:hover {
  background: var(--accent-coral);
  border-color: var(--accent-coral);
}

/* ========================================
   返回顶部按钮
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border: 2px solid var(--text-dark);
  background: var(--accent-red);
  color: white;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-blue);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

/* ========================================
   Lightbox 图片放大
   ======================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  cursor: zoom-out;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  cursor: default;
}

.lightbox.active .lightbox-image {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
  .header-brand-bar {
    gap: 0.8rem;
    padding: 0.6rem 1rem;
  }

  .brand-text {
    font-size: 0.95rem;
  }

  .brand-label {
    font-size: 0.75rem;
  }

  .header-hero {
    padding: 2rem 1rem 1.5rem;
  }

  .header-main-title {
    font-size: 2rem;
  }

  .header-sub-title {
    font-size: 1.5rem;
  }

  .header-slogan {
    font-size: 0.95rem;
    padding: 0.5rem 1.5rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .deco-shape {
    display: none;
  }

  .zone-title {
    font-size: 1.2rem;
  }

  .brand-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .brand-card-inner {
    padding: 1rem;
  }

  .modal {
    width: 95%;
    max-height: 90vh;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .modal-brand-name {
    font-size: 1.4rem;
  }

  .modal-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .brand-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

/* ========================================
   波浪线装饰
   ======================================== */
.wave-divider {
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 20'%3E%3Cpath d='M0,10 Q30,0 60,10 T120,10 T180,10 T240,10 T300,10 T360,10 T420,10 T480,10 T540,10 T600,10 T660,10 T720,10 T780,10 T840,10 T900,10 T960,10 T1020,10 T1080,10 T1140,10 T1200,10' stroke='%23ddd' fill='none' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  margin: 2rem 0;
}
