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

:root {
  --color-primary: #1e293b;
  --color-secondary: #0d9488;
  --color-accent: #f59e0b;
  --color-bg: #ffffff;
  --color-bg-light: #f8fafc;
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-mono: "Inter", system-ui, monospace;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: #0f766e; }

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

h1, h2, h3, h4 { line-height: 1.3; color: var(--color-primary); }
h1 { font-size: 36px; font-weight: 700; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }

/* ===== Header / Navigation ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
}

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

.nav-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 15px;
  color: var(--color-text-secondary);
  border-radius: 6px;
  transition: var(--transition);
  font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--color-secondary);
  background: rgba(13,148,136,0.06);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--color-secondary);
  color: white;
}
.btn-primary:hover {
  background: #0f766e;
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--color-accent);
  color: white;
}
.btn-accent:hover {
  background: #d97706;
  color: white;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-secondary);
  border: 1.5px solid var(--color-secondary);
}
.btn-outline:hover {
  background: rgba(13,148,136,0.06);
  color: #0f766e;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  padding: 8px 14px;
}
.btn-ghost:hover {
  color: var(--color-secondary);
  background: rgba(13,148,136,0.06);
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ===== Mobile Menu ===== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text);
}

.mobile-toggle svg { width: 24px; height: 24px; }

/* ===== Main Content ===== */
.main-content {
  padding-top: 68px;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  margin-bottom: 12px;
}

.section-title p {
  color: var(--color-text-secondary);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Hero Banner ===== */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30,41,59,0.85) 0%, rgba(13,148,136,0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 700px;
  padding: 0 24px;
}

.hero-content h1 {
  color: white;
  font-size: 44px;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-content p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.7;
}

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

/* ===== Cards ===== */
.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13,148,136,0.2);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.card-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-text-muted);
}

.card-publisher {
  font-size: 12px;
  color: var(--color-text-secondary);
}

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

/* ===== Service List ===== */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.service-item {
  display: flex;
  gap: 24px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.service-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13,148,136,0.2);
}

