:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --accent: #f59e0b;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #2d3748;
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  animation: float 3s ease-in-out infinite;
}

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

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f1419 100%);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(96, 165, 250, 0.15);
  animation: pulse 4s ease-in-out infinite;
  pointer-events: none;
}

.hero::before {
  width: 280px;
  height: 280px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 0s;
}

.hero::after {
  width: 420px;
  height: 420px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 1.5s;
  border-color: rgba(245, 158, 11, 0.12);
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.08); }
}

.waves {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.wave {
  position: absolute;
  border: 2px solid rgba(9, 207, 203, 0.25);
  border-radius: 50%;
  animation: wave 3s ease-out infinite;
}

.wave:nth-child(1) { width: 160px; height: 160px; margin: -80px 0 0 -80px; animation-delay: 0s; }
.wave:nth-child(2) { width: 240px; height: 240px; margin: -120px 0 0 -120px; animation-delay: 0.6s; }
.wave:nth-child(3) { width: 320px; height: 320px; margin: -160px 0 0 -160px; animation-delay: 1.2s; }

@keyframes wave {
  0% { opacity: 0.6; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.4); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(to right, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

.hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 1.5rem; position: relative; z-index: 1; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin: 0 0.5rem;
  transition: background 0.2s;
  position: relative;
  z-index: 1;
}

.btn:hover { background: var(--primary-light); }
.btn.secondary { background: transparent; border: 1px solid var(--primary); }

section { margin: 3rem 0; }

h2 { font-size: 2rem; margin-bottom: 1rem; color: var(--primary-light); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s;
}

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

.card h3 { margin-bottom: 0.5rem; color: var(--accent); }

.card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  background: #0f1419;
}

.diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  margin: 1rem 0;
  overflow: hidden;
}

.flow-svg {
  width: 100%;
  height: auto;
  max-height: 320px;
}

.flow-line {
  fill: none;
  stroke: #60a5fa;
  stroke-width: 2.5;
  stroke-dasharray: 8 6;
  animation: flow 1.4s linear infinite;
  opacity: 0.85;
}

.flow-line:nth-child(2) { stroke: #09cfcb; animation-delay: 0.3s; }
.flow-line.sync {
  stroke: #f59e0b;
  stroke-width: 3;
  animation-duration: 1s;
}

@keyframes flow {
  to { stroke-dashoffset: -28; }
}

.node { transition: transform 0.2s; }
.node:hover { transform: scale(1.03); }

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

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

th { background: #243044; color: var(--primary-light); }

@media (max-width: 768px) {
  nav ul { gap: 1rem; font-size: 0.9rem; }
  .hero h1 { font-size: 2rem; }
  main { padding: 1rem; }
}
