/* 午夜影视 - 完整样式表 */

/* ========== CSS 变量 ========== */
:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #f0c040;
  --accent-hover: #e0b030;
  --bg-light: #ffffff;
  --bg-section: #f5f5f5;
  --bg-dark: #121212;
  --bg-dark-section: #1e1e1e;
  --text-light: #333333;
  --text-dark: #dddddd;
  --text-muted: #888888;
  --shadow: 0 2px 10px rgba(0,0,0,0.05);
  --shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(255,255,255,0.15);
  --glass-border: rgba(255,255,255,0.2);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background: var(--bg-light);
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

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

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

a:hover {
  opacity: 0.85;
}

/* ========== 头部导航 ========== */
#header {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 10px 20px !important;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  transition: box-shadow 0.3s ease, background 0.4s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  background: rgba(26, 26, 46, 0.95) !important;
}

#header a[href="/"] {
  color: var(--accent) !important;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 2px;
}

#header a[href="/"]:hover {
  transform: scale(1.02);
  text-shadow: 0 0 20px rgba(240, 192, 64, 0.3);
}

#header nav {
  margin-left: 30px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

#header nav a {
  color: #fff !important;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 4px;
  transition: var(--transition);
  position: relative;
}

#header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
  transform: translateX(-50%);
}

#header nav a:hover::after {
  width: 80%;
}

#header nav a:hover {
  background: rgba(240, 192, 64, 0.15);
  color: var(--accent) !important;
}

#searchInput {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  width: 200px;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

#searchInput:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 15px rgba(240, 192, 64, 0.2);
  width: 240px;
}

#searchInput::placeholder {
  color: rgba(255,255,255,0.5);
}

#header button {
  padding: 8px 16px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

#header button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(240, 192, 64, 0.4);
}

#header button:active {
  transform: translateY(0);
}

#darkModeBtn {
  font-size: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  padding: 0 !important;
}

/* ========== Hero Banner ========== */
section[style*="linear-gradient"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
  color: #fff;
  text-align: center;
  padding: 100px 20px 80px;
  position: relative;
  overflow: hidden;
}

section[style*="linear-gradient"]::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(240, 192, 64, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(240, 192, 64, 0.05) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-20px, 20px) rotate(5deg); }
}

section[style*="linear-gradient"] h1 {
  font-size: 48px;
  margin: 0 0 20px;
  color: var(--accent);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
  text-shadow: 0 2px 20px rgba(240, 192, 64, 0.2);
}

section[style*="linear-gradient"] p {
  font-size: 20px;
  max-width: 800px;
  margin: 0 auto 30px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  line-height: 1.8;
}

section[style*="linear-gradient"] a {
  display: inline-block;
  padding: 14px 40px;
  background: var(--accent);
  color: var(--primary);
  text-decoration: none;
  border-radius: 30px;
  font-size: 18px;
  font-weight: bold;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(240, 192, 64, 0.3);
}

section[style*="linear-gradient"] a:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(240, 192, 64, 0.5);
  background: #fff;
  color: var(--primary);
}

/* ========== 通用 Section 样式 ========== */
section {
  padding: 80px 20px;
  transition: background 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: sectionFadeIn 0.6s ease-out forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }

@keyframes sectionFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section > div {
  max-width: 1200px;
  margin: 0 auto;
}

section h2 {
  text-align: center;
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 50px;
  position: relative;
  transition: color 0.4s ease;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 15px auto 0;
  border-radius: 2px;
}

section h3 {
  transition: color 0.4s ease;
}

/* ========== 品牌介绍 ========== */
#about {
  background: var(--bg-light);
}

#about > div > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

#about h3 {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 15px;
}

#about p {
  line-height: 1.8;
  color: var(--text-light);
  transition: color 0.4s ease;
}

/* ========== 主营产品 ========== */
#products {
  background: var(--bg-section);
}

#products > div > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

