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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-nav: #0d0d14;
  --text: #e0e0e0;
  --text-muted: #8888a0;
  --accent: #00e5ff;
  --accent-dim: #0099aa;
  --purple: #7c3aed;
  --border: #1e1e2e;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

nav .logo { font-weight: 700; font-size: 1.2rem; color: var(--accent); }

nav .nav-links { display: flex; gap: 24px; }

nav .nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,229,255,0.06) 0%, transparent 60%);
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

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

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 32px;
}

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

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #fff; color: #000; }

.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: #6d28d9; color: #fff; }

section { padding: 80px 24px; }

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 48px;
}

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

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: border-color 0.2s;
}

.feature-card:hover { border-color: var(--accent-dim); }

.feature-card .icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.step { text-align: center; padding: 24px; }

.step .number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.9rem; }

.irc-preview {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.irc-preview iframe {
  width: 100%;
  height: 400px;
  border: none;
  display: block;
}

.cta-section {
  text-align: center;
  padding: 80px 24px;
  background: radial-gradient(ellipse at 50% 100%, rgba(124,58,237,0.08) 0%, transparent 60%);
}

.cta-section h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 16px; }
.cta-section p { color: var(--text-muted); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }

footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer .footer-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
footer .footer-links a { color: var(--text-muted); }
footer .footer-links a:hover { color: var(--accent); }

.download-hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 40px;
}

.download-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.download-hero h1 span { color: var(--accent); }
.download-hero p { color: var(--text-muted); max-width: 500px; margin-bottom: 32px; }

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 600px;
  margin: 0 auto;
}

.download-card .version { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.download-card .file-info { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }

.flash-guide {
  max-width: 700px;
  margin: 40px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.flash-guide h2 { margin-bottom: 16px; font-size: 1.2rem; }
.flash-guide ul { list-style: none; margin-bottom: 20px; }
.flash-guide li { padding: 6px 0; color: var(--text-muted); font-size: 0.9rem; }
.flash-guide li::before { content: "\25B8  "; color: var(--accent); }

.flash-guide code {
  display: block;
  background: #000;
  padding: 12px 16px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  overflow-x: auto;
}

.flash-guide .note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chat-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header .back { color: var(--text-muted); font-size: 0.9rem; }
.chat-header .back:hover { color: var(--accent); }
.chat-header h2 { font-size: 1rem; font-weight: 600; }
.chat-header h2 span { color: var(--accent); }

.chat-frame { flex: 1; }
.chat-frame iframe { width: 100%; height: 100%; border: none; display: block; }

@media (max-width: 640px) {
  nav .nav-links { display: none; }
  .menu-toggle { display: block; }
  nav .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--bg-nav);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .irc-preview iframe { height: 300px; }
}
