/* Nexus OS 官网 — 暗黑科技风 · 青蓝发光 */

:root {
  --bg-deep: #06080c;
  --bg-mid: #0c1018;
  --bg-card: #111827;
  --bg-elevated: #151d2e;
  --text-primary: #e8f4fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #00e5ff;
  --accent-soft: #22d3ee;
  --accent-dim: #0891b2;
  --accent-glow: rgba(0, 229, 255, 0.35);
  --accent-line: rgba(0, 229, 255, 0.5);
  --border: rgba(0, 229, 255, 0.12);
  --radius: 12px;
  --header-h: 64px;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(0, 229, 255, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(8, 145, 178, 0.06), transparent);
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
}

a {
  color: var(--accent-soft);
  text-decoration: none;
}

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

/* ----- Header + 标签栏下方微光 ----- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem 0 1.5rem;
  background: rgba(6, 8, 12, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-line) 20%,
    var(--accent) 50%,
    var(--accent-line) 80%,
    transparent 100%
  );
  opacity: 0.85;
  filter: blur(0.5px);
  box-shadow: 0 0 16px var(--accent-glow), 0 0 32px rgba(0, 229, 255, 0.15);
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent-dim), var(--accent));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--bg-deep);
  box-shadow: 0 0 20px var(--accent-glow);
}

.brand-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.nav-main a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
}

.nav-main a:hover {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
}

.nav-main a[aria-current='page'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 14px var(--accent-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-card);
}

.lang-switch button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.lang-switch button:hover {
  color: var(--accent);
}

.lang-switch button.is-active {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent);
  box-shadow: inset 0 0 12px rgba(0, 229, 255, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent-soft));
  color: var(--bg-deep);
  border: none;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 28px var(--accent-glow);
}

.header-actions .menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  cursor: pointer;
  flex-shrink: 0;
}

.header-actions .menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text-primary);
  border-radius: 1px;
}

@media (max-width: 1024px) {
  .nav-main {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem;
    background: rgba(11, 15, 22, 0.97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    display: none;
    gap: 0;
    flex: none;
  }

  .nav-main.is-open {
    display: flex;
  }

  .nav-main a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-main a[aria-current='page'] {
    border-bottom-color: var(--border);
    border-left: 3px solid var(--accent);
    padding-left: 0.5rem;
  }

  .header-actions .menu-toggle {
    display: block;
  }

  .header-actions .btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .lang-switch {
    display: none;
  }
}

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

.container-wide {
  max-width: 1280px;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.section-lead {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-size: 0.95rem;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 20% 10% auto;
  height: 40%;
  background: radial-gradient(ellipse, rgba(0, 229, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 820px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 0.75rem;
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(0, 229, 255, 0.2);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--accent-soft);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.hero-tagline {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-secondary);
  margin: 0 0 2rem;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.hero-cta .btn-primary {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

.hero-cta .btn-ghost {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

/* ----- 三列模块 ----- */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
}

.module-card {
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.module-card:hover {
  border-color: rgba(0, 229, 255, 0.28);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.08);
}

.module-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-soft);
}

.module-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.module-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* ----- Why Nexus ----- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.35rem;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.why-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.why-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ----- Footer ----- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
  background: rgba(6, 8, 12, 0.6);
}

.footer-inner {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

.footer-brand .brand-text {
  font-size: 1.1rem;
}

.footer-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-admin {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ----- Page shell (skeleton pages) ----- */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.page-hero p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.shell-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 4rem;
}

@media (min-width: 900px) {
  .shell-layout {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

.shell-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.shell-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.shell-nav a:hover,
.shell-nav a[aria-current='page'] {
  background: rgba(0, 229, 255, 0.08);
  color: var(--accent);
}

.shell-body {
  min-height: 320px;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.shell-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ----- Product tabs ----- */
.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.product-tab {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.product-tab:hover {
  color: var(--accent);
  border-color: rgba(0, 229, 255, 0.35);
}

.product-tab.is-active {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-dim), var(--accent-soft));
  border-color: transparent;
  box-shadow: 0 0 20px var(--accent-glow);
}

.product-panel {
  display: none;
  animation: fadeIn 0.35s ease;
}

.product-panel.is-active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-detail h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--accent-soft);
}

.product-detail .lead {
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

.feature-list {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.demo-placeholder {
  aspect-ratio: 16 / 9;
  max-height: 280px;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  border: 1px dashed rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.04);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ----- Community tabs ----- */
.community-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.community-tabs .product-tab {
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.875rem;
}

.post-row .meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.toolbar-row input[type='search'] {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
}

/* ----- Admin / User table stub ----- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
}