.service-item-img {
  width: 240px;
  height: 160px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.service-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-item-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.service-item-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.service-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-contact {
  font-size: 14px;
  color: var(--color-text-muted);
}

.service-contact .phone {
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.phone-masked {
  color: var(--color-accent);
  font-size: 13px;
  cursor: pointer;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.breadcrumb a { color: var(--color-text-secondary); }
.breadcrumb a:hover { color: var(--color-secondary); }
.breadcrumb .sep { color: var(--color-border); }

/* ===== Detail Page ===== */
.detail-hero {
  display: flex;
  gap: 40px;
  padding: 40px 0;
}

.detail-hero-img {
  width: 480px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
}

.detail-hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-hero-info h1 {
  font-size: 32px;
  margin-bottom: 16px;
}

.detail-hero-info .desc {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.detail-contact-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.detail-contact-card h3 {
  margin-bottom: 16px;
  font-size: 16px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.contact-list .name {
  font-weight: 600;
  color: var(--color-primary);
  min-width: 80px;
}

.contact-list .phone {
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
}

/* ===== Forms ===== */
.form-page {
  max-width: 480px;
  margin: 60px auto;
  padding: 0 24px;
}

.form-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-card h2 {
  text-align: center;
  margin-bottom: 8px;
}

.form-card .subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: white;
  color: var(--color-text);
  transition: var(--transition);
  font-family: var(--font-family);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-actions {
  margin-top: 28px;
}

.form-actions .btn {
  width: 100%;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.form-footer a {
  color: var(--color-secondary);
  font-weight: 500;
}

/* ===== Help Page ===== */
.help-layout {
  display: flex;
  gap: 40px;
  padding: 40px 0;
}

.help-sidebar {
  width: 240px;
  flex-shrink: 0;
}

.help-sidebar-nav {
  list-style: none;
  position: sticky;
  top: 88px;
}

.help-sidebar-nav li a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-radius: var(--radius);
  margin-bottom: 4px;
  transition: var(--transition);
}

.help-sidebar-nav li a:hover,
.help-sidebar-nav li a.active {
  color: var(--color-secondary);
  background: rgba(13,148,136,0.06);
}

.help-content {
  flex: 1;
  min-width: 0;
}

.help-content h2 {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}

.help-content h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.help-content p {
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.help-content ul, .help-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.help-content li {
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  line-height: 1.7;
}

.help-content .warning-box {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: #92400e;
}

.help-content .info-box {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: #134e4a;
}

/* ===== About Page ===== */
.about-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.about-hero h1 {
  margin-bottom: 16px;
}

.about-hero p {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.about-section {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.about-section h2 {
  margin-bottom: 20px;
}

.about-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.about-info-item {
  padding: 20px;
  background: var(--color-bg-light);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.about-info-item .label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.about-info-item .value {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-primary);
}

/* ===== Publish Page ===== */
.publish-page {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 24px;
}

.publish-page h1 {
  margin-bottom: 8px;
}

.publish-page .subtitle {
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

.publish-form {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.publish-form .form-row {
  display: flex;
  gap: 16px;
}

.publish-form .form-row .form-group {
  flex: 1;
}

.price-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  font-size: 14px;
  color: #92400e;
  margin-bottom: 20px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}

.footer-brand h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 14px;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 40px;
}

.footer-links-col h4 {
  color: white;
  font-size: 14px;
  margin-bottom: 12px;
}

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

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

.footer-links-col a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: var(--transition);
}

.footer-links-col a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover {
  color: white;
}

/* ===== Login Prompt Overlay ===== */
.login-prompt {
  background: linear-gradient(135deg, rgba(13,148,136,0.05), rgba(245,158,11,0.05));
  border: 1px dashed var(--color-secondary);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 12px 0;
}

.login-prompt a {
  color: var(--color-secondary);
  font-weight: 600;
}

/* ===== Page Header ===== */
.page-header {
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
  padding: 40px 0;
}

.page-header h1 {
  margin-bottom: 8px;
}

.page-header p {
  color: var(--color-text-secondary);
  font-size: 16px;
}

/* ===== Category Tabs ===== */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.category-tab:hover,
.category-tab.active {
  color: white;
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--color-border);
    padding: 16px;
    box-shadow: var(--shadow-lg);
  }
  
  .hero { height: 400px; }
  .hero-content h1 { font-size: 30px; }
  .hero-content p { font-size: 16px; }
  
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  
  .service-item { flex-direction: column; }
  .service-item-img { width: 100%; height: 200px; }
  
  .detail-hero { flex-direction: column; }
  .detail-hero-img { width: 100%; }
  
  .help-layout { flex-direction: column; }
  .help-sidebar { width: 100%; }
  .help-sidebar-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  
  .about-info { grid-template-columns: 1fr; }
  
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  
  .publish-form .form-row { flex-direction: column; gap: 0; }
  
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* ===== QR Code Payment ===== */
.payment-section {
  text-align: center;
  padding: 32px;
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin: 24px 0;
}

.payment-section .qr-placeholder {
  width: 200px;
  height: 200px;
  margin: 16px auto;
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ===== Tag ===== */
.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  background: rgba(13,148,136,0.08);
  color: var(--color-secondary);
}

/* ===== User Info Bar ===== */
.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-bar .username {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.user-bar .username:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ===== Agreement Pages ===== */
.agreement-page {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 24px;
}

.agreement-page h1 {
  text-align: center;
  margin-bottom: 8px;
}

.agreement-page .update-date {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}

.agreement-page h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 20px;
}

.agreement-page p {
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  line-height: 1.8;
}

.agreement-page ol, .agreement-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.agreement-page li {
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  line-height: 1.7;
}

/* ===== Custom Checkbox ===== */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  background: white;
  transition: var(--transition);
  position: relative;
  display: inline-block;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus-visible + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
}

.checkbox-text {
  flex: 1;
  min-width: 0;
}

.checkbox-text a {
  color: var(--color-secondary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
