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

:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #14b8a6;
  --orange: #f97316;
  --bg: #f7f8fa;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--teal-dark);
}

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

.header-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: var(--teal);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 20px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.logo-text small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
}

.btn-outline:hover {
  background: var(--teal);
  color: #fff;
}

.btn-publish {
  background: var(--orange);
  color: #fff;
  padding: 10px 24px;
  font-size: 15px;
}

.btn-publish:hover {
  background: #ea580c;
  color: #fff;
}

/* Nav */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-inner a {
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.nav-inner a:hover,
.nav-inner a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* Main */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  flex: 1;
  width: 100%;
}

/* Category Section */
.category-section {
  margin-bottom: 40px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--teal);
}

.category-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-title .cat-icon {
  width: 32px;
  height: 32px;
  background: rgba(13, 148, 136, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.category-more {
  font-size: 14px;
  color: var(--text-light);
}

.category-more:hover {
  color: var(--teal);
}

/* Listing Cards */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.listing-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--teal);
}

.listing-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.listing-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.listing-publisher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
}

.publisher-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.12);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.listing-phone {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.listing-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(13, 148, 136, 0.08);
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

.listing-date {
  font-size: 12px;
  color: #9ca3af;
}

/* Footer */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-col p,
.footer-col a {
  font-size: 13px;
  color: var(--text-light);
  line-height: 2;
  display: block;
}

.footer-col a:hover {
  color: var(--teal);
}

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
}

.footer-bottom a {
  color: var(--text-light);
}

.footer-bottom a:hover {
  color: var(--teal);
}

/* Auth Pages */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 48px 24px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.auth-card .auth-subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 32px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
}

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

.auth-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-light);
}

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

.publish-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.publish-card h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text);
}

.publish-card .btn-primary {
  padding: 14px 40px;
  font-size: 15px;
}

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

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px;
  box-shadow: var(--shadow);
}

.article-card h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.article-card .article-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-card .article-body {
  min-height: 300px;
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.8;
}

/* Detail Page */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.detail-back:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.detail-contact {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.detail-contact h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.detail-contact p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 2;
}

a.listing-link {
  text-decoration: none;
  color: inherit;
}

a.listing-link .listing-card {
  height: 100%;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

/* Mobile */
@media (max-width: 768px) {
  .header-top {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    display: none;
  }

  .nav-inner.open {
    display: flex;
  }

  .nav-inner a {
    border-bottom: none;
    border-left: 3px solid transparent;
    padding: 12px 20px;
  }

  .nav-inner a:hover,
  .nav-inner a.active {
    border-bottom: none;
    border-left-color: var(--teal);
    background: var(--bg);
  }

  .listing-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .publish-card,
  .article-card {
    padding: 24px;
  }

  .header-actions .btn-outline {
    display: none;
  }
}
