/* 时隙官网 - 全平台响应式 */
:root {
  --brand: #4F6EF7;
  --brand-dark: #3A52C8;
  --brand-light: #E8ECFF;
  --bg: #FFFFFF;
  --bg-secondary: #F7F7F7;
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(79, 110, 247, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --max-width: 1080px;
  --nav-height: 60px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===================== Container ===================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 32px;
  }
}

/* ===================== Header / Nav ===================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
}

/* Mobile: nav hidden. Desktop: always visible */
.nav-links {
  display: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
  padding: 6px 0;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.2s;
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-links a:hover::after {
  width: 100%;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
  }
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 110, 247, 0.35);
}

.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 6px 20px rgba(79, 110, 247, 0.45);
}

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

.btn-secondary:hover {
  background: #eee;
}

/* ===================== Hero ===================== */
.hero {
  padding: calc(var(--nav-height) + 48px) 0 64px;
  background: linear-gradient(180deg, var(--brand-light) 0%, var(--bg) 60%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(79, 110, 247, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -120px;
  left: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(79, 110, 247, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(79, 110, 247, 0.1);
  color: var(--brand);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

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

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

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero h1 span {
  color: var(--brand);
}

.hero p {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
  align-items: center;
}

.hero-preview {
  position: relative;
  margin: 0 auto;
  max-width: 320px;
}

@media (min-width: 768px) {
  .hero {
    padding: calc(var(--nav-height) + 64px) 0 80px;
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: calc(var(--nav-height) + 80px) 0 96px;
  }

  .hero h1 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===================== Phone Mockup ===================== */
.phone {
  background: var(--text-primary);
  border-radius: 32px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.phone-screen {
  background: var(--bg);
  border-radius: 24px;
  overflow: hidden;
  padding: 16px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-secondary);
}

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

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  position: relative;
}

.chat-avatar.unread::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #FF4D4F;
  border-radius: 50%;
  top: -3px;
  right: -3px;
  border: 2px solid #fff;
}

.chat-body {
  flex: 1;
  min-width: 0;
}

.chat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.chat-name {
  font-weight: 600;
  font-size: 15px;
}

.chat-time {
  font-size: 12px;
  color: var(--text-tertiary);
}

.chat-msg {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===================== Sections ===================== */
.section {
  padding: 64px 0;
}

.section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 48px;
}

/* ===================== Features ===================== */
.features {
  background: var(--bg);
}

.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.feature-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.feature-card:active {
  transform: scale(0.98);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-light);
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--brand);
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===================== Characters ===================== */
.characters {
  background: var(--bg-secondary);
}

.character-list {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.character-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.character-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.character-card:active {
  transform: scale(0.98);
}

.character-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 32px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.character-card h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 4px;
}

.character-role {
  font-size: 13px;
  color: var(--brand);
  font-weight: 500;
  margin-bottom: 12px;
}

.character-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 300px;
  margin: 0 auto;
}

.character-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.character-status .status-dot {
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
}

@media (min-width: 640px) {
  .character-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .character-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===================== Steps ===================== */
.steps {
  background: var(--bg);
}

.steps-track {
  display: grid;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  width: 44px;
  height: 44px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.step-body h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .steps-track {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: none;
  }

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

/* ===================== CTA ===================== */
.cta {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0;
}

.cta h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  margin-bottom: 12px;
}

.cta p {
  font-size: clamp(14px, 1.6vw, 17px);
  opacity: 0.9;
  margin-bottom: 32px;
}

.cta .btn {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta .btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ===================== Footer ===================== */
.footer {
  background: var(--text-primary);
  color: var(--text-tertiary);
  padding: 48px 0 36px;
  text-align: center;
}

.footer .logo {
  color: #fff;
  justify-content: center;
  margin-bottom: 16px;
}

.footer p {
  font-size: 13px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 13px;
}

.footer-links a {
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

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

.hero-badge,
.hero h1,
.hero p,
.hero-actions,
.hero-preview {
  animation: fadeInUp 0.6s ease forwards;
}

.hero h1 {
  animation-delay: 0.1s;
}
.hero p {
  animation-delay: 0.2s;
}
.hero-actions {
  animation-delay: 0.3s;
}
.hero-preview {
  animation-delay: 0.4s;
}
