/* ===== DESIGN SYSTEM v1.1 ===== */
/* News Platform - Flat Design Mobile (Touch-First) */

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-primary: #DC2626;
  --color-on-primary: #FFFFFF;
  --color-secondary: #EF4444;
  --color-accent: #1E40AF;
  --color-on-accent: #FFFFFF;
  --color-background: #FFFFFF;
  --color-foreground: #1E293B;
  --color-card: #FFFFFF;
  --color-card-foreground: #1E293B;
  --color-muted: #F1F5F9;
  --color-muted-foreground: #64748B;
  --color-border: #E2E8F0;
  --color-destructive: #DC2626;
  --color-on-destructive: #FFFFFF;
  --color-ring: #DC2626;
  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-info: #3B82F6;
  --color-accent-bg: #FEF2F2;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Songti SC', 'SimSun', Georgia, serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing (4px base) */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radius */
  --radius-none: 0;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows (minimal - flat design) */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 400ms;
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in: cubic-bezier(0.32, 0, 0.67, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Breakpoints (for reference) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1440px;
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --color-background: #0F172A;
  --color-foreground: #F8FAFC;
  --color-card: #1E293B;
  --color-card-foreground: #F8FAFC;
  --color-muted: #1E293B;
  --color-muted-foreground: #94A3B8;
  --color-border: #334155;
  --color-primary: #EF4444;
  --color-accent: #60A5FA;
  --color-accent-bg: #2A1E24;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-background: #0F172A;
    --color-foreground: #F8FAFC;
    --color-card: #1E293B;
    --color-card-foreground: #F8FAFC;
    --color-muted: #1E293B;
    --color-muted-foreground: #94A3B8;
    --color-border: #334155;
    --color-primary: #EF4444;
    --color-accent: #60A5FA;
  }
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overscroll-behavior: contain;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background: var(--color-background);
  color: var(--color-foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover {
  color: var(--color-primary);
}

/* --- Focus Visible (a11y) --- */
:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1280px;
  }
}

main.container {
  padding-top: var(--space-6);
  min-height: calc(100vh - 116px);
}

@media (min-width: 768px) {
  main.container {
    padding-top: var(--space-8);
  }
}

/* --- Navigation / Site Header --- */
.site-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}
.logo img {
  height: 32px;
  width: auto;
  display: block;
}
[data-theme="light"] .logo-dark,
[data-theme="dark"] .logo-light {
  display: none;
}

.site-header nav.desktop-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.site-header nav.desktop-nav a {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-foreground);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.site-header nav.desktop-nav a:hover {
  color: var(--color-primary);
  background: var(--color-muted);
}
.site-header nav.desktop-nav a.active {
  color: var(--color-primary);
  background: var(--color-muted);
}
@media (max-width: 767px) {
  .site-header nav.desktop-nav {
    display: none;
  }
}