#products > div > div:first-of-type > div {
  background: var(--bg-light);
  padding: 35px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

#products > div > div:first-of-type > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #e0b030, var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

#products > div > div:first-of-type > div:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

#products > div > div:first-of-type > div:hover::before {
  transform: scaleX(1);
}

#products > div > div:first-of-type h3 {
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 15px;
}

#products > div > div:first-of-type p {
  line-height: 1.8;
  color: #555;
  transition: color 0.4s ease;
}

/* 产品优势 */
#products h3[style*="margin-top"] {
  color: var(--primary);
  font-size: 22px;
  margin-top: 50px;
  text-align: center;
}

#products > div > div:last-of-type {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-top: 30px;
}

#products > div > div:last-of-type > div {
  background: var(--bg-light);
  padding: 25px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid transparent;
}

#products > div > div:last-of-type > div:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

#products > div > div:last-of-type h4 {
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 10px;
}

#products > div > div:last-of-type p {
  color: #555;
  font-size: 14px;
  transition: color 0.4s ease;
}

/* ========== 解决方案 ========== */
#solutions {
  background: var(--bg-light);
}

#solutions > div > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

#solutions > div > div:first-of-type > div {
  background: var(--bg-section);
  padding: 30px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

#solutions > div > div:first-of-type > div:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

#solutions > div > div:first-of-type > div::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(240, 192, 64, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

#solutions h3 {
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 15px;
}

#solutions p {
  line-height: 1.8;
  color: #555;
  transition: color 0.4s ease;
}

/* 行业应用 */
#solutions > div > div:last-of-type {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

#solutions > div > div:last-of-type > div {
  background: var(--bg-section);
  padding: 25px;
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

#solutions > div > div:last-of-type > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background: var(--accent);
  color: var(--primary);
}

#solutions > div > div:last-of-type > div:hover h4,
#solutions > div > div:last-of-type > div:hover p {
  color: var(--primary);
}

#solutions > div > div:last-of-type h4 {
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

#solutions > div > div:last-of-type p {
  color: #555;
  font-size: 14px;
  transition: color 0.3s ease;
}

/* ========== 客户案例 ========== */
#cases {
  background: var(--bg-section);
}

#cases > div > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

#cases > div > div:first-of-type > div {
  background: var(--bg-light);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

#cases > div > div:first-of-type > div:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

#cases > div > div:first-of-type > div::before {
  content: '"';
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 60px;
  color: rgba(240, 192, 64, 0.15);
  font-family: Georgia, serif;
  line-height: 1;
}

#cases h3 {
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 15px;
}

#cases p {
  line-height: 1.8;
  color: #555;
  transition: color 0.4s ease;
}

/* 客户评价 */
#cases > div > div:last-of-type {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 30px;
}

#cases > div > div:last-of-type > div {
  background: var(--bg-light);
  padding: 25px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

#cases > div > div:last-of-type > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

#cases > div > div:last-of-type > div p:first-child {
  font-style: italic;
  color: #555;
  margin-bottom: 15px;
  position: relative;
  padding-left: 20px;
}

#cases > div > div:last-of-type > div p:first-child::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -5px;
  font-size: 24px;
  color: var(--accent);
  font-family: Georgia, serif;
}

#cases > div > div:last-of-type > div p:last-child {
  color: var(--primary);
  font-weight: bold;
  font-size: 14px;
}

/* ========== 新闻中心 ========== */
#articles {
  background: var(--bg-light);
}

#articles > div > div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

#articles article {
  background: var(--bg-section);
  padding: 25px;
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

#articles article h3 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

#articles article:hover h3 {
  color: var(--accent);
}

#articles article p:first-of-type {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

#articles article p:nth-of-type(2) {
  line-height: 1.8;
  color: #555;
  margin-bottom: 15px;
  transition: color 0.4s ease;
}

#articles article a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#articles article a:hover {
  gap: 10px;
  opacity: 0.9;
}

