/* ========================================
   Cat Password (喵密) - 网站样式
   ======================================== */

:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #ede9fe;
  --accent: #f59e0b;
  --bg: #f6f7fb;
  --bg-card: #ffffff;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(124,58,237,0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ── */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

.btn-nav {
  background: var(--primary);
  color: white !important;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px !important;
}

.btn-nav:hover { background: var(--primary-dark) !important; }

/* ── Container ── */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
  flex: 1;
}

.container-wide { max-width: 960px; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.card-sm { padding: 20px; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg-card);
  color: var(--text);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(124, 58, 237, 0.3); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg); }

.btn-block { display: flex; width: 100%; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 60px 20px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero .subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Feature Grid ── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 40px 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.feature-icon { font-size: 36px; margin-bottom: 12px; }

.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }

.feature-card p { font-size: 13px; color: var(--text-secondary); }

/* ── Alert ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-info { background: var(--primary-light); color: var(--primary); border: 1px solid #c4b5fd; }

/* ── Status Badge ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.badge-active { background: #d1fae5; color: #065f46; }
.badge-expired { background: #fef3c7; color: #92400e; }
.badge-none { background: #f3f4f6; color: #6b7280; }

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Auth Pages ── */
.auth-page {
  max-width: 400px;
  margin: 60px auto;
  padding: 0 20px;
}

.auth-page .card { text-align: center; }

.auth-page h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }

.auth-page .form { text-align: left; margin-top: 20px; }

.auth-footer { margin-top: 16px; font-size: 14px; color: var(--text-secondary); }
.auth-footer a { color: var(--primary); text-decoration: none; }

/* ── Subscribe ── */
.sub-plan {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  max-width: 360px;
  margin: 0 auto;
}

.sub-plan.featured { border-color: var(--primary); background: var(--primary-light); }

.sub-plan .price { font-size: 48px; font-weight: 800; color: var(--primary); }
.sub-plan .price-unit { font-size: 18px; color: var(--text-secondary); }

.sub-plan .features-list { list-style: none; padding: 0; margin: 20px 0; }
.sub-plan .features-list li { padding: 8px 0; font-size: 14px; color: var(--text-secondary); }

/* ── Account ── */
.account-info dt { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.account-info dd { font-size: 16px; font-weight: 500; margin-bottom: 16px; }

/* ── Admin ── */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--bg); padding: 4px; border-radius: var(--radius-sm); }

.admin-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.admin-tab.active { background: var(--bg-card); color: var(--text); font-weight: 500; box-shadow: var(--shadow); }

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table th, .admin-table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.admin-table th { font-weight: 600; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); }

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ── About --- */
.about-section { margin-bottom: 32px; }
.about-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.about-section p { font-size: 15px; color: var(--text-secondary); line-height: 1.8; }
.quote-block {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--text);
}

/* ── Comparison Modal (for extension) ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal h3 { font-size: 18px; margin-bottom: 16px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .navbar { padding: 10px 16px; }
  .container { padding: 24px 16px; }
  .features { grid-template-columns: 1fr; }
}
