/* ===================================
   Personal Website - Global Styles
   ICP备案合规个人网站
   =================================== */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--primary-hover);
}

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

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--text-primary);
}

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

.nav a {
  color: var(--text-secondary);
  font-size: 0.938rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-color);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: transparent;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #ffffff;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 40px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: #ffffff;
  color: var(--primary-color);
  border-color: #ffffff;
}

.btn-primary:hover {
  background: transparent;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: #ffffff;
  color: var(--primary-color);
  border-color: #ffffff;
  transform: translateY(-2px);
}

.btn-blue {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.btn-blue:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

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

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

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

/* Cards */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 20px;
}

.card-icon.blue {
  background: #eff6ff;
  color: var(--primary-color);
}

.card-icon.green {
  background: #f0fdf4;
  color: #16a34a;
}

.card-icon.purple {
  background: #faf5ff;
  color: #9333ea;
}

.card-icon.orange {
  background: #fff7ed;
  color: #ea580c;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.938rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Features */
.feature {
  display: flex;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.feature:hover {
  background: var(--bg-secondary);
}

.feature-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

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

.feature p {
  color: var(--text-secondary);
  font-size: 0.938rem;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  font-size: 0.938rem;
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-secondary);
}

/* Form */
.form-group {
  margin-bottom: 24px;
}

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

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

/* Footer */
.footer {
  background: var(--text-primary);
  color: #ffffff;
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #ffffff;
}

.footer-col a {
  display: block;
  color: #cbd5e1;
  padding: 4px 0;
  font-size: 0.938rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

.footer-bottom a {
  color: #cbd5e1;
}

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

/* ICP Badge */
.icp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 20px;
}

.icp-badge strong {
  color: var(--primary-color);
}

/* Alert */
.alert {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border-left: 4px solid;
}

.alert-info {
  background: #eff6ff;
  border-color: var(--primary-color);
  color: #1e40af;
}

.alert-success {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #166534;
}

.alert-warning {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

/* Breadcrumb */
.breadcrumb {
  padding: 100px 0 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb-list a {
  color: var(--text-secondary);
}

.breadcrumb-list a:hover {
  color: var(--primary-color);
}

.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--text-muted);
}

/* Sitemap */
.sitemap-grid {
  display: grid;
  gap: 32px;
}

.sitemap-col h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.sitemap-col a {
  display: block;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 0.938rem;
}

.sitemap-col a:hover {
  color: var(--primary-color);
  transform: translateX(4px);
}

/* Privacy content */
.privacy-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--text-primary);
}

.privacy-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text-primary);
}

.privacy-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.privacy-content ul {
  margin: 16px 0;
  padding-left: 24px;
}

.privacy-content li {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Stats */
.stat {
  text-align: center;
  padding: 32px 20px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.938rem;
  color: var(--text-secondary);
}

/* Contact */
.contact-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.contact-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 0.938rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 1.75rem;
  }

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

  .hero-btns {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .stat-number {
    font-size: 2.25rem;
  }
}

/* Print */
@media print {
  .header,
  .footer,
  .hero {
    display: none;
  }

  body {
    font-size: 12pt;
  }
}