/* ========== 常见问题 ========== */
#faq {
  background: var(--bg-section);
}

#faq > div > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

#faq > div > div > div {
  background: var(--bg-light);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

#faq > div > div > div:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-left: 3px solid var(--accent);
}

#faq h3 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#faq h3::before {
  content: 'Q';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

#faq p {
  line-height: 1.8;
  color: #555;
  padding-left: 32px;
  transition: color 0.4s ease;
}

/* ========== HowTo Section ========== */
#howto {
  background: var(--bg-light);
}

#howto > div > div {
  background: var(--bg-section);
  padding: 35px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

#howto > div > div::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(240, 192, 64, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

#howto h3 {
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 15px;
  margin-top: 25px;
}

#howto h3:first-child {
  margin-top: 0;
}

#howto p {
  line-height: 1.8;
  color: #555;
  transition: color 0.4s ease;
}

#howto ol, #howto ul {
  line-height: 1.8;
  color: #555;
  padding-left: 25px;
  transition: color 0.4s ease;
}

#howto ol li, #howto ul li {
  margin-bottom: 8px;
  position: relative;
}

#howto ol li::marker {
  color: var(--accent);
  font-weight: bold;
}

#howto ul li::marker {
  color: var(--accent);
}

/* ========== 联系我们 ========== */
#contact {
  background: var(--primary) !important;
  color: #fff;
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 70% 30%, rgba(240, 192, 64, 0.05) 0%, transparent 50%);
  animation: contactGlow 10s ease-in-out infinite alternate;
}

@keyframes contactGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(30px, -30px) rotate(3deg); }
}

#contact h2 {
  color: var(--accent);
  position: relative;
  z-index: 1;
}

#contact h2::after {
  background: var(--accent);
}

#contact > div > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
  z-index: 1;
}

#contact h3 {
  color: var(--accent);
  font-size: 20px;
  margin-bottom: 20px;
}

#contact p {
  line-height: 1.8;
  transition: color 0.4s ease;
}

#contact > div > div:last-of-type {
  text-align: center;
  margin-top: 50px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  position: relative;
  z-index: 1;
}

#contact > div > div:last-of-type p {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  line-height: 1.8;
}

/* ========== 返回顶部 ========== */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--accent);
  color: var(--primary);
  padding: 14px 18px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 20px;
  display: none;
  z-index: 999;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(240, 192, 64, 0.3);
  border: none;
  cursor: pointer;
}

#backToTop:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 25px rgba(240, 192, 64, 0.5);
  background: #fff;
  color: var(--primary);
}

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

/* ========== 暗色模式 ========== */
body.dark-mode {
  background: var(--bg-dark);
  color: var(--text-dark);
}

body.dark-mode section {
  background: var(--bg-dark) !important;
}

body.dark-mode #about,
body.dark-mode #solutions,
body.dark-mode #articles,
body.dark-mode #howto {
  background: var(--bg-dark) !important;
}

body.dark-mode #products,
body.dark-mode #cases,
body.dark-mode #faq {
  background: var(--bg-dark-section) !important;
}

body.dark-mode #products > div > div:first-of-type > div,
body.dark-mode #products > div > div:last-of-type > div,
body.dark-mode #cases > div > div:first-of-type > div,
body.dark-mode #cases > div > div:last-of-type > div,
body.dark-mode #faq > div > div > div,
body.dark-mode #articles article,
body.dark-mode #howto > div > div,
body.dark-mode #solutions > div > div:first-of-type > div,
body.dark-mode #solutions > div > div:last-of-type > div {
  background: #2a2a3e !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark-mode #about p,
body.dark-mode #products p,
body.dark-mode #solutions p,
body.dark-mode #cases p,
body.dark-mode #articles article p:nth-of-type(2),
body.dark-mode #faq p,
body.dark-mode #howto p,
body.dark-mode #howto ol,
body.dark-mode #howto ul {
  color: #ccc;
}