/* --- Category Bar (universal sub-nav) --- */
.cat-bar {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 99;
}
.cat-bar::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 32px;
  background: linear-gradient(90deg, transparent, var(--color-card));
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s;
}
.cat-bar.is-scrollable::after { opacity: 1; }
.cat-bar .container {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  height: 44px;
  padding: 0 var(--space-4);
  scroll-behavior: smooth;
}
.cat-bar .container::-webkit-scrollbar { display: none; }
.cat-bar a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted-foreground);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-full);
  transition: all 0.15s ease-out;
  flex-shrink: 0;
  min-height: 32px;
}
.cat-bar a:hover {
  color: var(--color-primary);
  background: var(--color-muted);
}
.cat-bar a.active {
  color: var(--color-on-primary);
  background: var(--color-primary);
}
@media (min-width: 768px) and (max-width: 1023px) {
  .cat-bar .container { height: 40px; padding: 0 var(--space-3); }
  .cat-bar a { padding: 4px 10px; font-size: var(--text-xs); min-height: 28px; }
}
@media (max-width: 767px) {
  .cat-bar .container { height: 40px; padding: 0 var(--space-2); gap: 2px; }
  .cat-bar a { padding: 4px 10px; font-size: 12px; min-height: 36px; min-width: 44px; justify-content: center; }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  color: var(--color-foreground);
  font-size: 20px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.theme-toggle:hover {
  background: var(--color-muted);
  border-color: var(--color-primary);
}

/* Hamburger menu (mobile only) */
.hamburger {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  color: var(--color-foreground);
  cursor: pointer;
  margin-left: var(--space-2);
}
.hamburger:hover {
  background: var(--color-muted);
  border-color: var(--color-primary);
}
.cat-hamburger {
  margin-left: 0 !important;
  margin-right: var(--space-2);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-search-input {
  width: 120px;
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  background: var(--color-muted);
  color: var(--color-foreground);
  outline: none;
  transition: border-color 0.2s, width 0.2s;
}
.header-search-input:focus {
  width: 180px;
  border-color: var(--color-primary);
  background: var(--color-background);
}
.header-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-muted-foreground);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s;
}
.header-search-btn:hover {
  color: var(--color-primary);
}
@media (max-width: 767px) {
  .header-search { display: none; }
}
@media (max-width: 767px) {
  .hamburger { display: inline-flex !important; }
}
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}
.mobile-menu[aria-hidden="false"] {
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu[aria-hidden="true"] .mobile-menu-panel {
  transform: translateX(-100%);
}
.mobile-menu[aria-hidden="true"] .mobile-menu-overlay {
  opacity: 0;
  pointer-events: none;
}
.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.mobile-menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: var(--color-background);
  padding: var(--space-6);
  padding-top: var(--space-8);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  pointer-events: none;
  box-shadow: 4px 0 12px rgba(0,0,0,0.15);
}
.mobile-menu[aria-hidden="false"] .mobile-menu-panel {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-menu[aria-hidden="false"] .mobile-menu-overlay {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--color-foreground);
  cursor: pointer;
  border-radius: var(--radius-md);
}
.mobile-menu-close:hover {
  background: var(--color-muted);
}
.mobile-menu-panel nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-4);
}
.mobile-menu-panel nav a {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--color-foreground);
  text-decoration: none;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  font-weight: var(--font-medium);
}
.mobile-menu-panel nav a:hover {
  background: var(--color-muted);
}
.mobile-menu-panel nav a.active {
  color: var(--color-primary);
  background: var(--color-muted);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-10);
  padding: var(--space-8) 0 var(--space-6);
  background: var(--color-card);
  font-size: var(--text-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-col strong {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--color-primary);
}
.footer-heading {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-foreground);
  margin-bottom: var(--space-1);
}
.footer-col a {
  color: var(--color-muted-foreground);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--duration-fast) var(--ease-out);
}
.footer-col a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-muted-foreground);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: 1;
  color: var(--color-on-primary);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
  text-decoration: none;
  gap: var(--space-2);
}
.btn-primary {
}
.btn-secondary {
  background: transparent;
  color: var(--color-foreground);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-muted);
  border-color: var(--color-muted-foreground);
}
.btn-sm {
  height: 32px;
  min-height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}
.btn-lg {
  height: 48px;
  min-height: 48px;
  padding: 0 var(--space-8);
  font-size: var(--text-base);
}
.btn:hover {
  background: #B91C1C;
  color: var(--color-on-primary);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- Hero Section --- */
.hero h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
  color: var(--color-foreground);
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: var(--text-3xl);
  }
}

/* --- News Grid --- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

/* --- News Card --- */
.news-card {
  display: block;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-decoration: none;
  color: var(--color-card-foreground);
  transition: box-shadow var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}
.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--color-card-foreground);
}
.news-card:active {
  transform: scale(0.98);
}

.news-card .cover {
  height: 140px;
  background: var(--color-muted) center / cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.news-card .cover-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.news-card .cover-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.news-card h3 {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: var(--leading-tight);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .meta,
.meta {
  font-size: var(--text-xs);
  color: var(--color-muted-foreground);
  margin-top: var(--space-2);
}

/* --- Auth Box (Login/Register) --- */
.auth-box {
  max-width: 400px;
  margin: var(--space-10) auto;
  padding: var(--space-8);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.auth-box h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-6);
  text-align: center;
}

.form-group {
  margin-bottom: var(--space-4);
}
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-foreground);
  margin-bottom: var(--space-1);
}

