/* ============================================================
   iWinFixBox 官网 - 深灰色科技风
   配色与应用深色主题保持一致
   ============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  /* 背景层级（由底到面） */
  --bg-deep: #14161A;       /* 最底层 */
  --bg-panel: #1C1E24;      /* 面板 */
  --bg-window: #21242B;     /* 主窗口 */
  --bg-faint: #262930;      /* 弱化容器 */
  --bg-widget: #2D3038;     /* 控件默认 */
  --bg-hover: #3A3E48;      /* 控件悬停 */

  /* 边框 */
  --border: #3C3F46;

  /* 强调色 */
  --accent: #3C82A8;        /* 主操作蓝 */
  --accent-hover: #4D96BC;
  --link: #66C0F2;          /* 超链接蓝 */

  /* 文字 */
  --text-primary: #C8C8D2;  /* 正文 */
  --text-secondary: #B4B4C3;/* 次要 */
  --text-muted: #6E7280;    /* 弱化 */
  --text-bright: #E8E8EE;   /* 高亮 */

  /* 状态色 */
  --success: #5CB85C;
  --warning: #E8B94E;
  --danger: #D96B6B;

  /* 字体 */
  --font-display: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-body: 'Noto Sans SC', 'Segoe UI', -apple-system, sans-serif;

  /* 圆角 & 阴影 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent-hover);
}

code, pre {
  font-family: var(--font-display);
}

/* ---------- 背景网格效果 ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(60, 130, 168, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 130, 168, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ---------- 布局 ---------- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(28, 30, 36, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: height 0.3s ease;
}

.navbar.scrolled {
  height: 56px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.5px;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--link));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--bg-deep);
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-bright);
  background: var(--bg-hover);
}

.nav-cta {
  padding: 8px 20px !important;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px;
  position: relative;
}

.hero-content {
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-bright);
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--accent), var(--link));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;                   /* 强制保持白色防止与背景同色 */
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(60, 130, 168, 0.35);
}

.btn-secondary {
  background: var(--bg-widget);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-bright);
  transform: translateY(-1px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
}

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

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- 通用 Section ---------- */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- 功能特性 ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

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

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--accent);
}

.feature-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---------- 技术特点 ---------- */
.tech-section {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
}

.tech-content h3 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-bright);
  margin-bottom: 16px;
}

.tech-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.tech-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tech-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
}

.tech-list li .check {
  color: var(--success);
  font-size: 16px;
}

.tech-visual {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}

.tech-terminal {
  padding: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.8;
}

.tech-terminal .prompt {
  color: var(--accent);
}

.tech-terminal .cmd {
  color: var(--text-bright);
}

.tech-terminal .output {
  color: var(--text-muted);
}

.tech-terminal .success {
  color: var(--success);
}

.tech-terminal .comment {
  color: var(--text-muted);
}

/* ---------- 下载区域 ---------- */
.download-section {
  text-align: center;
}

.download-card {
  background: linear-gradient(135deg, var(--bg-window) 0%, var(--bg-faint) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.download-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.version-info {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.version-info .ver {
  color: var(--accent);
  font-weight: 700;
}

.download-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.download-note {
  font-size: 13px;
  color: var(--text-muted);
}

.download-note code {
  background: var(--bg-deep);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--link);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-secondary);
}

.footer-brand .nav-logo-icon {
  width: 26px;
  height: 26px;
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  width: 100%;
}

/* ---------- 滚动动画 ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-stats {
    gap: 24px;
  }

  section {
    padding: 64px 0;
  }

  .tech-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .tech-list {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

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

  .btn {
    justify-content: center;
  }

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