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

:root {
  --dark: #1A1A2E;
  --accent: #4F46E5;
  --green: #10B981;
  --light: #F8FAFC;
  --text: #334155;
  --muted: #94A3B8;
  --border: #E2E8F0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 20px; font-weight: 700; color: var(--dark); }
.btn-nav {
  padding: 8px 20px; background: var(--dark); color: #fff;
  border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 600;
  transition: background .2s;
}
.btn-nav:hover { background: var(--accent); }

/* HERO */
.hero {
  max-width: 800px; margin: 0 auto;
  padding: 80px 24px 64px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: #E8F5E9; color: #2E7D32;
  padding: 6px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 800; color: var(--dark);
  line-height: 1.15; margin-bottom: 20px;
}
.subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted); max-width: 580px;
  margin: 0 auto 36px;
}
.btn-primary {
  display: inline-block;
  padding: 16px 40px; background: var(--dark); color: #fff;
  border-radius: 10px; text-decoration: none; font-size: 18px; font-weight: 700;
  transition: background .2s;
}
.btn-primary:hover { background: var(--accent); }
.btn-secondary {
  padding: 14px 36px; background: var(--light); color: var(--dark);
  border-radius: 10px; text-decoration: none; font-size: 17px; font-weight: 600;
  border: 1px solid var(--border);
}