.auth-box input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-foreground);
  background: var(--color-background);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.auth-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.auth-box input.error {
  border-color: var(--color-destructive);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.auth-box input.success {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.auth-box .btn {
  width: 100%;
  margin-top: var(--space-2);
}

.auth-box p {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-muted-foreground);
}
.auth-box p a {
  color: var(--color-accent);
  font-weight: var(--font-medium);
}

.captcha-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.captcha-row input {
  flex: 1;
  margin-bottom: 0;
}
.captcha-row img {
  height: 44px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid var(--color-border);
  transition: opacity 0.2s ease;
  opacity: 1;
}
[data-theme="dark"] .captcha-row img {
  background: #fff;
  padding: 4px;
  border-radius: var(--radius-md);
  border-color: var(--color-border);
}

/* --- Document Pages (About, Privacy, TOS, FAQ) --- */
.doc-page {
  max-width: 760px;
  margin: 0 auto;
}

.doc-page h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-6);
  color: var(--color-foreground);
}

@media (min-width: 768px) {
  .doc-page h1 {
    font-size: var(--text-3xl);
  }
}

.doc-content {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-foreground);
}
.doc-content p {
  margin-bottom: var(--space-4);
}
.doc-content h2 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  color: var(--color-foreground);
}
.doc-content h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--color-foreground);
}
.doc-content ul, .doc-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}
.doc-content li {
  margin-bottom: var(--space-2);
}
.doc-content a {
  color: var(--color-accent);
  text-decoration: underline;
}
.doc-content a:hover {
  color: var(--color-primary);
}

/* --- FAQ Items --- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}
.faq-item h3 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
  color: var(--color-foreground);
}
.faq-item div {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-muted-foreground);
}

/* --- Shop Grid --- */
.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

@media (min-width: 768px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
}

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

/* --- Shop Item --- */
.shop-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow var(--duration-normal) var(--ease-out);
}
.shop-item:hover {
  box-shadow: var(--shadow-md);
}
.shop-item h3 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}
.shop-item p {
  font-size: var(--text-sm);
  color: var(--color-muted-foreground);
  margin-bottom: var(--space-2);
  line-height: var(--leading-relaxed);
}
.shop-item .price {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--color-primary);
  margin: var(--space-3) 0;
}
.shop-item .btn {
  width: 100%;
}

/* --- Announcement Items --- */
.ann-item {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}
.ann-item h3 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}
.ann-item div {
  font-size: var(--text-sm);
  color: var(--color-muted-foreground);
  line-height: var(--leading-relaxed);
}

/* --- Search Page --- */
.search-box {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.search-box input {
  flex: 1;
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  background: var(--color-background);
  color: var(--color-foreground);
  transition: border-color var(--duration-fast) var(--ease-out);
}
.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.search-box .btn {
  flex-shrink: 0;
}

#search-results .news-card {
  margin-bottom: var(--space-3);
}

/* --- News Detail --- */
.news-detail {
  max-width: 800px;
  margin: 0 auto;
}
.news-detail h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
  color: var(--color-foreground);
}
@media (min-width: 768px) {
  .news-detail h1 {
    font-size: var(--text-3xl);
  }
}
.news-detail .meta {
  font-size: var(--text-sm);
  color: var(--color-muted-foreground);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.news-detail .cover {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-muted) center / cover no-repeat;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}
.news-detail .cover-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
}
.news-detail .cover-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}
.news-detail .content {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-foreground);
}
.news-detail .content p {
  margin-bottom: var(--space-4);
}
.news-detail .content img {
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
}
.news-detail .actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
}

