/* CleanBar Website Stylesheet — Core Design System & Layout */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
  --bg-color: #ffffff;
  --gray-1: #fcfcfc; --gray-2: #f9f9f9; --gray-3: #f0f0f0; --gray-4: #e8e8e8;
  --gray-5: #e0e0e0; --gray-6: #d9d9d9; --gray-7: #cecece; --gray-8: #bbbbbb;
  --gray-9: #8d8d8d; --gray-10: #838383; --gray-11: #646464; --gray-12: #202020;
  --gray-a1: rgba(0, 0, 0, 0.015); --gray-a2: rgba(0, 0, 0, 0.035);
  --gray-a3: rgba(0, 0, 0, 0.065); --gray-a4: rgba(0, 0, 0, 0.095); --gray-a5: rgba(0, 0, 0, 0.13);
  --accent-9: #007aff; --accent-10: #0062cc; --accent-a3: rgba(0, 122, 255, 0.12); --accent-contrast: #ffffff;
  --success-color: #34c759; --warning-color: #ff9500; --danger-color: #ff3b30;
  --cat-purple: #af52de; --cat-blue: #007aff; --cat-orange: #ff9500; --cat-yellow: #ffcc00;
  --cat-teal: #30b0c7; --cat-green: #34c759; --cat-gray: #8e8e93;
  --radius-1: 4px; --radius-2: 6px; --radius-3: 10px; --radius-4: 14px; --radius-full: 9999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05); --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-popover: 0 20px 48px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.78); --glass-border: rgba(255, 255, 255, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #111113;
    --gray-1: #111113; --gray-2: #18181a; --gray-3: #222225; --gray-4: #2b2b2f;
    --gray-5: #36363b; --gray-6: #424248; --gray-7: #52525a; --gray-8: #6b6b76;
    --gray-9: #7e7e8b; --gray-10: #8c8c99; --gray-11: #b4b4be; --gray-12: #eeeeef;
    --gray-a1: rgba(255, 255, 255, 0.02); --gray-a2: rgba(255, 255, 255, 0.05);
    --gray-a3: rgba(255, 255, 255, 0.08); --gray-a4: rgba(255, 255, 255, 0.12); --gray-a5: rgba(255, 255, 255, 0.16);
    --accent-9: #0a84ff; --accent-10: #0071e3; --accent-a3: rgba(10, 132, 255, 0.18);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-popover: 0 24px 54px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(30, 30, 34, 0.82); --glass-border: rgba(255, 255, 255, 0.08);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--gray-12);
  line-height: 1.5;
  font-size: 15px;
  min-height: 100vh;
}

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

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav Header */
.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  padding-bottom: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--gray-12);
}

.nav-brand img {
  border-radius: 7px;
  box-shadow: var(--shadow-1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: var(--gray-11);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--gray-12);
}

.btn-soft {
  background-color: var(--gray-a2);
  color: var(--gray-12);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-a3);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-soft:hover {
  background-color: var(--gray-a3);
}

.lang-toggle {
  cursor: pointer; background: transparent; border: none; color: var(--gray-11);
  font-size: 13px; font-weight: 500; padding: 4px 8px; border-radius: var(--radius-1); transition: color 0.15s;
}
.lang-toggle:hover { color: var(--gray-12); background-color: var(--gray-a2); }

/* Mobile Navigation Hamburger & Drawer (仅在移动端视口显示) */
.mobile-only { display: none !important; }
.mobile-nav-toggle-wrap { display: flex; align-items: center; gap: 8px; }

.menu-toggle-btn {
  display: none !important; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; background: var(--gray-a2);
  border: 1px solid var(--gray-a3); color: var(--gray-12); cursor: pointer; padding: 0; transition: all 0.15s ease;
}
.menu-toggle-btn:hover, .menu-toggle-btn:active { background: var(--gray-a4); }
.menu-toggle-btn svg { width: 20px; height: 20px; stroke: currentColor; }

.mobile-menu-backdrop {
  display: none !important; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease; z-index: 9998;
}
.mobile-menu-backdrop.open { opacity: 1; visibility: visible; }

