/* ==========================================================================
   PhotoTaste 基础与全局样式 (base.css)
   风格理念：Apple Native + MUJI + Editorial 杂志化极简排版
   行数规范：严格限制在 500 行以内
   ========================================================================== */

:root {
  --bg-paper: #F4F1EA;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F9F8F5;
  --text-ink: #171717;
  --text-secondary: #5C5C5C;
  --text-tertiary: #8E8E93;
  --accent: #C25433;
  --accent-hover: #A84427;
  --accent-light: rgba(194, 84, 51, 0.08);
  --accent-border: rgba(194, 84, 51, 0.25);
  --hairline: rgba(0, 0, 0, 0.08);
  --hairline-strong: rgba(0, 0, 0, 0.16);
  --nav-bg: rgba(244, 241, 234, 0.88);
  --font-serif: "New York", -apple-system-ui-serif, Georgia, "Songti SC", "Source Han Serif SC", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --header-height: 64px;
}

[data-theme="dark"] {
  --bg-paper: #121212;
  --bg-card: #1C1C1E;
  --bg-card-subtle: #252528;
  --text-ink: #F5F5F7;
  --text-secondary: #A1A1A6;
  --text-tertiary: #6E6E73;
  --accent: #E06D4B;
  --accent-hover: #F27C5A;
  --accent-light: rgba(224, 109, 75, 0.16);
  --accent-border: rgba(224, 109, 75, 0.35);
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --nav-bg: rgba(18, 18, 18, 0.88);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-paper: #121212;
    --bg-card: #1C1C1E;
    --bg-card-subtle: #252528;
    --text-ink: #F5F5F7;
    --text-secondary: #A1A1A6;
    --text-tertiary: #6E6E73;
    --accent: #E06D4B;
    --accent-hover: #F27C5A;
    --accent-light: rgba(224, 109, 75, 0.16);
    --accent-border: rgba(224, 109, 75, 0.35);
    --hairline: rgba(255, 255, 255, 0.08);
    --hairline-strong: rgba(255, 255, 255, 0.16);
    --nav-bg: rgba(18, 18, 18, 0.88);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-paper);
  color: var(--text-ink);
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
}

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

/* 导航栏 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--hairline);
  transition: background-color 0.25s ease;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-ink);
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  display: block;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text-ink);
  background-color: var(--hairline);
}

.btn-nav-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--accent);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-nav-download:hover {
  background-color: var(--accent-hover);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-ink);
  cursor: pointer;
  width: 44px;
  height: 44px;
}

/* Apple HIG 按钮规范 (min-height: 44px) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px;
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--accent);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(194, 84, 51, 0.25);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 6px 18px rgba(194, 84, 51, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-ink);
  background-color: var(--bg-card);
  border: 0.5px solid var(--hairline-strong);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background-color: var(--bg-card-subtle);
  border-color: var(--text-secondary);
}

/* 页脚 */
.footer {
  border-top: 0.5px solid var(--hairline);
  padding: 56px 0 40px;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand h5 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--text-ink);
  margin-bottom: 8px;
}

.footer-links h6 {
  color: var(--text-ink);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 0.5px solid var(--hairline);
  padding-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