/* DEVICE PICKER */
.pick-device {
  padding: 64px 24px;
  text-align: center;
  background: var(--light);
}
.pick-device h2 {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800; color: var(--dark);
  margin-bottom: 36px;
}
.step-label {
  font-size: 12px; font-weight: 700;
  color: var(--accent); letter-spacing: 1px;
  margin-bottom: 12px;
}
.device-grid {
  max-width: 800px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.device-card {
  background: #fff; border: 2px solid var(--border);
  border-radius: 20px; padding: 36px 24px;
  cursor: pointer; transition: all .2s;
  text-align: center;
}
.device-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(79,70,229,.12);
}
.device-icon { font-size: 48px; margin-bottom: 14px; }
.device-name { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.device-sub { font-size: 13px; color: var(--muted); }

/* INSTALL STEPS */
.install-steps {
  max-width: 720px; margin: 0 auto;
  padding: 64px 24px;
}
.install-steps h2 {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800; color: var(--dark);
  margin-bottom: 40px;
}
.steps-list { display: flex; flex-direction: column; gap: 0; }
.step-item {
  display: flex; gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.step-item:last-child { border-bottom: none; }
.step-num {
  min-width: 44px; height: 44px;
  background: var(--dark); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; flex-shrink: 0;
}
.step-body h3 { font-size: 17px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.step-body p { font-size: 14px; color: var(--text); margin-bottom: 12px; line-height: 1.6; }
.note { font-size: 12px !important; color: var(--muted) !important; }

.btn-download {
  display: inline-block;
  padding: 13px 28px; background: var(--dark); color: #fff;
  border-radius: 10px; text-decoration: none; font-size: 15px; font-weight: 700;
  transition: background .2s; margin-bottom: 10px;
}
.btn-download:hover { background: var(--accent); }

.url-box {
  background: var(--light); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 16px;
  font-family: monospace; font-size: 14px; color: var(--dark);
  margin: 8px 0 12px; display: inline-block;
}
.success-box {
  background: #E8F5E9; color: #2E7D32;
  border-radius: 10px; padding: 14px 20px;
  font-size: 14px; font-weight: 600;
}
.optional-box {
  background: #EEF2FF; border-radius: 12px;
  padding: 16px 20px; margin-top: 32px;
  font-size: 14px; color: var(--text);
}
.optional-box a { color: var(--accent); font-weight: 600; }
.btn-back {
  margin-top: 24px;
  background: none; border: 1px solid var(--border);
  color: var(--muted); padding: 10px 20px;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.btn-back:hover { color: var(--dark); border-color: var(--dark); }

/* FEATURES */
.features {
  background: var(--light);
  padding: 80px 24px;
  text-align: center;
}
.features h2, .download h2, .how-steps h2 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800; color: var(--dark);
  margin-bottom: 48px;
}
.feature-grid {
  max-width: 1000px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature-card {
  background: #fff; border-radius: 16px;
  padding: 32px 24px; border: 1px solid var(--border);
  text-align: left;
}
.icon { font-size: 32px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--muted); }

/* DOWNLOAD */
.download {
  padding: 80px 24px;
  text-align: center;
}
.download-sub { color: var(--muted); margin-bottom: 48px; font-size: 16px; }
.download-grid {
  max-width: 900px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.download-card {
  border: 2px solid var(--border); border-radius: 16px;
  padding: 32px 24px; text-align: center;
  transition: border-color .2s;
}
.download-card:hover { border-color: var(--accent); }
.platform-icon { font-size: 40px; margin-bottom: 12px; }
.download-card h3 { font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.download-card p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.btn-download {
  display: inline-block;
  padding: 12px 28px; background: var(--dark); color: #fff;
  border-radius: 10px; text-decoration: none; font-size: 15px; font-weight: 700;
  transition: background .2s;
}
.btn-download:hover { background: var(--accent); }
.install-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* HOW STEPS */
.how-steps {
  background: var(--light);
  padding: 80px 24px;
  text-align: center;
}
.steps {
  max-width: 700px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 24px;
  text-align: left;
}
.step {
  display: flex; align-items: flex-start; gap: 20px;
  background: #fff; border-radius: 14px; padding: 24px;
  border: 1px solid var(--border);
}
.step-num {
  min-width: 40px; height: 40px;
  background: var(--dark); color: #fff;
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
.step p { font-size: 15px; padding-top: 8px; }

/* FOOTER */
footer {
  text-align: center; padding: 32px 24px;
  border-top: 1px solid var(--border);
  font-size: 14px; color: var(--muted);
}
footer a { color: var(--accent); text-decoration: none; }

/* DASHBOARD STYLES */
.dash-body { background: var(--light); min-height: 100vh; }
.dash-wrap { max-width: 700px; margin: 0 auto; padding: 40px 24px; }
.dash-wrap h1 { font-size: 28px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.dash-sub { color: var(--muted); margin-bottom: 36px; font-size: 15px; }

.card {
  background: #fff; border-radius: 16px;
  border: 1px solid var(--border); padding: 28px;
  margin-bottom: 20px;
}
.card h2 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 20px; }

.toggle-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label h3 { font-size: 15px; font-weight: 600; color: var(--dark); }
.toggle-label p { font-size: 13px; color: var(--muted); }

/* Toggle switch */
.switch { position: relative; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl {
  position: absolute; inset: 0;
  background: #CBD5E1; border-radius: 28px;
  cursor: pointer; transition: .3s;
}
.switch .sl:before {
  content: ""; position: absolute;
  width: 22px; height: 22px;
  left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: .3s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .sl { background: var(--green); }
.switch input:checked + .sl:before { transform: translateX(24px); }

.auth-box {
  max-width: 400px; margin: 80px auto; padding: 40px;
  background: #fff; border-radius: 20px;
  border: 1px solid var(--border); text-align: center;
}
.auth-box h2 { font-size: 22px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.auth-box p { color: var(--muted); margin-bottom: 28px; font-size: 14px; }
.auth-box input {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 16px; margin-bottom: 12px; outline: none;
}
.auth-box input:focus { border-color: var(--accent); }
.auth-box button {
  width: 100%; padding: 12px;
  background: var(--dark); color: #fff;
  border: none; border-radius: 10px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background .2s;
}
.auth-box button:hover { background: var(--accent); }
.err { color: #EF4444; font-size: 13px; margin-top: 8px; min-height: 20px; }
.success { color: var(--green); font-size: 13px; text-align: center; }
