/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  background: #09090b; color: #e4e4e7; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: #60a5fa; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: "SF Mono", Monaco, "Cascadia Code", "Fira Code", monospace; background: #1c1c22; padding: 2px 6px; border-radius: 4px; font-size: 0.88em; color: #60a5fa; }
img { max-width: 100%; }
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ===== Nav ===== */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(9,9,11,0.85); backdrop-filter: blur(16px); border-bottom: 1px solid #27272a; }
.nav-inner { max-width: 960px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 700; font-size: 1.1rem; color: #fff; text-decoration: none; }
.logo-sub { font-weight: 400; font-size: 0.8rem; color: #71717a; margin-left: 4px; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: #a1a1aa; font-size: 0.85rem; text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: #fff; }
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ===== Hero ===== */
.hero { padding: 80px 0 60px; text-align: center; background: radial-gradient(ellipse at 50% -20%, rgba(59,130,246,0.12) 0%, transparent 70%); }
.hero-badge { display: inline-block; font-size: 0.8rem; padding: 4px 14px; border-radius: 20px; background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); margin-bottom: 24px; }
.hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.2; background: linear-gradient(135deg, #fff 30%, #60a5fa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 20px; }
.hero-desc { max-width: 640px; margin: 0 auto; color: #a1a1aa; font-size: 1.05rem; line-height: 1.7; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; flex-wrap: wrap; }
.hero-stats { display: flex; justify-content: center; gap: 48px; }
.hero-stat-num { font-size: 2.2rem; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: 0.85rem; color: #71717a; }
@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-stats { gap: 24px; }
  .hero-stat-num { font-size: 1.6rem; }
}

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 10px 24px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; text-decoration: none; transition: all 0.15s; cursor: pointer; border: none; }
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; text-decoration: none; }
.btn-secondary { background: #27272a; color: #e4e4e7; border: 1px solid #3f3f46; }
.btn-secondary:hover { background: #3f3f46; text-decoration: none; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-alt { background: #0f0f12; }
.section-title { font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 8px; }
.section-desc { text-align: center; color: #a1a1aa; max-width: 600px; margin: 0 auto 40px; }

/* ===== Detection ===== */
.detection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; max-width: 700px; margin: 0 auto; }
.detect-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 8px; font-size: 0.9rem; }
.detect-item.ok { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); color: #4ade80; }
.detect-item.warn { background: rgba(250,204,21,0.1); border: 1px solid rgba(250,204,21,0.2); color: #facc15; }
.detect-item.fail { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #f87171; }
.detect-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.detect-item.ok .detect-dot { background: #22c55e; }
.detect-item.warn .detect-dot { background: #facc15; }
.detect-item.fail .detect-dot { background: #ef4444; }

/* ===== Content Grid ===== */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.content-card { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 28px; }
.content-card.highlight { border-color: #3b82f6; box-shadow: 0 0 40px rgba(59,130,246,0.08); }
.content-card-icon { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 4px; margin-bottom: 12px; background: #27272a; color: #a1a1aa; }
.content-card.highlight .content-card-icon { background: rgba(59,130,246,0.2); color: #60a5fa; }
.content-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.content-card p { color: #a1a1aa; font-size: 0.9rem; margin-bottom: 16px; }
@media (max-width: 700px) {
  .content-grid { grid-template-columns: 1fr; }
}

/* ===== Mock Terminal ===== */
.mock-terminal { background: #0c0c0e; border: 1px solid #27272a; border-radius: 8px; overflow: hidden; font-family: "SF Mono", Monaco, monospace; font-size: 0.82rem; }
.mock-terminal-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #18181b; border-bottom: 1px solid #27272a; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-dot.red { background: #ef4444; }
.mock-dot.yellow { background: #eab308; }
.mock-dot.green { background: #22c55e; }
.mock-title { margin-left: auto; color: #52525b; font-size: 0.75rem; }
.mock-terminal-body { padding: 12px 16px; }
.mock-line { line-height: 1.8; color: #d4d4d8; }
.mock-line .dim { color: #52525b; }
.mock-line .tag { color: #f87171; }
.mock-line .attr { color: #a78bfa; }
.mock-line .str { color: #4ade80; }
.mock-line .fn { color: #fbbf24; }
.mock-line .kw { color: #c084fc; }
.mock-line.err { color: #ef4444; }
.mock-line.ok { color: #22c55e; }

/* ===== API Grid ===== */
.api-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.api-card { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 28px; }
.api-badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 4px; margin-bottom: 12px; }
.api-badge.declarative { background: rgba(34,197,94,0.15); color: #4ade80; }
.api-badge.imperative { background: rgba(59,130,246,0.15); color: #60a5fa; }
.api-badge.combined { background: rgba(250,204,21,0.15); color: #facc15; }
.api-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.api-card p { color: #a1a1aa; font-size: 0.9rem; margin-bottom: 16px; }
@media (max-width: 700px) {
  .api-grid { grid-template-columns: 1fr; }
}

/* ===== Steps ===== */
.steps { max-width: 640px; margin: 0 auto; }
.step { display: flex; gap: 20px; margin-bottom: 32px; }
.step-num { width: 40px; height: 40px; background: #3b82f6; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.step-content h3 { font-size: 1.05rem; margin-bottom: 4px; }
.step-content p { color: #a1a1aa; font-size: 0.9rem; margin-bottom: 12px; }

/* ===== Demo Grid ===== */
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.demo-card { display: block; background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 24px; text-decoration: none; color: inherit; transition: border-color 0.2s, transform 0.2s; }
.demo-card:hover { border-color: #3b82f6; transform: translateY(-2px); text-decoration: none; }
.demo-card h3 { font-size: 1.05rem; margin: 8px 0; }
.demo-card p { color: #71717a; font-size: 0.88rem; margin-bottom: 12px; }
.demo-link { color: #60a5fa; font-size: 0.88rem; font-weight: 500; }
@media (max-width: 600px) {
  .demo-grid { grid-template-columns: 1fr; }
}

/* ===== Compare Table ===== */
.table-wrapper { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.compare-table th { text-align: left; padding: 12px 16px; background: #18181b; border-bottom: 2px solid #3b82f6; font-weight: 600; }
.compare-table td { padding: 12px 16px; border-bottom: 1px solid #27272a; color: #a1a1aa; }
.compare-table tr:hover td { background: rgba(59,130,246,0.04); }
.compare-table td:first-child { color: #e4e4e7; font-weight: 500; }

/* ===== Resource Grid ===== */
.resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.resource-card { display: block; background: #18181b; border: 1px solid #27272a; border-radius: 10px; padding: 20px; text-decoration: none; color: inherit; transition: border-color 0.15s; }
.resource-card:hover { border-color: #3b82f6; text-decoration: none; }
.resource-card h3 { font-size: 1rem; margin-bottom: 4px; color: #fff; }
.resource-card p { font-size: 0.85rem; color: #71717a; }
@media (max-width: 600px) {
  .resource-grid { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
.footer { padding: 40px 0; border-top: 1px solid #27272a; text-align: center; }
.footer p { font-size: 0.85rem; color: #71717a; }
.footer-sub { font-size: 0.78rem; color: #52525b; margin-top: 4px; }

/* ===== Setup Page ===== */
.setup-hero { padding: 40px 0 20px; }
.setup-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.setup-hero p { color: #a1a1aa; }

.guide-step { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 28px; margin-bottom: 20px; }
.guide-step h3 { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; margin-bottom: 12px; }
.guide-step .num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: #3b82f6; color: #fff; border-radius: 50%; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; }
.guide-step p { color: #a1a1aa; font-size: 0.9rem; margin-bottom: 12px; }
.guide-step .screenshot { background: #0c0c0e; border: 1px solid #27272a; border-radius: 8px; padding: 20px; margin: 16px 0; }

.download-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.download-card { background: #27272a; border: 1px solid #3f3f46; border-radius: 8px; padding: 16px; text-align: center; }
.download-card .os { font-size: 1.4rem; margin-bottom: 4px; }
.download-card .os-name { font-weight: 600; margin-bottom: 8px; }
@media (max-width: 500px) {
  .download-cards { grid-template-columns: 1fr; }
}

.flag-mock { display: flex; align-items: center; gap: 16px; padding: 16px; background: #1c1c22; border-radius: 8px; margin: 12px 0; flex-wrap: wrap; }
.flag-mock .flag-name { font-family: monospace; font-size: 0.9rem; color: #60a5fa; flex: 1; min-width: 200px; }
.flag-mock .flag-select { display: inline-block; padding: 6px 16px; background: #3b82f6; color: #fff; border-radius: 4px; font-size: 0.85rem; font-weight: 600; }

/* ===== Demo Page Shared ===== */
.demo-hero { padding: 24px 0; }
.demo-hero h1 { font-size: 1.8rem; margin-bottom: 8px; }
.demo-hero .back { color: #60a5fa; font-size: 0.9rem; display: inline-block; margin-bottom: 16px; }

.form-section { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.form-section h2 { font-size: 1.1rem; margin-bottom: 4px; }
.form-section .tool-info { color: #4ade80; font-size: 0.8rem; margin-bottom: 16px; font-family: monospace; }

label { display: block; color: #a1a1aa; font-size: 0.85rem; margin-bottom: 4px; margin-top: 12px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; background: #27272a; border: 1px solid #3f3f46;
  border-radius: 6px; color: #e4e4e7; font-size: 0.95rem; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #3b82f6; }
button { padding: 10px 24px; background: #3b82f6; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: 500; margin-top: 12px; }
button:hover { background: #2563eb; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }
button.secondary-btn { background: #27272a; color: #e4e4e7; border: 1px solid #3f3f46; }

.tool-card { background: #0c0c0e; border: 1px solid #27272a; border-radius: 8px; padding: 16px; margin-bottom: 10px; }
.tool-card h3 { font-size: 0.95rem; color: #60a5fa; margin-bottom: 4px; }
.tool-card p { color: #a1a1aa; font-size: 0.85rem; }
.tool-card pre { font-family: monospace; font-size: 0.8rem; color: #52525b; margin-top: 8px; white-space: pre-wrap; }

.log-area { background: #0c0c0e; border: 1px solid #27272a; border-radius: 8px; padding: 16px; min-height: 80px; max-height: 400px; overflow-y: auto; font-family: "SF Mono", Monaco, monospace; font-size: 0.82rem; color: #71717a; }

.status-bar { padding: 8px 14px; border-radius: 6px; font-size: 0.85rem; margin-bottom: 16px; }
.status-bar.ok { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.status-bar.err { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.status-bar.pending { background: rgba(250,204,21,0.1); color: #facc15; border: 1px solid rgba(250,204,21,0.2); }

.todo-list { list-style: none; padding: 0; }
.todo-list li { padding: 8px 0; border-bottom: 1px solid #27272a; }
.todo-list li.done { text-decoration: line-through; color: #52525b; }

/* Products */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.product-card { background: #0c0c0e; border: 1px solid #27272a; border-radius: 8px; padding: 16px; }
.product-card h3 { font-size: 0.9rem; margin-bottom: 4px; }
.product-card .price { color: #facc15; font-size: 1.05rem; font-weight: 700; margin: 6px 0; }
.product-card .cat { color: #52525b; font-size: 0.8rem; }
.product-card button { padding: 6px 14px; font-size: 0.82rem; margin-top: 8px; }

.cart { list-style: none; padding: 0; }
.cart li { padding: 8px 0; border-bottom: 1px solid #27272a; display: flex; justify-content: space-between; }
.cart-total { margin-top: 12px; font-size: 1.1rem; color: #facc15; font-weight: 700; }

/* Logger Stats */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-box { background: #18181b; border: 1px solid #27272a; border-radius: 8px; padding: 16px; text-align: center; }
.stat-box .num { font-size: 2rem; font-weight: 800; color: #60a5fa; }
.stat-box .label { font-size: 0.8rem; color: #71717a; margin-top: 4px; }

/* Info Box */
.info-box { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); border-radius: 8px; padding: 16px 20px; margin: 16px 0; font-size: 0.9rem; color: #93c5fd; line-height: 1.6; }
.info-box strong { color: #60a5fa; }

/* Code Block */
.code-block { background: #0c0c0e; border: 1px solid #27272a; border-radius: 8px; overflow: hidden; margin: 12px 0; }
.code-block-header { padding: 8px 16px; background: #18181b; border-bottom: 1px solid #27272a; font-size: 0.78rem; color: #52525b; }
.code-block pre { padding: 16px; margin: 0; font-family: "SF Mono", Monaco, monospace; font-size: 0.82rem; color: #a1a1aa; white-space: pre; overflow-x: auto; }