.mobile-menu-drawer {
  display: none !important; position: fixed; top: 0; left: 0; width: 100%;
  background: var(--glass-bg); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--glass-border); box-shadow: var(--shadow-popover);
  padding: 16px 18px 20px 18px; flex-direction: column; gap: 14px;
  transform: translateY(-110%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); z-index: 9999;
}
.mobile-menu-drawer.open { transform: translateY(0); }

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-a3);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-12);
  background: var(--gray-a2);
  transition: background 0.15s ease;
}

.mobile-nav-item:active {
  background: var(--gray-a4);
}

.mobile-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
}

/* Main Layout */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 52px;
  padding-top: 24px;
  padding-bottom: 64px;
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.hero-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--gray-12);
}

.hero-subtitle {
  color: var(--gray-11);
  font-size: 16px;
  line-height: 1.55;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--gray-12);
  color: var(--bg-color);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-2);
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.download-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.sys-badge {
  font-size: 12px;
  color: var(--gray-10);
  background-color: var(--gray-a2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-a3);
}

/* Features Section */
.features-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--gray-12);
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.feature-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-9);
}

.feature-label {
  color: var(--gray-12);
  font-weight: 600;
}

.feature-desc {
  color: var(--gray-11);
}

/* Pricing Section */
.pricing-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pricing-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.pricing-card {
  background-color: var(--gray-a2);
  border: 1px solid var(--gray-a3);
  border-radius: var(--radius-4);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card-featured {
  background-color: var(--glass-bg);
  border: 1.5px solid var(--accent-9);
  box-shadow: 0 8px 28px var(--accent-a3);
}

.pricing-card-disabled {
  opacity: 0.72;
  background-color: var(--gray-a1);
  border: 1px dashed var(--gray-a4);
}

.pricing-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.tier-name { font-size: 17px; font-weight: 600; color: var(--gray-12); }
.tier-price { font-size: 14px; color: var(--gray-11); }
.tier-desc { font-size: 13.5px; color: var(--gray-11); line-height: 1.5; }
.tier-features { display: flex; flex-direction: column; gap: 9px; }

.tier-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--gray-12);
}
.tier-feature-item svg { color: var(--accent-9); flex-shrink: 0; }
.pricing-card-disabled .tier-feature-item svg { color: var(--gray-9); }

.btn-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-a3);
  color: var(--gray-10);
  border: 1px solid var(--gray-a4);
  border-radius: var(--radius-2);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}
.btn-disabled:hover { background: var(--gray-a4); color: var(--gray-11); }

/* Toast Message */
.cleanbar-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 60px);
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  color: var(--gray-12);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-popover);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  max-width: 90vw;
  text-align: center;
}
.cleanbar-toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 0 40px 0;
  border-top: 1px solid var(--gray-a3);
  color: var(--gray-11);
  font-size: 13px;
}
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-sep { color: var(--gray-7); }
.footer a:hover { text-decoration: underline; color: var(--gray-12); }

/* Changelog styling */
.changelog-entry {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gray-a3);
  margin-bottom: 24px;
}
.changelog-date { font-size: 13px; font-weight: 600; color: var(--accent-9); font-family: var(--font-mono); }
.changelog-title { font-size: 18px; font-weight: 600; color: var(--gray-12); }
.changelog-list { padding-left: 20px; color: var(--gray-11); font-size: 14px; line-height: 1.6; }

/* Mobile & H5 Responsive Optimization (移动端与小屏断点 <= 768px) */
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .menu-toggle-btn { display: inline-flex !important; }
  .mobile-menu-backdrop { display: block !important; }
  .mobile-menu-drawer { display: flex !important; }
  .container { padding: 0 16px; }
  .nav-header { flex-wrap: nowrap; padding-top: 16px; padding-bottom: 14px; }
  .hero-title { font-size: 24px; letter-spacing: -0.02em; line-height: 1.25; }
  .hero-subtitle { font-size: 14px; line-height: 1.5; }
  .download-btn { width: 100%; justify-content: center; min-height: 44px; font-size: 15px; }
  .pricing-card { padding: 16px; }
  .feature-item { font-size: 14px; gap: 10px; }
}

@media (max-width: 420px) {
  .hero-title { font-size: 22px; }
}