/* --- Profile Page --- */
.profile-page {
  max-width: 600px;
  margin: 0 auto;
}
.profile-page .profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.profile-page .avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--color-muted);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-primary);
  flex-shrink: 0;
}
.profile-page h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-1);
}
.profile-page .profile-meta {
  font-size: var(--text-sm);
  color: var(--color-muted-foreground);
}
.profile-page .profile-info {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.profile-page .info-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.profile-page .info-row:last-child {
  border-bottom: none;
}
.profile-page .info-label {
  color: var(--color-muted-foreground);
}
.profile-page .info-value {
  color: var(--color-foreground);
  font-weight: var(--font-medium);
}

/* --- Error Messages --- */
.error {
  color: var(--color-destructive);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

/* --- Spinner Component --- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Skeleton Loader --- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-muted) 25%,
    var(--color-border) 50%,
    var(--color-muted) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-md);
}

/* --- Touch Optimization --- */
@media (pointer: coarse) {
  .btn, .site-header nav.desktop-nav a, .news-card {
    min-height: 44px;
  }
  .site-header nav.desktop-nav a {
    padding: var(--space-3);
  }
  .news-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  .btn:hover {
    background: var(--color-primary);
  }
}

/* --- Responsive: Mobile < 768px --- */
@media (max-width: 767px) {
  .site-header .container {
    height: 56px;
  }
  .logo {
    font-size: var(--text-lg);
  }
  .news-card .cover {
    height: 120px;
  }
  .btn {
    height: 48px;
  }
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-foreground);
  background: var(--color-card);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
}
.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.pagination .active {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}
.pagination .disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-muted-foreground);
}
.breadcrumbs a {
  color: var(--color-muted-foreground);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.breadcrumbs a:hover {
  color: var(--color-primary);
}
.breadcrumbs .sep {
  color: var(--color-border);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--color-muted-foreground);
}
.empty-state svg {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  opacity: 0.4;
}
.empty-state h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  color: var(--color-foreground);
  margin-bottom: var(--space-2);
}
.empty-state p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

/* --- Category Tabs --- */
.category-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-1);
}
.category-tabs::-webkit-scrollbar {
  display: none;
}
.category-tabs a {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-muted-foreground);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
}
.category-tabs a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.category-tabs a.active {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}

/* --- Page Header --- */
.page-header {
  margin-bottom: var(--space-6);
}
.page-header h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-foreground);
  margin-bottom: var(--space-2);
}
@media (min-width: 768px) {
  .page-header h1 {
    font-size: var(--text-3xl);
  }
}
.page-header p {
  font-size: var(--text-base);
  color: var(--color-muted-foreground);
}

/* --- Sidebar --- */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 1024px) {
  .page-with-sidebar {
    grid-template-columns: 1fr 300px;
  }
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.sidebar-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.sidebar-card h3 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-foreground);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.sidebar-card .hot-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--color-foreground);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color var(--duration-fast) var(--ease-out);
}
.sidebar-card .hot-item:last-child {
  border-bottom: none;
}
.sidebar-card .hot-item:hover {
  color: var(--color-primary);
}
.sidebar-card .hot-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  flex-shrink: 0;
}
.sidebar-card .hot-num.top { background: var(--color-primary); color: var(--color-on-primary); }
.sidebar-card .hot-num.mid { background: var(--color-warning); color: #fff; }
.sidebar-card .hot-num.low { background: var(--color-muted); color: var(--color-muted-foreground); }

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 150;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--color-muted);
  border-color: var(--color-primary);
}
@media (max-width: 767px) {
  .back-to-top { bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

/* --- Tab Bar (Mobile Bottom Nav) --- */
.tab-bar {
  display: none;
}
@media (max-width: 767px) {
  .tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--color-card);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 100;
  }
  .tab-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: var(--color-muted-foreground);
    text-decoration: none;
    padding: var(--space-1) var(--space-2);
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    transition: color var(--duration-fast) var(--ease-out);
  }
  .tab-bar a svg {
    width: 22px;
    height: 22px;
  }
  .tab-bar a.active {
    color: var(--color-primary);
  }
  main.container {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }
  .site-footer {
    display: none;
  }
}

/* --- Article Actions (Share/Like) --- */
.article-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.article-actions .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-foreground);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.article-actions .btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.toast {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: #fff;
  animation: toast-in 300ms ease-out;
  max-width: 360px;
}
.toast.success { background: var(--color-success); }
.toast.error { background: var(--color-destructive); }
.toast.info { background: var(--color-info); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Skeleton Loading --- */
.skeleton-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.skeleton-card .skeleton-cover {
  height: 140px;
  margin-bottom: var(--space-3);
}
.skeleton-card .skeleton-title {
  height: 16px;
  width: 80%;
  margin-bottom: var(--space-2);
}
.skeleton-card .skeleton-meta {
  height: 12px;
  width: 50%;
}

/* --- Responsive: Large Desktop ≥ 1440px --- */
@media (min-width: 1440px) {
  .container {
    max-width: 1440px;
  }
  .news-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .shop-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Skip Link (a11y) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 10000;
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-md);
  font-weight: var(--font-bold);
  text-decoration: none;
  transition: top var(--duration-fast) var(--ease-out);
}
.skip-link:focus {
  top: var(--space-4);
}