body.dark-mode #products > div > div:last-of-type p,
body.dark-mode #solutions > div > div:last-of-type p {
  color: #bbb;
}

body.dark-mode #about h3,
body.dark-mode #products h3,
body.dark-mode #solutions h3,
body.dark-mode #cases h3,
body.dark-mode #articles article h3,
body.dark-mode #faq h3,
body.dark-mode #howto h3 {
  color: #eee;
}

body.dark-mode section h2 {
  color: #eee;
}

body.dark-mode #cases > div > div:last-of-type > div p:last-child {
  color: #eee;
}

body.dark-mode #articles article p:first-of-type {
  color: #999;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
  #products > div > div:first-of-type {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #products > div > div:last-of-type {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #solutions > div > div:last-of-type {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  #header {
    flex-direction: column;
    gap: 10px;
    padding: 10px 15px !important;
  }
  
  #header > div:first-child {
    width: 100%;
    justify-content: space-between;
  }
  
  #header nav {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    gap: 8px;
  }
  
  #header nav a {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  #header > div:last-child {
    width: 100%;
    justify-content: center;
  }
  
  #searchInput {
    width: 150px;
  }
  
  #searchInput:focus {
    width: 180px;
  }
  
  section {
    padding: 50px 15px;
  }
  
  section[style*="linear-gradient"] {
    padding: 60px 15px 50px;
  }
  
  section[style*="linear-gradient"] h1 {
    font-size: 32px;
  }
  
  section[style*="linear-gradient"] p {
    font-size: 16px;
  }
  
  section h2 {
    font-size: 26px;
    margin-bottom: 35px;
  }
  
  #about > div > div {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  #products > div > div:first-of-type {
    grid-template-columns: 1fr;
  }
  
  #products > div > div:last-of-type {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #solutions > div > div:first-of-type {
    grid-template-columns: 1fr;
  }
  
  #solutions > div > div:last-of-type {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #cases > div > div:first-of-type {
    grid-template-columns: 1fr;
  }
  
  #cases > div > div:last-of-type {
    grid-template-columns: 1fr;
  }
  
  #articles > div > div {
    grid-template-columns: 1fr;
  }
  
  #faq > div > div {
    grid-template-columns: 1fr;
  }
  
  #contact > div > div:first-of-type {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  #howto > div > div {
    padding: 25px;
  }
  
  #backToTop {
    bottom: 20px;
    right: 20px;
    padding: 12px 15px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  #header nav {
    gap: 5px;
  }
  
  #header nav a {
    font-size: 11px;
    padding: 3px 6px;
  }
  
  #searchInput {
    width: 120px;
    font-size: 12px;
  }
  
  #searchInput:focus {
    width: 140px;
  }
  
  section[style*="linear-gradient"] h1 {
    font-size: 26px;
  }
  
  section[style*="linear-gradient"] p {
    font-size: 14px;
  }
  
  section[style*="linear-gradient"] a {
    padding: 12px 30px;
    font-size: 16px;
  }
  
  section h2 {
    font-size: 22px;
  }
  
  #products > div > div:last-of-type {
    grid-template-columns: 1fr;
  }
  
  #solutions > div > div:last-of-type {
    grid-template-columns: 1fr;
  }
  
  #about h3,
  #products h3,
  #solutions h3,
  #cases h3,
  #faq h3,
  #howto h3 {
    font-size: 18px;
  }
  
  #contact h3 {
    font-size: 18px;
  }
  
  #contact > div > div:last-of-type p {
    font-size: 12px;
  }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* ========== 选中文本 ========== */
::selection {
  background: var(--accent);
  color: var(--primary);
}

/* ========== 打印样式 ========== */
@media print {
  #header,
  #backToTop,
  #contact > div > div:last-of-type {
    display: none !important;
  }
  
  section {
    page-break-inside: avoid;
    opacity: 1 !important;
    transform: none !important;
  }
}