/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; line-height: 1.7; scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
  background: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: #3b7ddd; text-decoration: none; transition: color .2s; }
a:hover { color: #1a3a6b; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
h1 { font-size: 28px; font-weight: 700; color: #1a3a6b; margin-bottom: 16px; }
h2 { font-size: 22px; font-weight: 600; color: #1a3a6b; margin-bottom: 12px; }
h3 { font-size: 18px; font-weight: 600; color: #1f2937; margin-bottom: 10px; }
p { margin-bottom: 12px; }

/* ===== Top Bar ===== */
.top-bar {
  background: #1a3a6b;
  color: #fff;
  font-size: 13px;
  height: 36px;
  line-height: 36px;
}
.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar-left { opacity: .8; font-size: 12px; }
.top-bar-right { display: flex; gap: 6px; align-items: center; }
.top-bar-right a {
  color: #fff;
  opacity: .85;
  padding: 0 8px;
  font-size: 13px;
  transition: opacity .2s;
}
.top-bar-right a:hover { opacity: 1; }
.top-bar-right .sep { opacity: .3; }
.top-bar-right .user-info { color: #d4a843; font-weight: 500; }
.top-bar-right .btn-logout {
  cursor: pointer;
  color: #fff;
  opacity: .7;
  font-size: 12px;
  background: none;
  border: none;
  padding: 0 6px;
}
.top-bar-right .btn-logout:hover { opacity: 1; }

/* ===== Header / Navbar ===== */
.header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #1a3a6b;
  white-space: nowrap;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: #1a3a6b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.nav { display: flex; gap: 0; }
.nav a {
  display: block;
  padding: 0 18px;
  line-height: 64px;
  color: #1f2937;
  font-size: 15px;
  font-weight: 500;
  position: relative;
  transition: color .2s;
}
.nav a:hover { color: #3b7ddd; }
.nav a.active { color: #3b7ddd; }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background: #3b7ddd;
  border-radius: 2px 2px 0 0;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #1a3a6b;
  cursor: pointer;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
}

/* ===== Hero / Banner ===== */
.hero {
  background: #1a3a6b;
  color: #fff;
  padding: 60px 40px;
  border-radius: 8px;
  margin-bottom: 40px;
  text-align: center;
}
.hero h1 { color: #fff; font-size: 32px; margin-bottom: 16px; }
.hero p { color: rgba(255,255,255,.8); font-size: 16px; max-width: 600px; margin: 0 auto; }

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.card {
  background: #fff;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
  border: 1px solid #e5e7eb;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.card h3 a { color: #1f2937; }
.card h3 a:hover { color: #3b7ddd; }
.card p { color: #6b7280; font-size: 14px; line-height: 1.7; }
.card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
  color: #6b7280;
}
.card .card-tag {
  display: inline-block;
  background: #eef3fb;
  color: #3b7ddd;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 12px;
}
.card .card-link {
  color: #3b7ddd;
  font-size: 14px;
  font-weight: 500;
}

/* ===== Section ===== */
.section { margin-bottom: 40px; }
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a3a6b;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #3b7ddd;
  display: inline-block;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.section-header .more-link {
  font-size: 14px;
  color: #6b7280;
}
.section-header .more-link:hover { color: #3b7ddd; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
}
.breadcrumb a { color: #6b7280; }
.breadcrumb a:hover { color: #3b7ddd; }
.breadcrumb .sep { margin: 0 8px; opacity: .5; }

/* ===== Detail Page ===== */
.detail-content {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border: 1px solid #e5e7eb;
}
.detail-content h1 { font-size: 26px; margin-bottom: 20px; }
.detail-content .detail-meta {
  display: flex;
  gap: 24px;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}
.detail-content .detail-body { line-height: 1.9; color: #374151; }
.detail-content .detail-body p { margin-bottom: 16px; }
.detail-content .detail-body h3 { margin-top: 24px; margin-bottom: 12px; }
.detail-content .detail-body ul { padding-left: 20px; margin-bottom: 16px; }
.detail-content .detail-body ul li {
  list-style: disc;
  margin-bottom: 8px;
  color: #374151;
}

/* ===== Publisher Info ===== */
.publisher-info {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 16px;
  margin-bottom: 24px;
  font-size: 14px;
}
.publisher-info .label { color: #6b7280; margin-right: 8px; }
.publisher-info .phone-mask { color: #d4a843; font-weight: 500; }
.publisher-info .login-hint {
  color: #3b7ddd;
  font-size: 13px;
  margin-left: 12px;
}
.publisher-info .login-hint a { color: #3b7ddd; text-decoration: underline; }

/* ===== Form ===== */
.form-container {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border: 1px solid #e5e7eb;
  max-width: 680px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 6px;
}
.form-group label .required { color: #e53e3e; margin-left: 2px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2937;
  transition: border-color .2s;
  background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b7ddd;
  box-shadow: 0 0 0 3px rgba(59,125,221,.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-agreement .checkbox-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: normal;
  color: #1f2937;
  cursor: pointer;
}
.form-agreement .checkbox-label input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
}
.form-agreement .checkbox-label a {
  color: #3b7ddd;
  text-decoration: none;
}
.form-agreement .checkbox-label a:hover {
  text-decoration: underline;
}
.form-actions { margin-top: 28px; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  font-family: inherit;
  text-align: center;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: #1a3a6b;
  color: #fff;
}
.btn-primary:hover { background: #15305a; color: #fff; }
.btn-accent {
  background: #d4a843;
  color: #fff;
}
.btn-accent:hover { background: #c09535; color: #fff; }
.btn-outline {
  background: transparent;
  color: #3b7ddd;
  border: 1px solid #3b7ddd;
}
.btn-outline:hover { background: #eef3fb; color: #3b7ddd; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

/* ===== Auth Pages ===== */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}
.auth-box {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border: 1px solid #e5e7eb;
  width: 100%;
  max-width: 420px;
}
.auth-box h1 { text-align: center; margin-bottom: 28px; font-size: 24px; }
.auth-box .auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6b7280;
}
.auth-box .auth-footer a { color: #3b7ddd; }

/* ===== User Center ===== */
.user-card {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 24px;
}
.balance-display {
  text-align: center;
  padding: 24px;
  background: #f5f7fa;
  border-radius: 8px;
  margin-bottom: 24px;
}
.balance-display .amount {
  font-size: 36px;
  font-weight: 700;
  color: #d4a843;
}
.balance-display .unit { font-size: 16px; color: #6b7280; margin-left: 4px; }
.recharge-section { margin-top: 24px; }
.recharge-section h3 { margin-bottom: 16px; }
.qr-placeholder {
  width: 200px;
  height: 200px;
  margin: 20px auto;
  background: #f5f7fa;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  flex-direction: column;
  gap: 8px;
}

/* ===== Privacy ===== */
.privacy-content {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border: 1px solid #e5e7eb;
}
.privacy-content h2 { margin-top: 28px; }
.privacy-content p { color: #374151; line-height: 1.9; }

/* ===== Footer ===== */
.footer {
  background: #1a2332;
  color: rgba(255,255,255,.6);
  padding: 32px 20px;
  text-align: center;
  font-size: 13px;
  line-height: 2;
  margin-top: auto;
}
.footer a { color: rgba(255,255,255,.7); }
.footer a:hover { color: #fff; }
.footer .footer-links { margin-bottom: 8px; }
.footer .footer-links a { margin: 0 10px; }

/* ===== Alert / Toast ===== */
.alert {
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-info { background: #eef3fb; color: #3b7ddd; border: 1px solid #d0e0f5; }
.alert-warning { background: #fef9e7; color: #b7791f; border: 1px solid #f6e7a4; }
.alert-success { background: #ecfdf5; color: #276749; border: 1px solid #c6f6d5; }

/* ===== Publish Page ===== */
.publish-notice {
  background: #fef9e7;
  border: 1px solid #f6e7a4;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #92400e;
}
.publish-notice strong { color: #b7791f; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .card-grid, .card-grid-2 { grid-template-columns: 1fr; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    z-index: 99;
  }
  .nav.open a { line-height: 48px; padding: 0 20px; }
  .mobile-menu-btn { display: block; }
  .hero { padding: 40px 20px; }
  .hero h1 { font-size: 24px; }
  .detail-content, .form-container, .privacy-content { padding: 24px; }
  .top-bar-left { display: none; }
  .header-inner { position: relative; }
}
