/* ============================================================
   轮班闹钟 — 官网样式
   主题色: #00c9a7 | 设计风格: 扁平化、简洁现代
   适配: 桌面端 + 手机端 均完善支持
   ============================================================ */

/* ----- CSS 变量 ----- */
:root {
  --primary: #00c9a7;
  --primary-light: rgba(0, 201, 167, 0.1);
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --text-hint: #999;
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --bg-card: #ffffff;
  --border: #e8ecf1;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --max-width: 1100px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 给固定导航栏留出顶部空间，防止内容被遮挡 */
  padding-top: 64px;
  padding-bottom: 0;
}

/* 浮动条可见时，给 body 留出底部间距 */
body.has-floating-bar {
  padding-bottom: 80px;
}

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

ul {
  list-style: none;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- 通用组件 ----- */
.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: var(--text-hint);
  text-align: center;
  margin-bottom: 48px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  /* 手机端触控友好：最小触摸区域 44px */
  min-height: 44px;
}

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

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

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(0, 201, 167, 0.35);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
  border-radius: 12px;
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.navbar-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.navbar-links a:hover {
  color: var(--primary);
}

/* 导航中直接下载，桌面端导航栏按钮 */
.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
}

.nav-cta:hover {
  opacity: 0.9;
}

/* ---------- 汉堡菜单按钮 (仅手机端显示) ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  /* 最小触控区域 */
  min-width: 44px;
  min-height: 44px;
}

.menu-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* 激活时变 X */
.menu-toggle.active .menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active .menu-bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 手机端下拉菜单 ---------- */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 12px 24px 20px;
  gap: 4px;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s, opacity 0.25s;
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-primary);
  border-radius: 10px;
  transition: background 0.15s;
}

.mobile-menu a:active {
  background: var(--bg-alt);
}

.mobile-cta {
  background: var(--primary) !important;
  color: #fff !important;
  text-align: center;
  font-weight: 600 !important;
  margin-top: 8px;
}

/* ===== 主视觉区域 ===== */
.hero {
  /* body已有64px padding-top，此处补足到140px的视觉间距 */
  padding: 76px 0 80px;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 520px;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-highlight {
  color: var(--primary);
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* 手机模型（桌面端展示，手机端可隐藏） */
.hero-mockup {
  flex-shrink: 0;
}

.phone-frame {
  width: 280px;
  height: 520px;
  background: #1a1a2e;
  border-radius: 32px;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
}

/* 刘海 */
.phone-frame::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #1a1a2e;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #f5f5f7;
  border-radius: 22px;
  overflow: hidden;
  padding: 30px 16px 16px;
}

/* 模拟卡片 */
.mock-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  border: 2px solid #00c9a7;
}

.mock-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mock-label {
  font-size: 12px;
  color: #999;
}

.mock-badge {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  padding: 3px 12px;
  border-radius: 14px;
}

.mock-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mock-time-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mock-time-label {
  font-size: 11px;
  color: #999;
}

.mock-time-val {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
}

.mock-dash {
  font-size: 11px;
  color: #ccc;
}

.mock-alarm {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
  background: #f5f5f7;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.mock-alarm strong {
  color: #1a1a2e;
}

.mock-countdown {
  text-align: center;
  font-size: 11px;
  color: #999;
}

.mock-countdown-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #00c9a7;
  margin-top: 4px;
}

/* 本周排班预览 */
.mock-week {
  background: #fff;
  border-radius: 14px;
  padding: 12px 16px;
}

.mock-week-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  display: block;
  margin-bottom: 10px;
}

