:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #06b6d4;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* Header */
#site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.main-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.main-nav a:hover { color: var(--primary); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width .2s;
}
.main-nav a:hover::after { width: 100%; }
.header-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.user-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 999px;
}

.icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: currentColor;
  vertical-align: middle;
}
.icon svg { width: 100%; height: 100%; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.btn-ghost {
  background: #fff;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--primary); border-color: var(--primary); }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: #dcfce7; color: #15803d; }
.btn-success:hover { background: #bbf7d0; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* Main */
main { flex: 1; }
.page-section { padding: 48px 0; }
.page-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
}
.page-subtitle {
  color: var(--text-secondary);
  margin: 0 0 28px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(37,99,235,0.10) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  position: relative;
}
.hero-content { max-width: 580px; }
.hero h1 {
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}
.hero h1 span {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 28px;
}
.hero-actions { display: flex; gap: 14px; }
.hero-visual {
  width: 380px;
  flex-shrink: 0;
}
.hero-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero-card .stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.hero-card .stat {
  flex: 1;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.hero-card .stat .num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}
.hero-card .stat .label { font-size: 13px; color: var(--text-muted); }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}
.card-body { padding: 20px; }
.card-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.4;
}
.card-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
}
.tag svg { width: 13px; height: 13px; }

/* Grids */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; }
  .hero-visual { width: 100%; }
  .main-nav { display: none; }
  .hero h1 { font-size: 30px; }
}

/* Listing card image */
.listing-thumb {
  aspect-ratio: 16/10;
  background: var(--bg);
  overflow: hidden;
}
.listing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.card:hover .listing-thumb img { transform: scale(1.04); }

/* Category pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
}
.category-pill:hover { border-color: var(--primary); color: var(--primary); }
.category-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}
.category-pill svg { width: 16px; height: 16px; }

/* Detail */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
}
.detail-main { min-width: 0; }
.detail-sidebar { position: sticky; top: 90px; align-self: start; }
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.detail-gallery img {
  width: 100%;
  border-radius: var(--radius-sm);
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--bg);
}
.detail-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 14px;
}
.detail-body {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.detail-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}
.contact-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.contact-card h3 {
  font-size: 17px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.contact-item-row:last-child { border-bottom: none; }
.contact-mask {
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #166534;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}
.review-badge svg { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}

/* Forms */
.form-card {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.form-group .required { color: #dc2626; margin-left: 2px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.checkbox-group input { width: auto; margin-top: 3px; }
.checkbox-group a { color: var(--primary); text-decoration: underline; }

/* Image picker */
.image-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.image-picker label {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
}
.image-picker label:has(input:checked) { border-color: var(--primary); }
.image-picker img { width: 100%; height: 100%; object-fit: cover; }
.image-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.image-picker .check {
  position: absolute;
  top: 6px; right: 6px;
  width: 20px; height: 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}
.image-picker label:has(input:checked) .check { display: flex; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state h3 { color: var(--text); margin-bottom: 8px; }

/* About page */
.about-hero {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  padding: 64px 0;
  text-align: center;
}
.about-hero h1 { font-size: 34px; margin: 0 0 12px; }
.about-hero p { color: var(--text-secondary); margin: 0; font-size: 17px; }
.about-content {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  margin-top: -30px;
  position: relative;
}
.about-content p { color: var(--text-secondary); line-height: 1.9; margin-bottom: 16px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.info-grid .info-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.info-grid .info-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.info-grid .info-value { font-size: 15px; font-weight: 600; color: var(--text); }

/* Policy pages */
.policy-body {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
}
.policy-body h2 { font-size: 20px; margin-top: 32px; }
.policy-body p, .policy-body li { color: var(--text-secondary); line-height: 1.8; }

/* Admin */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.admin-tabs button {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
}
.admin-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-table {
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-collapse: collapse;
}
.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.admin-table th { background: var(--bg); color: var(--text-muted); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
.status-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-pill.pending { background: #fef3c7; color: #92400e; }
.status-pill.approved { background: #dcfce7; color: #166534; }
.status-pill.rejected { background: #fee2e2; color: #991b1b; }
.admin-actions { display: flex; gap: 8px; }
.admin-actions .btn { padding: 6px 12px; font-size: 13px; }

/* Footer */
#site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: auto;
}
.footer-inner { display: flex; flex-direction: column; gap: 28px; }
.footer-main { display: flex; gap: 24px; align-items: flex-start; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.footer-desc {
  max-width: 460px;
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-contact .contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.icp-link {
  color: var(--text-muted);
  transition: color .2s;
}
.icp-link:hover { color: var(--primary); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.pagination button {
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .5; cursor: not-allowed; }

/* Toast */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #0f172a;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #b91c1c; }
.toast.success { background: #15803d; }
