@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@800&display=swap');

:root {
  --bg-color: #0d0f14;
  --bg-gradient: radial-gradient(circle at top, #1a1e2d 0%, #0d0f14 60%);
  --card-bg: rgba(22, 25, 35, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(32, 36, 48, 0.8);
  --accent: #6b8afc;
  --accent-glow: rgba(107, 138, 252, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --warning: #ef4444;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.5);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  background: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

.background-glow {
  position: fixed;
  top: -20vh;
  left: 20vw;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(107, 138, 252, 0.12) 0%, transparent 60%);
  filter: blur(80px);
  z-index: -1;
  animation: float 10s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(30px) scale(1.05); }
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.text-link:hover {
  text-shadow: 0 0 10px var(--accent-glow);
  text-decoration: underline;
}

.mt-4 { margin-top: 1rem; }

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  background: rgba(13, 15, 20, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  z-index: 100;
}

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

.logo {
  font-family: 'Satoshi', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-accent {
  -webkit-text-fill-color: rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
  margin-right: -2px;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--text-main);
}

button.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

button.nav-link.active {
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.store-btn {
  background: rgba(107, 138, 252, 0.1);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(107, 138, 252, 0.2);
  font-weight: 600;
}

.store-btn:hover {
  background: rgba(107, 138, 252, 0.2);
  color: #fff;
  border-color: rgba(107, 138, 252, 0.4);
  box-shadow: 0 0 12px rgba(107, 138, 252, 0.2);
  text-decoration: none;
}

@media (max-width: 600px) {
  .nav-links { display: none; }
}

/* Layout */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 24px 60px;
}

.section {
  margin-bottom: 80px;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 80px;
  animation: fade-in-up 0.8s ease-out forwards;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(107, 138, 252, 0.1);
  border: 1px solid rgba(107, 138, 252, 0.2);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 4rem;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

.hero-image-wrapper {
  margin-top: 60px;
  display: flex;
  justify-content: center;
}

.hero-device-img {
  max-width: 440px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 40px rgba(107, 138, 252, 0.15)) contrast(1.15) brightness(0.9) saturate(0.9);
  transform: translateY(0);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.hero-device-img:hover {
  transform: translateY(-8px);
  filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 50px rgba(107, 138, 252, 0.25)) contrast(1.15) brightness(0.9) saturate(0.9);
}

/* Cards & Elements */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.interactive-card {
  transition: var(--transition);
}

.interactive-card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: rgba(107, 138, 252, 0.3);
  box-shadow: 0 20px 40px rgba(107, 138, 252, 0.1);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
}

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

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 600px;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(107, 138, 252, 0.1);
  color: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.step-list {
  padding-left: 20px;
  color: var(--text-muted);
}

.step-list li {
  margin-bottom: 12px;
}

.step-list strong {
  color: var(--text-main);
}

.note {
  margin-top: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.note i {
  color: var(--accent);
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.metric-item {
  background: rgba(22, 25, 35, 0.4);
  border: 1px solid var(--card-border);
  padding: 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.metric-item:hover {
  background: rgba(22, 25, 35, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.metric-name {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.metric-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Actions List (Buttons) */
.action-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.action-list li {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .action-list li {
    flex-direction: column;
    gap: 12px;
  }
}

.action-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 2px;
}

.action-badge.warning {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-details h4 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 6px;
  line-height: 1.2;
}

.action-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Split Card (Web UI) */
.split-card {
  display: flex;
  gap: 40px;
  align-items: center;
}

.split-content {
  flex: 1;
}

.split-visual {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .split-card { flex-direction: column; }
  .split-visual { width: 100%; justify-content: center; margin-top: 24px; }
}

.feature-list {
  list-style: none;
  margin-top: 20px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.feature-list i {
  color: var(--accent);
}

/* Mock UI Element */
.mock-ui {
  width: 100%;
  max-width: 320px;
  background: #12141c;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mock-ui-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mock-ui-title-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-ui-pill {
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: var(--accent);
}

.mock-ui-title-text {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.mock-ui-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #4ade80;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
}

.mock-ui-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}

.mock-ui-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 8px;
}

.mock-ui-tab {
  flex: 1;
  text-align: center;
  font-size: 11px;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-muted);
}

.mock-ui-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 500;
}

.mock-ui-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
}

.mock-ui-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mock-ui-card-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.mock-ui-unit-toggle {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px;
}

.mock-ui-unit-toggle span {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text-muted);
}

.mock-ui-unit-toggle span.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.mock-ui-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mock-ui-stat {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 10px;
}

.mock-ui-stat .val {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.mock-ui-stat .lbl {
  font-size: 10px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 40px;
}

/* Animations */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Tabs */
.tab-pane {
  display: none;
  animation: fade-in-up 0.4s ease-out forwards;
}

.tab-pane.active {
  display: block;
}

/* Flasher Styles */
.flasher-shell {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.flasher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.flasher-title-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.flasher-pill {
  width: 6px;
  height: 38px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--accent), #a0a4b8);
  box-shadow: 0 0 16px var(--accent-glow);
}

.flasher-title-block h2 {
  margin: 0;
  font-size: 24px;
  background: linear-gradient(90deg, #fff, #c2c9d6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.status-chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(107, 138, 252, 0.1);
  border: 1px solid rgba(107, 138, 252, 0.3);
  color: #fff;
  transition: var(--transition);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-flasher {
  background: rgba(18, 20, 28, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  padding: 20px;
  margin-bottom: 24px;
}

.hero-copy {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  color: var(--text-muted);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  .actions { grid-template-columns: 1fr; }
  .flasher-header { flex-direction: column; align-items: flex-start; gap: 16px; }
}

.action-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.action-card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.action-card--standard {
  background: linear-gradient(145deg, rgba(35, 38, 52, 0.6) 0%, rgba(20, 22, 31, 0.8) 100%);
}

.action-card--feature {
  background: linear-gradient(180deg, rgba(29, 21, 35, 0.7) 0%, rgba(21, 18, 32, 0.7) 100%);
}

.action-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.action-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.action-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge--primary {
  background: rgba(107, 138, 252, 0.1);
  color: #6b8afc;
  border-color: rgba(107, 138, 252, 0.3);
}

.badge--warn {
  background: rgba(243, 156, 18, 0.1);
  color: #f39c12;
  border-color: rgba(243, 156, 18, 0.3);
}

.action-meta {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.2);
  padding: 12px;
  border-radius: 10px;
  margin-top: 4px;
}

.action-meta strong {
  color: #fff;
  font-weight: 600;
}

.file-row {
  margin-top: auto;
  padding-top: 8px;
}

esp-web-install-button {
  --esp-tools-button-background: #ffffff;
  --esp-tools-button-border-radius: 12px;
  --esp-tools-button-padding: 10px 20px;
  --esp-tools-button-color: #000000;
  --esp-tools-button-font-weight: 700;
  --esp-tools-button-font-size: 13px;
  --esp-tools-button-border: none;
  --esp-tools-button-hover-background: rgba(255, 255, 255, 0.95);
  --esp-tools-button-disabled-background: rgba(255, 255, 255, 0.18);
  --esp-tools-button-disabled-color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}

esp-web-install-button:hover:not([disabled]) {
  transform: translateY(-2px);
}

.warning-card {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}