.mock-week-items {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.mock-day {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* ===== 核心功能 ===== */
.features {
  padding: 80px 0;
  background: var(--bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

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

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

/* ===== 排班模式 ===== */
.shift-modes {
  padding: 80px 0;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.mode-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
}

.mode-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.mode-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.mode-shifts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.mode-shift {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: 10px;
}

.shift-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mode-shift div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mode-shift strong {
  font-size: 14px;
  color: var(--text-primary);
}

.shift-time {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 2px;
}

.shift-alarm {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

.mode-pattern {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pattern-label {
  font-size: 13px;
  color: var(--text-hint);
}

.pattern-badge {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
}

/* ===== 使用流程 ===== */
.how-it-works {
  padding: 80px 0;
  background: var(--bg-alt);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

.step-connector {
  display: flex;
  align-items: center;
  padding-top: 16px;
  flex-shrink: 0;
}

/* ===== 技术亮点 ===== */
.tech-highlights {
  padding: 80px 0;
}

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

.tech-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.tech-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.tech-item strong {
  display: block;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tech-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ===== 下载区域 ===== */
.download {
  padding: 80px 0;
  background: var(--bg-alt);
}

.download-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 36px;
  border: 1px solid var(--border);
  text-align: center;
}

.download-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  text-align: left;
}

.app-icon-large {
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.download-info p {
  font-size: 14px;
  color: var(--text-hint);
}

.download-meta {
  margin-top: 6px;
  font-size: 13px !important;
}

.download-card .btn {
  width: 100%;
  justify-content: center;
}

.download-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 560px;
  margin: 16px auto 0;
  padding: 12px 16px;
  background: var(--primary-light);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.download-note svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--primary);
}

/* ===== 页脚 ===== */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-text {
  font-size: 14px;
  color: var(--text-hint);
  margin-bottom: 12px;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-hint);
}

/* ============================================================
   浮动下载条：滚动超过首屏后，在页面底部固定显示
   手机端始终可见（不需要滚动到底部才能下载）
   ============================================================ */
.floating-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  padding: 12px 0;
  /* 默认隐藏，JS 控制显示 */
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.floating-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.floating-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.floating-bar-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.floating-bar-info svg {
  flex-shrink: 0;
}

.floating-bar-info div {
  display: flex;
  flex-direction: column;
}

.floating-bar-info strong {
  font-size: 14px;
  color: var(--text-primary);
}

.floating-bar-info span {
  font-size: 12px;
  color: var(--text-hint);
}

.floating-bar .btn {
  flex-shrink: 0;
}

/* ============================================================
   响应式：平板 (≤900px)
   ============================================================ */
@media (max-width: 900px) {
  /* 隐藏桌面导航，显示汉堡按钮 */
  .navbar-links {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  .mobile-menu {
    display: flex;
  }

  .hero {
    /* body在平板端64px padding-top，此处补足 */
    padding: 46px 0 50px;
  }

  .hero .container {
    flex-direction: column;
    gap: 36px;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-mockup {
    /* 手机上仍然展示，缩小 */
  }

  .phone-frame {
    width: 220px;
    height: 420px;
    margin: 0 auto;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .step {
    max-width: 320px;
  }

  .step-connector {
    transform: rotate(90deg);
    padding-top: 0;
  }

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

  .section-title {
    font-size: 28px;
  }

  .section-sub {
    font-size: 15px;
    margin-bottom: 36px;
  }

  /* 所有区块减小内边距 */
  .features,
  .shift-modes,
  .how-it-works,
  .tech-highlights,
  .download {
    padding: 60px 0;
  }

  .container {
    padding: 0 20px;
  }
}

/* ============================================================
   响应式：手机端 (≤600px)
   ============================================================ */
@media (max-width: 600px) {
  html {
    scroll-padding-top: 72px;
  }

  /* 手机端 navbar 高度56px，调整 body 顶部间距 */
  body {
    padding-top: 56px;
  }

  .navbar .container {
    height: 56px;
  }

  .navbar-brand {
    font-size: 16px;
  }

  .hero {
    /* body在手机端56px padding-top，此处补足到100px视觉间距 */
    padding: 44px 0 40px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-desc {
    font-size: 15px;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hero-actions .btn {
    justify-content: center;
    width: 100%;
  }

  /* 手机上隐藏手机模型（屏幕太小，意义不大） */
  .hero-mockup {
    display: none;
  }

  .section-title {
    font-size: 24px;
  }

  .section-sub {
    font-size: 14px;
    margin-bottom: 28px;
    padding: 0 16px;
  }

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

  .feature-card {
    padding: 20px 18px;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .feature-card h3 {
    font-size: 16px;
  }

  .feature-card p {
    font-size: 14px;
  }

  .features,
  .shift-modes,
  .how-it-works,
  .tech-highlights,
  .download {
    padding: 48px 0;
  }

  .mode-card {
    padding: 20px;
  }

  .mode-name {
    font-size: 18px;
  }

  .step {
    max-width: 280px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .step h3 {
    font-size: 16px;
  }

  .tech-item {
    padding: 16px 18px;
  }

  .download-card {
    padding: 24px 20px;
    border-radius: 14px;
  }

  .download-info {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .download-info h3 {
    font-size: 18px;
  }

  .app-icon-large {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .container {
    padding: 0 16px;
  }

  /* 浮动条在手机端适配 */
  .floating-bar-inner {
    padding: 0 16px;
  }

  .floating-bar-info strong {
    font-size: 13px;
  }

  .floating-bar-info span {
    font-size: 11px;
  }

  .floating-bar .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  /* 底部间距 */
  .footer {
    padding: 32px 0 28px;
  }

  .mobile-menu a {
    font-size: 15px;
    padding: 12px 14px;
  }
}

/* ============================================================
   极小屏 (≤380px) 进一步收缩
   ============================================================ */
@media (max-width: 380px) {
  .hero-title {
    font-size: 24px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .section-title {
    font-size: 22px;
  }

  .floating-bar-info svg {
    width: 24px;
    height: 24px;
  }

  .floating-bar .btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}
