:root {
  --primary: #0f4c81;
  --primary-light: #1a6bb5;
  --accent: #00b4d8;
  --dark: #0a1628;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --success: #059669;
  --error: #dc2626;
  --shadow: 0 4px 24px rgba(15, 76, 129, 0.08);
  --radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 76, 129, 0.25);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Hero */
.hero {
  position: relative;
  padding: 100px 0 120px;
  background: linear-gradient(160deg, #0a1628 0%, #0f4c81 50%, #1a5276 100%);
  color: white;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(0, 180, 216, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
}

.hero-content {
  position: relative;
  max-width: 680px;
}

.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
}

.hero .btn-outline:hover {
  background: white;
  color: var(--primary);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(15, 76, 129, 0.12);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.1), rgba(0, 180, 216, 0.1));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--dark);
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-item strong {
  display: block;
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-item span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-visual {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  padding: 48px;
  color: white;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-visual h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.about-visual ul {
  list-style: none;
}

.about-visual li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-visual li::before {
  content: "✓";
  font-weight: bold;
}

/* Contact */
.contact-section {
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.contact-item {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.contact-item .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.contact-item h4 {
  margin-bottom: 8px;
  color: var(--dark);
}

.contact-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  opacity: 0.7;
  max-width: 360px;
}

.footer-links h4 {
  color: white;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-links a {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
}

/* Login page */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(160deg, #0a1628 0%, #0f4c81 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.code-row {
  display: flex;
  gap: 12px;
}

.code-row .form-input {
  flex: 1;
}

.message {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: none;
}

.message.show {
  display: block;
}

.message.success {
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}

.message.error {
  background: #fef2f2;
  color: var(--error);
  border: 1px solid #fecaca;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* Dashboard */
.dashboard-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 48px 0;
}

.dashboard-header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.dashboard-header p {
  opacity: 0.9;
}

.dashboard-content {
  padding: 40px 0 80px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.dashboard-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.dashboard-card h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--dark);
}

.dashboard-card ul {
  list-style: none;
}

.dashboard-card li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.dashboard-card li:last-child {
  border-bottom: none;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  font-size: 0.9rem;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }
}
