/* 主题色与字体 */
:root {
  --red: #e63131;
  --blue: #2a8cf0;
  --dark: #1a1a1a;
  --gray: #6b7280;
  --bg: #0c0f14;
  --card: #12161d;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { 
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #e5e7eb; background: var(--bg); line-height: 1.6;
}

.container { width: 92%; max-width: 1100px; margin: 0 auto; }

/* 头部 */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(12,15,20,0.8); backdrop-filter: blur(8px); border-bottom: 1px solid #1f2937; transition: all 0.3s ease; }
.site-header.scrolled { background: rgba(12,15,20,0.95); border-bottom-color: #2d3748; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.logo { font-weight: 700; letter-spacing: .5px; color: #fff; font-size: 18px; }

/* 统一菜单按钮类名 */
.nav-toggle, .menu-toggle { display: none; background: transparent; border: 1px solid #334155; color: #fff; padding: 8px 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.nav-toggle:hover, .menu-toggle:hover { background: rgba(255,255,255,0.1); }
.nav-toggle.active, .menu-toggle.active { background: #0b1220; }

.nav-list, .nav-links { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.nav-list a, .nav-links a { color: #cbd5e1; text-decoration: none; padding: 8px 12px; border-radius: 6px; transition: all 0.2s; display: inline-block; min-width: 60px; text-align: center; }
.nav-list a:hover, .nav-links a:hover { background: #0b1220; color: #fff; transform: translateY(-1px); }

@media (max-width: 992px) {
  .logo { font-size: 16px; }
  .nav-list, .nav-links { gap: 10px; }
  .nav-list a, .nav-links a { padding: 6px 8px; }
}

@media (max-width: 820px) {
  .nav-toggle, .menu-toggle { display: inline-flex; }
  .nav-list, .nav-links { 
    display: none; 
    position: fixed; 
    right: 4%; 
    top: 70px; 
    flex-direction: column; 
    background: #0b1220; 
    padding: 16px; 
    border: 1px solid #1f2937; 
    border-radius: 8px; 
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 49; 
    width: 92%;
    max-width: 300px;
  }
  .nav-list.open, .nav-links.active { display: flex; }
  .nav-list a, .nav-links a { 
    padding: 12px 16px; 
    margin-bottom: 4px; 
    width: 100%; 
    text-align: left;
  }
  .nav-list a:last-child, .nav-links a:last-child { margin-bottom: 0; }
}

@media (max-width: 560px) {
  .site-header { padding: 8px 0; }
  .logo { font-size: 14px; }
  .nav-list, .nav-links { top: 60px; }
}

/* 英雄区 */
.hero { position: relative; overflow: hidden; min-height: 60vh; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; 
  background: radial-gradient(1200px 600px at 20% 20%, rgba(230,49,49,0.25), transparent), 
              radial-gradient(1000px 500px at 80% 30%, rgba(42,140,240,0.25), transparent);
  background-size: 150% 150%;
  background-position: center;
  animation: subtleBgMove 30s ease-in-out infinite alternate;
}

@keyframes subtleBgMove {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

.hero-content { position: relative; padding: 60px 0; text-align: center; max-width: 900px; margin: 0 auto; }
.hero h1 { 
  font-size: clamp(2rem, 5vw, 3.5rem); 
  margin: 0 0 16px; 
  line-height: 1.2;
  background: linear-gradient(90deg, #fff, #cbd5e1, #fff);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: textGradient 15s ease infinite;
}

@keyframes textGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero .subtitle { 
  color: #cbd5e1; 
  margin: 0 auto 32px; 
  max-width: 800px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.cta { 
  display: flex; 
  gap: 16px; 
  justify-content: center; 
  flex-wrap: wrap; 
  margin-top: 24px;
  margin-bottom: 32px;
}

.btn { 
  display: inline-block; 
  padding: 12px 20px; 
  border-radius: 10px; 
  border: 1px solid #334155; 
  color: #cbd5e1; 
  text-decoration: none; 
  transition: all .3s ease; 
  font-weight: 500;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
}

.btn:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.3);
}

.btn:active { transform: translateY(-1px); }

.btn.primary { 
  background: linear-gradient(90deg, var(--red), #b833d1, var(--blue)); 
  border-color: transparent; 
  color: #fff; 
  background-size: 200% auto;
  animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn.ghost { background: transparent; }

.btn.small { 
  padding: 8px 16px; 
  font-size: 14px;
  min-width: auto;
}

.license-hint { 
  margin-top: 32px; 
  color: #94a3b8; 
  font-size: 14px; 
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tag { 
  display: inline-block; 
  background: #0b1220; 
  color: #8ab4ff; 
  border: 1px solid #22314a; 
  padding: 4px 12px; 
  border-radius: 999px; 
  font-size: 12px; 
  margin-right: 8px;
}

/* 响应式英雄区调整 */
@media (max-width: 992px) {
  .hero-content { padding: 50px 0; }
  .cta { gap: 12px; }
}

@media (max-width: 768px) {
  .hero { min-height: 50vh; }
  .hero-content { padding: 40px 0; }
  .cta { 
    flex-direction: column; 
    align-items: center; 
    gap: 10px;
  }
  .btn { 
    width: 240px; 
    padding: 14px 20px; /* 增大点击区域 */
  }
  .hero .subtitle { margin-bottom: 24px; }
}

@media (max-width: 480px) {
  .hero { min-height: 45vh; }
  .hero-content { padding: 30px 0; }
  .btn { 
    width: 200px; 
    padding: 12px 16px;
    font-size: 14px;
  }
  .license-hint { 
    font-size: 12px;
    margin-top: 24px;
  }
  .tag { 
    margin-right: 0;
    margin-bottom: 8px;
  }
}

/* 通用区块 */
.section { padding: 50px 0; }
.section.alt { background: #0b1220; }
.section h2 { margin: 0 0 12px; font-size: 24px; }
.section-desc { color: #94a3b8; margin-bottom: 18px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid #1f2937; border-radius: 12px; padding: 14px; }
.card h3 { margin: 0 0 8px; font-size: 18px; color: #fff; }
.card p { margin: 0 0 10px; color: #cbd5e1; }
.card .meta { display: flex; justify-content: space-between; align-items: center; }

.list { margin: 0; padding-left: 18px; }
.list li { margin: 8px 0; }
.list .lic { color: #8ab4ff; }

/* 联系我们 */
.contact .form { 
  background: var(--card); 
  border: 1px solid #1f2937; 
  border-radius: 12px; 
  padding: 24px; 
  max-width: 100%;
  transition: all 0.3s ease;
}

.contact .form:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.form-row { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 20px; 
  margin-bottom: 20px; 
}

@media (max-width: 740px) { 
  .form-row { grid-template-columns: 1fr; }
}

label { 
  display: flex; 
  flex-direction: column; 
  color: #cbd5e1; 
  font-weight: 500;
}

input, select, textarea { 
  margin-top: 8px; 
  padding: 14px 16px;
  border-radius: 8px; 
  border: 1px solid #334155; 
  background: #0b1220; 
  color: #fff; 
  font-size: 16px; /* 确保移动设备上显示正常大小的文本 */
  min-height: 52px; /* 增大触控区域 */
  transition: all 0.3s ease;
  box-sizing: border-box;
}

input:focus, select:focus, textarea:focus { 
  outline: none;
  border-color: #2a8cf0;
  box-shadow: 0 0 0 3px rgba(42, 140, 240, 0.2);
  transform: translateY(-1px);
}

/* 为移动设备优化的输入元素 */
@media (max-width: 480px) {
  input, select, textarea {
    min-height: 56px;
    font-size: 18px; /* 增大字体，提高可读性 */
    padding: 16px;
  }
}

/* 下拉选择框样式 */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 1em;
  cursor: pointer;
  padding-right: 40px; /* 为下拉箭头留出空间 */
}

/* 文本域样式 */
textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* 表单动作区域 */
.form-actions { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  flex-wrap: wrap;
  margin-top: 24px;
}

@media (max-width: 480px) {
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.form-status { 
  color: #93c5fd; 
  font-size: 14px; 
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-status.error { 
  color: #fca5a5; 
}

.form-status.success { 
  color: #4ade80; 
}

/* 可访问的隐藏元素（蜜罐） */
.visually-hidden { 
  position: absolute; 
  width: 1px; 
  height: 1px; 
  padding: 0; 
  margin: -1px; 
  overflow: hidden; 
  clip: rect(0 0 0 0); 
  white-space: nowrap; 
  border: 0; 
}

/* 验证码行 */
.captcha-row { 
  display: flex; 
  align-items: center; 
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .captcha-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .captcha-row input {
    margin-top: 12px;
  }
}

.captcha-row #captcha-text { 
  background: #0b1220; 
  border: 1px solid #334155; 
  padding: 14px 16px; 
  border-radius: 8px; 
  color: #cbd5e1;
  font-weight: 500;
  min-width: 180px;
  text-align: center;
}

.contact-info { 
  color: #94a3b8; 
  margin-top: 20px;
  line-height: 1.6;
  text-align: center;
  max-width: 100%;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 联系信息项样式 */
.contact-info p {
  margin: 0;
  padding: 8px 0;
  transition: all 0.3s ease;
}

.contact-info p:hover {
  color: #ffffff;
  transform: translateX(5px);
}

/* 添加图标支持 */
.contact-info p i {
  margin-right: 10px;
  color: #2a8cf0;
  width: 20px;
  text-align: center;
}

/* 针对不同屏幕尺寸的响应式调整 */
@media (max-width: 768px) {
  .contact-info {
    font-size: 14px;
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .contact-info {
    font-size: 13px;
    padding: 0 12px;
    gap: 8px;
  }
  
  .contact-info p {
    padding: 6px 0;
  }
  
  /* 在移动设备上增加触控区域 */
  .contact-info a {
    display: inline-block;
    padding: 4px 0;
    min-height: 36px;
    vertical-align: middle;
  }
}

/* 表单验证样式 */
input:invalid:focus, select:invalid:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230, 49, 49, 0.2);
}

input:valid:not(:placeholder-shown),
select:valid:not([value=""]),
textarea:valid:not(:placeholder-shown) {
  border-color: #4ade80;
}

/* 表单元素动画效果 */
.contact .form input,
.contact .form select,
.contact .form textarea,
#contact-form button {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 许可证卡片 */
.licenses { display: grid; grid-template-columns: 1fr; gap: 12px; }
.license-card { background: var(--card); border: 1px solid #1f2937; border-radius: 12px; padding: 14px; }
.license-card strong { color: #fff; }
.license-card ul { margin: 6px 0 0 18px; }
.license-card small { color: #94a3b8; display: block; margin-top: 10px; }

/* 页脚 */
.site-footer { border-top: 1px solid #1f2937; padding: 16px 0; text-align: center; color: #94a3b8; background: #0b1220; }