/* ============================================
   TimeAtlas Pro 官网样式
   主色：#2D6CDF  辅助：#F5F5F5 / 白
   背景：浅渐变 + 轻微纹理，简约现代
   ============================================ */

:root {
  --primary: #2D6CDF;
  --primary-dark: #2356b8;
  --primary-light: #5a8ee8;
  --bg-light: #F5F5F5;
  --bg-white: #ffffff;
  --text: #333333;
  --text-muted: #666666;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(45, 108, 223, 0.08);
  --shadow-lg: 0 8px 24px rgba(45, 108, 223, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.6;
  background: linear-gradient(180deg, #f8f9fc 0%, #F5F5F5 30%, #eeeeee 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== 顶部 Hero ========== */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 56px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2D6CDF 0%, #1a4a9e 50%, #0f2d5c 100%);
  z-index: 0;
}

/* 轻微纹理：细点 + 透明度 */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-logo-wrap {
  margin-bottom: 20px;
}

.hero-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  object-fit: contain;
}

.hero-logo-placeholder {
  display: none;
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  border: 2px dashed rgba(255,255,255,0.4);
}

.hero-slogan {
  margin: 0 0 32px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  min-height: 48px;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.25rem;
}

.btn-apple {
  background: #000;
  color: #fff;
}

.btn-apple:hover {
  background: #222;
  box-shadow: var(--shadow-lg);
}

.btn-google {
  background: #fff;
  color: #333;
}

.btn-google:hover {
  background: #f8f8f8;
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(45, 108, 223, 0.08);
  text-decoration: none;
}

/* ========== 主内容区 ========== */
.main {
  padding: 48px 0 32px;
}

.section {
  margin-bottom: 48px;
}

.section-title {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.intro {
  background: var(--bg-white);
  padding: 40px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 24px 32px;
}

.intro-text {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
}

/* 截图区域：Grid 三列 */
.screenshots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.screenshot-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-light);
  aspect-ratio: 9 / 16;
  min-height: 200px;
}

.screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screenshot-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  background: linear-gradient(145deg, #e8e8e8, #f0f0f0);
  border: 2px dashed var(--border);
}

/* ========== 协议区域 ========== */
.agreements .container {
  text-align: center;
}

.agreement-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.agreement-buttons .btn {
  min-width: 140px;
}

/* ========== 页脚 ========== */
.footer {
  position: relative;
  padding: 32px 24px;
  margin-top: 24px;
  background: linear-gradient(180deg, #e8eef8 0%, #dde5f2 100%);
}

.footer-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(45, 108, 223, 0.04) 1px, transparent 0);
  background-size: 20px 20px;
  pointer-events: none;
}

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

.copyright {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-email {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-email:hover {
  color: var(--primary);
}

/* ========== 协议页面（privacy / terms）========== */
.page-agreement {
  background: var(--bg-light);
  min-height: 100vh;
}

.agreement-page-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(45, 108, 223, 0.06) 0%, var(--bg-light) 20%);
  z-index: 0;
}

.agreement-page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.agreement-header {
  flex-shrink: 0;
  margin-bottom: 24px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--primary);
}

.back-link:hover {
  text-decoration: underline;
}

.agreement-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
}

.agreement-updated {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.agreement-content {
  flex: 1;
  background: var(--bg-white);
  padding: 28px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  word-wrap: break-word;
  overflow-x: hidden;
}

.agreement-content section {
  margin-bottom: 28px;
}

.agreement-content section:last-of-type {
  margin-bottom: 0;
}

.agreement-content h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.agreement-content p {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.agreement-content p:last-child {
  margin-bottom: 0;
}

.agreement-footer {
  flex-shrink: 0;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.agreement-footer .copyright {
  margin-bottom: 8px;
}

/* ========== 响应式：平板 ========== */
@media (max-width: 768px) {
  .hero {
    min-height: 360px;
    padding: 40px 20px 48px;
  }

  .hero-logo,
  .hero-logo-placeholder {
    width: 64px;
    height: 64px;
  }

  .hero-slogan {
    font-size: 1.25rem;
    margin-bottom: 28px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .intro {
    margin-left: 16px;
    margin-right: 16px;
    padding: 28px 20px;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .intro-text {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .screenshots {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 280px;
    margin: 0 auto;
  }

  .screenshot-item {
    min-height: 360px;
  }

  .agreement-buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 280px;
    margin: 0 auto;
  }

  .agreement-buttons .btn {
    width: 100%;
    min-width: unset;
  }

  .footer-inner {
    flex-direction: column;
  }

  .agreement-page {
    padding: 20px 16px 40px;
  }

  .agreement-content {
    padding: 20px 18px;
  }

  .agreement-content h2 {
    font-size: 1.1rem;
  }

  .agreement-content p {
    font-size: 0.9rem;
  }
}

/* ========== 响应式：小屏手机 ========== */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  .btn {
    padding: 12px 24px;
    min-height: 44px;
    font-size: 0.95rem;
  }

  .agreement-page {
    padding: 16px 12px 32px;
  }

  .agreement-content {
    padding: 18px 14px;
  }
}
