/* ==========================================================================
   极夜暮紫 / 电光洋红流光主题 (Midnight Plum & Electric Magenta)
   ========================================================================== */

:root {
  --bg-deep: #090612;
  --bg-elevated: #140d26;
  --accent-magenta: #d946ef;
  --accent-violet: #7c3aed;
  --accent-glow: rgba(217, 70, 239, 0.18);
  --card-bg: rgba(20, 13, 38, 0.85);
  --card-border: rgba(217, 70, 239, 0.25);
  --card-border-hover: rgba(217, 70, 239, 0.55);
  --text-primary: #f5f3ff;
  --text-secondary: #c4b5fd;
  --text-muted: #9386b8;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 8px 32px rgba(217, 70, 239, 0.18);
  --shadow-btn: 0 6px 24px rgba(217, 70, 239, 0.35);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 20%, rgba(217, 70, 239, 0.16), transparent 55%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-elevated) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-magenta);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: #f0abfc;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 6, 18, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #f5f3ff, #e879f9, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

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

/* Hero */
.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f0abfc;
  background: rgba(217, 70, 239, 0.12);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #f0abfc 0%, #d946ef 45%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 680px;
  margin: 0 auto 32px;
  font-size: 1.06rem;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* Buttons */
@keyframes flowGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #d946ef, #7c3aed, #d946ef);
  background-size: 200% 200%;
  animation: flowGradient 4s ease infinite;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(217, 70, 239, 0.5);
}

.btn-outline {
  color: var(--text-primary);
  background: rgba(20, 13, 38, 0.65);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  color: #ffffff;
  border-color: var(--card-border-hover);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.88rem;
}

/* Frosted Glass Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 12px 38px rgba(217, 70, 239, 0.26);
  transform: translateY(-3px);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Grids */
.grid {
  display: grid;
  gap: 22px;
}

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

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

/* Tags & Badges */
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f0abfc;
  background: rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(217, 70, 239, 0.3);
  border-radius: 6px;
}

/* Section Heading */
.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--text-secondary);
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(217, 70, 239, 0.14);
}

th {
  font-weight: 700;
  color: #f0abfc;
  background: rgba(124, 58, 237, 0.18);
  white-space: nowrap;
}

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

tbody tr:hover {
  background: rgba(217, 70, 239, 0.06);
}

/* Callout & Article Typography */
.callout {
  padding: 18px 22px;
  margin: 22px 0;
  border-left: 4px solid var(--accent-magenta);
  border-radius: var(--radius-sm);
  background: rgba(217, 70, 239, 0.08);
  color: var(--text-primary);
}

.article-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--card-border);
}

.article-content h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: #f0abfc;
}

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

.article-content ul,
.article-content ol {
  margin: 0 0 18px 22px;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 8px;
}

.article-content strong {
  color: var(--text-primary);
}

.article-content code {
  padding: 2px 6px;
  font-size: 0.9em;
  color: #f0abfc;
  background: rgba(124, 58, 237, 0.25);
  border-radius: 5px;
}

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 32px 0;
  border-top: 1px solid var(--card-border);
  background: rgba(9, 6, 18, 0.85);
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 860px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .nav-bar {
    height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .nav-links {
    gap: 14px;
    flex-wrap: wrap;
  }

  .hero {
    padding: 48px 0 32px;
  }

  .card {
    padding: 20px;
  }
}
