@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #060a14;
  --bg2: #0c1220;
  --surface: rgba(12, 18, 32, 0.85);
  --surface2: #111827;
  --border: rgba(0, 242, 255, 0.15);
  --cyan: #00f2ff;
  --purple: #a855f7;
  --magenta: #e94560;
  --gold: #fbbf24;
  --green: #10b981;
  --red: #ef4444;
  --text: #e8edf5;
  --muted: #8b9cb8;
  --radius: 14px;
  --glow: 0 0 30px rgba(0, 242, 255, 0.12);
}

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

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(0,242,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,242,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(6, 10, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--text);
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 36px; height: 36px; border-radius: 8px; }
.nav-brand span { color: var(--magenta); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  transition: 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--cyan);
  background: rgba(0, 242, 255, 0.08);
  text-decoration: none;
}

.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-user {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 242, 255, 0.25);
}
.btn-outline {
  background: transparent;
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn-ghost { background: transparent; color: var(--muted); border: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Layout ── */
.page-wrap { position: relative; z-index: 1; min-height: calc(100vh - 200px); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 60px 0 80px;
}
.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 12px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero h1 span { color: var(--cyan); }
.hero-desc { color: var(--muted); font-size: 16px; margin-bottom: 28px; max-width: 480px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-stats { display: flex; gap: 32px; }
.hero-stat strong { display: block; font-size: 22px; color: var(--cyan); }
.hero-stat span { font-size: 12px; color: var(--muted); }

.hero-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--glow);
  position: relative;
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0,242,255,0.3), rgba(168,85,247,0.3));
  z-index: -1;
  opacity: 0.4;
}
.hero-visual img { width: 100%; max-width: 280px; display: block; margin: 0 auto 16px; border-radius: 12px; }
.mock-ui {
  background: #0a0e17;
  border-radius: 10px;
  padding: 16px;
  font-size: 13px;
}
.mock-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.mock-row:last-child { border: none; }
.mock-signal { color: var(--green); font-weight: 700; }

/* ── Sections ── */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 32px; font-weight: 700; }
.section-title h2 span { color: var(--cyan); }
.section-title p { color: var(--muted); margin-top: 8px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: 0.2s;
}
.feature-card:hover { border-color: rgba(0,242,255,0.35); transform: translateY(-3px); }
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 13px; }

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card { text-align: center; padding: 24px; }
.step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  margin: 0 auto 16px;
}
.step-num.s1 { background: rgba(59,130,246,0.2); color: #60a5fa; }
.step-num.s2 { background: rgba(16,185,129,0.2); color: var(--green); }
.step-num.s3 { background: rgba(233,69,96,0.2); color: var(--magenta); }

.cta-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  box-shadow: var(--glow);
}
.cta-banner h2 { font-size: 28px; margin-bottom: 12px; }
.cta-banner p { color: var(--muted); margin-bottom: 24px; }

/* ── Auth cards ── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 160px);
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--glow);
  position: relative;
}
.auth-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0,242,255,0.2), rgba(168,85,247,0.2));
  z-index: -1;
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { width: 72px; border-radius: 14px; }
.auth-card h1 { text-align: center; font-size: 24px; font-weight: 800; letter-spacing: 1px; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 28px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.form-group input:focus { outline: none; border-color: var(--cyan); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted); }

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-warn { background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.25); color: #fcd34d; }

.broker-select {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.broker-select label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.broker-select small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ── Dashboard ── */
.dash-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 32px 0 60px;
  max-width: 1200px;
  margin: 0 auto;
}
.dash-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.dash-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 4px;
}
.dash-sidebar a:hover, .dash-sidebar a.active {
  background: rgba(0,242,255,0.08);
  color: var(--cyan);
  text-decoration: none;
}
.dash-sidebar .logout { color: var(--magenta); margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }

.dash-header { margin-bottom: 28px; }
.dash-header h1 { font-size: 28px; font-weight: 800; letter-spacing: 2px; }
.dash-header p { color: var(--muted); font-size: 14px; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon { font-size: 28px; }
.stat-val { font-size: 24px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-val.pos { color: var(--green); }
.stat-val.neg { color: var(--red); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.panel h2 { font-size: 16px; margin-bottom: 16px; color: var(--cyan); letter-spacing: 1px; }

.license-box {
  text-align: center;
  padding: 24px;
  background: rgba(0,0,0,0.3);
  border: 1px dashed rgba(0,242,255,0.3);
  border-radius: 12px;
}
.license-key {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--cyan);
  font-family: monospace;
  margin: 12px 0;
}
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-green { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-yellow { background: rgba(251,191,36,0.12); color: var(--gold); border: 1px solid rgba(251,191,36,0.3); }
.badge-red { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.badge-gray { background: rgba(139,156,184,0.12); color: var(--muted); border: 1px solid rgba(139,156,184,0.2); }

.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: 0.2s;
}
.quick-card:hover { border-color: var(--cyan); transform: translateY(-2px); text-decoration: none; }
.quick-card .icon { font-size: 32px; margin-bottom: 8px; }
.quick-card h3 { font-size: 14px; margin-bottom: 4px; }
.quick-card p { font-size: 12px; color: var(--muted); }

/* ── Download page ── */
.download-hero { text-align: center; padding: 48px 0 32px; }
.download-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.download-card {
  max-width: 560px;
  margin: 0 auto 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--glow);
}
.download-card .pc-badge {
  display: inline-block;
  background: rgba(16,185,129,0.15);
  color: var(--green);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 16px;
}
.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.req-col h3 { font-size: 14px; color: var(--cyan); margin-bottom: 12px; }
.req-col ul { list-style: none; font-size: 13px; color: var(--muted); }
.req-col li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }

.install-steps { max-width: 600px; margin: 32px auto 0; }
.install-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
  background: rgba(0,242,255,0.12); color: var(--cyan);
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: rgba(6, 10, 20, 0.95);
  padding: 48px 32px 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 32px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.footer-brand img { width: 32px; border-radius: 6px; }
.footer-desc { color: var(--muted); font-size: 13px; max-width: 320px; margin-bottom: 16px; }
.footer-contact { font-size: 13px; color: var(--muted); }
.footer-contact div { margin-bottom: 6px; }
.footer-col h4 { font-size: 13px; color: var(--cyan); margin-bottom: 12px; letter-spacing: 1px; }
.footer-col a { display: block; color: var(--muted); font-size: 13px; padding: 4px 0; text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-copy { text-align: center; color: var(--muted); font-size: 12px; padding-top: 24px; border-top: 1px solid var(--border); max-width: 1100px; margin: 0 auto; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .features-grid, .steps-row, .stats-row, .dash-grid-2, .quick-actions { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .dash-sidebar a { flex: 1; min-width: 120px; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