/* --- Screen Reader Only (a11y) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Button Loading State --- */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}
.btn-loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: var(--space-2);
  vertical-align: middle;
}

/* --- Confirm Dialog --- */
.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fade-in 150ms ease-out;
}
.confirm-dialog {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: dialog-in 200ms var(--ease-spring);
}
.confirm-dialog h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}
.confirm-dialog p {
  font-size: var(--text-sm);
  color: var(--color-muted-foreground);
  margin-bottom: var(--space-6);
}
.confirm-dialog-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes dialog-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-muted-foreground);
}
@media (pointer: coarse) {
  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}

/* --- Password Toggle --- */
.password-wrapper {
  position: relative;
}
.password-wrapper input {
  padding-right: var(--space-10);
}
.password-toggle {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-muted-foreground);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.password-toggle:hover {
  color: var(--color-foreground);
}

/* --- Error Message Area --- */
.error-message {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--color-destructive);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  display: none;
}
.error-message.visible {
  display: block;
}

/* --- Profile Tabs --- */
.profile-tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}
.profile-tabs button {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-muted-foreground);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.profile-tabs button:hover {
  color: var(--color-foreground);
}
.profile-tabs button.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* --- Follow Button --- */
.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.follow-btn.following {
  background: var(--color-muted);
  color: var(--color-muted-foreground);
  border: 1px solid var(--color-border);
}
.follow-btn:not(.following) {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border: 1px solid var(--color-primary);
}

