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

:root {
  --primary: #1a56db;
  --primary-dark: #1648b8;
  --primary-light: #e8effc;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

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

ul, ol {
  list-style: none;
}

/* ========== Navigation ========== */
.navbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

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

.navbar-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-menu > li {
  position: relative;
}

.navbar-menu > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: 15px;
  color: var(--text-primary);
  border-radius: 6px;
  transition: all var(--transition);
}

.navbar-menu > li > a:hover,
.navbar-menu > li > a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.navbar-menu > li > a .arrow {
  font-size: 10px;
  transition: transform var(--transition);
}

.navbar-menu > li:hover > a .arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
}

.navbar-menu > li:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-primary);
  transition: all var(--transition);
}

.dropdown-menu li a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Navbar right */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-right .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.navbar-right .user-info .username {
  color: var(--primary);
  font-weight: 600;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.4);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

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

.btn-outline:hover {
  background: var(--primary-light);
}

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

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* ========== Banner ========== */
.banner {
  background: linear-gradient(135deg, #1a56db 0%, #3b82f6 50%, #60a5fa 100%);
  position: relative;
  overflow: hidden;
  padding: 80px 24px;
}

.banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.banner-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.banner h1 {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 16px;
}

.banner p {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.banner .banner-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.banner .btn-accent {
  padding: 14px 32px;
  font-size: 16px;
}

.banner .btn-outline {
  padding: 14px 32px;
  font-size: 16px;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.banner .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

/* ========== Page Header ========== */
.page-header {
  background: linear-gradient(135deg, #1a56db 0%, #3b82f6 100%);
  padding: 48px 24px;
  text-align: center;
}

.page-header h1 {
  font-size: 32px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
}

.page-header .breadcrumb {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

.page-header .breadcrumb a {
  color: rgba(255,255,255,0.8);
}

.page-header .breadcrumb a:hover {
  color: #fff;
}

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

/* ========== Section ========== */
.section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
}

/* ========== Cards Grid ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card .card-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--primary-light);
}

.service-card .card-body {
  padding: 20px;
}

.service-card .card-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  margin-bottom: 10px;
}

.service-card .card-tag.app {
  background: #dbeafe;
  color: #1d4ed8;
}

.service-card .card-tag.miniapp {
  background: #dcfce7;
  color: #15803d;
}

.service-card .card-tag.website {
  background: #fef3c7;
  color: #b45309;
}

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

.service-card .card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.service-card .card-meta .publisher {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========== Feature Cards (Home) ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-card .feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
}

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

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== Stats ========== */
.stats-section {
  background: linear-gradient(135deg, #1a56db 0%, #3b82f6 100%);
  border-radius: 12px;
  padding: 48px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.stat-item {
  text-align: center;
  color: #fff;
}

.stat-item .stat-number {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-item .stat-label {
  font-size: 14px;
  opacity: 0.8;
}

/* ========== Detail Page ========== */
.detail-container {
  max-width: 900px;
  margin: 0 auto;
}

.detail-header {
  margin-bottom: 32px;
}

.detail-header .detail-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  margin-bottom: 12px;
}

.detail-header h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.detail-header .detail-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.detail-header .detail-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-cover {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.detail-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
  margin-bottom: 32px;
}

.detail-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.detail-content p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.detail-content ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.detail-content ul li {
  list-style: disc;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.detail-cases {
  margin-bottom: 32px;
}

.detail-cases h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cases-grid img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.detail-contact {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-contact .contact-info {
  font-size: 15px;
}

.detail-contact .contact-info strong {
  color: var(--primary);
}

.detail-contact .phone-masked {
  color: var(--text-secondary);
  font-style: italic;
}

/* ========== Forms ========== */
.form-container {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px;
}

.form-container.wide {
  max-width: 800px;
}

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

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

.form-group label .required {
  color: #ef4444;
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-family);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-control::placeholder {
  color: #94a3b8;
}

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

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
}

.file-upload:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload .upload-icon {
  font-size: 32px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.file-upload .upload-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.file-upload .upload-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload.has-file {
  border-color: #22c55e;
  background: #f0fdf4;
}

.file-upload.has-file .upload-icon::before {
  content: '\2713';
  color: #22c55e;
}

/* Form Actions */
.form-actions {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}

.tab-item {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.tab-item:hover {
  color: var(--primary);
}

.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========== Notice Box ========== */
.notice-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.notice-box .notice-title {
  font-size: 15px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-box .notice-content {
  font-size: 14px;
  color: #78350f;
  line-height: 1.7;
}

.notice-box .notice-content ul {
  padding-left: 18px;
  margin-top: 8px;
}

.notice-box .notice-content ul li {
  list-style: disc;
  margin-bottom: 4px;
}

/* ========== Info Box ========== */
.info-box {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.info-box p {
  font-size: 14px;
  color: var(--primary);
  line-height: 1.7;
}

/* ========== Register Tabs ========== */
.register-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border);
}

.register-tab {
  flex: 1;
  padding: 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.register-tab:hover {
  color: var(--primary);
}

.register-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.register-panel {
  display: none;
}

.register-panel.active {
  display: block;
}

/* ========== Footer ========== */
.footer {
  background: #1e293b;
  color: rgba(255,255,255,0.7);
  padding: 40px 24px 24px;
  margin-top: auto;
}

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

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

.footer-brand h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  max-width: 360px;
}

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

.footer-links-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.footer-links-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  padding: 4px 0;
  transition: color var(--transition);
}

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

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

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

.footer-bottom a:hover {
  color: #fff;
}

/* ========== Login Page ========== */
.auth-container {
  max-width: 420px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px;
}

.auth-container h2 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

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

.auth-container .form-actions {
  flex-direction: column;
}

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

.auth-container .auth-footer a {
  color: var(--primary);
  font-weight: 500;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1e293b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: #16a34a;
}

.toast.error {
  background: #dc2626;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .navbar-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }

  .navbar-menu {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 8px;
  }

  .navbar-menu > li > a {
    padding: 6px 12px;
    font-size: 14px;
  }

  .banner {
    padding: 48px 16px;
  }

  .banner h1 {
    font-size: 28px;
  }

  .banner p {
    font-size: 15px;
  }

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

  .stats-section {
    grid-template-columns: repeat(2, 1fr);
    padding: 32px 20px;
  }

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

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

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    gap: 32px;
  }

  .form-container {
    padding: 24px;
  }

  .detail-contact {
    flex-direction: column;
    text-align: center;
  }
}