/* --- Comment Section --- */
.comments-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* ===== Weather Page ===== */
.weather-page {
  min-height: 60vh;
  background: var(--weather-bg, var(--color-background));
  transition: background 0.5s ease;
}
.weather-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--weather-accent, none);
  pointer-events: none;
  z-index: 0;
  transition: background 0.8s ease;
}
.weather-page .skeleton { margin-bottom: var(--space-3); }
.weather-container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-4);
}
.weather-header {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
}
.weather-search-wrap {
  flex: 1;
  position: relative;
}
.weather-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  background: var(--color-background);
  color: var(--color-foreground);
  outline: none;
  box-sizing: border-box;
}
.weather-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
}
.weather-search-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
}
.weather-search-item {
  padding: 10px 14px;
  font-size: var(--text-sm);
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
}
.weather-search-item:hover,
.weather-search-item.weather-search-active { background: var(--color-accent-bg, #fef2f2); }
.weather-search-item:last-child { border-bottom: none; }
.weather-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.weather-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  color: var(--color-muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.weather-btn:hover {
  background: var(--color-accent-bg, #fef2f2);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.weather-btn svg { width: 16px; height: 16px; }
.weather-btn.fav-active { color: #f59e0b; border-color: #f59e0b; }
.weather-fav-bar {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.weather-fav-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--color-foreground);
}
.weather-fav-chip.active { border-color: var(--color-primary); color: var(--color-primary); }
.weather-fav-chip:hover { border-color: var(--color-primary); }
.weather-chip-remove {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted-foreground);
  padding: 0;
  margin-left: 2px;
  opacity: 0.6;
}
.weather-chip-remove svg { width: 12px; height: 12px; }
.weather-fav-chip svg { width: 14px; height: 14px; }
.weather-chip-remove:hover { opacity: 1; color: var(--color-destructive, #ef4444); }

/* Grid layout */
.weather-layout.weather-grids,
.weather-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (max-width: 767px) {
  .weather-layout { gap: var(--space-3) 0; }
}
@media (min-width: 768px) {
  .weather-layout.weather-grids,
  .weather-layout { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .weather-container { max-width: 1040px; }
}

/* Cards */
.weather-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  min-width: 0;
}
[data-theme="dark"] .weather-card {
  background: var(--color-card);
}
.weather-card-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted-foreground);
  margin-bottom: var(--space-3);
}
.weather-card-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.weather-card-title-row .weather-card-title { margin-bottom: 0; }
.hourly-remind {
  font-size: var(--text-xs);
  color: var(--color-destructive);
  font-weight: 500;
}

/* Current */
.weather-current { text-align: center; }
.weather-hourly { grid-column: 1 / -1; }
.current-top { margin-bottom: var(--space-3); }
.current-city { font-size: var(--text-lg); font-weight: 700; }
.current-update { font-size: var(--text-xs); color: var(--color-muted-foreground); margin-top: 2px; }
.current-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.current-icon svg { width: 72px; height: 72px; }
.current-temp-wrap { text-align: left; }
.current-temp { font-size: 56px; font-weight: 300; line-height: 1; }
.current-desc { font-size: var(--text-base); color: var(--color-muted-foreground); margin-top: 4px; }
.current-range { font-size: var(--text-xs); color: var(--color-muted-foreground); margin-top: 4px; }
.current-extra {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-muted-foreground);
}

/* --- Weather Icon Animations (SMIL — defined in SVG, CSS kept for reference) --- */

/* Hourly */
.hourly-scroll {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  width: 100%;
  min-width: 0;
  padding-bottom: var(--space-2);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.hourly-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: background 0.15s;
}
.hourly-item:hover,
.hourly-item:active,
.hourly-item:focus-visible { background: var(--color-accent-bg); }
.hourly-item:focus-visible { outline: 2px solid var(--color-ring); outline-offset: -2px; }
.hourly-time { font-size: var(--text-xs); color: var(--color-muted-foreground); }
.hourly-icon svg { width: 28px; height: 28px; }
.hourly-temp { font-size: var(--text-sm); font-weight: 600; }
.hourly-precip { font-size: var(--text-xs); color: var(--color-primary); }

/* Daily */
.daily-list { display: flex; flex-direction: column; gap: 0; }
.daily-row {
  display: grid;
  grid-template-columns: 64px 36px 1fr 40px;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}
.daily-row:last-child { border-bottom: none; }
.daily-name { font-size: var(--text-sm); font-weight: 500; }
.daily-date { font-size: var(--text-xs); color: var(--color-muted-foreground); }
.daily-icon svg { width: 24px; height: 24px; }
.daily-temp-col {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
}
.daily-temp-bar {
  flex: 1;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}
.daily-temp-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-primary), #f97316);
}
.daily-precip { text-align: right; }
.daily-precip-text { font-size: var(--text-xs); color: var(--color-primary); }
.daily-sunshine { display:block; font-size: var(--text-xs); color: var(--color-muted-foreground); margin-top: 2px; }

/* Detail row */
.weather-detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
@media (min-width: 768px) { .weather-detail-row { grid-template-columns: repeat(3, 1fr); } }
.weather-detail-card {
  padding: var(--space-3);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
[data-theme="dark"] .weather-detail-card {
  background: var(--color-card);
}
.detail-label {
  font-size: var(--text-xs);
  color: var(--color-muted-foreground);
  margin-bottom: var(--space-1);
  display: flex;
  align-items: center;
  gap: 4px;
}
.detail-label svg { width: 16px; height: 16px; }
.detail-value {
  font-size: var(--text-sm);
  font-weight: 600;
}
.rise-set-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  margin-top: 2px;
}
.rise-set-row svg { width: 14px; height: 14px; }

/* Wind compass */
.weather-wind-card { text-align: center; }
.wind-compass-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.wind-dir-text { font-size: var(--text-sm); font-weight: 500; }

/* Chart */
.weather-chart-card { grid-column: 1 / -1; }
.chart-wrap { width: 100%; }
.chart-wrap canvas { border-radius: var(--radius-sm); }

/* Loading & Error */
.weather-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8);
  color: var(--color-muted-foreground);
}
.weather-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: weather-spin 0.8s linear infinite;
}
@keyframes weather-spin { to { transform: rotate(360deg); } }
.weather-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8);
  color: var(--color-muted-foreground);
  text-align: center;
}

/* Scrollbar */
.hourly-scroll::-webkit-scrollbar { height: 3px; }
.hourly-scroll::-webkit-scrollbar-track { background: transparent; }
.hourly-scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
.hourly-scroll::-webkit-scrollbar-thumb:hover { background: var(--color-muted-foreground); }

/* Load more button */
.load-more {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 20px 0;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  background: transparent;
  color: var(--color-primary);
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.load-more:hover {
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.load-more:disabled {
  cursor: wait;
  opacity: 0.6;
  background: transparent;
  color: var(--color-muted-foreground);
}
