:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #1a2234;
  --bg-card-hover: #222d44;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(6, 182, 212, 0.5);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.15);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
}

/* Header & Navigation */
header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding: 10px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  max-width: 100%;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
  flex-shrink: 0;
}

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

@media (max-width: 640px) {
  .nav-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
  }
  .nav-links {
    width: 100%;
  }
}

/* Hero Section */
.hero {
  padding: 40px 0 24px;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 5.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 40%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
}

.hero p {
  font-size: clamp(0.92rem, 2.5vw, 1.08rem);
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 24px;
}

/* Hardware Spec Card */
.hardware-spec-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  text-align: left;
  width: 100%;
}

@media (max-width: 520px) {
  .hardware-spec-card {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
  }
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.spec-item .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.spec-item .val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
  word-break: break-word;
}

.spec-item .sub {
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

/* Sections */
section {
  padding: 30px 0;
  width: 100%;
}

.section-title {
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.92rem;
}

/* Timing Banner & Cards */
.timing-highlight-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.timing-highlight-text h3 {
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  color: var(--accent-emerald);
  margin-bottom: 4px;
}

.timing-highlight-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 680px;
}

.timing-pill-cta {
  background: var(--accent-emerald);
  color: #06281e;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .timing-highlight-box {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  .timing-pill-cta {
    align-self: flex-start;
  }
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
  width: 100%;
}

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

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
}

.timeline-card.optimal {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-card) 100%);
}

.timeline-card.warning {
  border-color: rgba(244, 63, 94, 0.4);
}

.timeline-card .phase {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.timeline-card .phase.green { color: var(--accent-emerald); }
.timeline-card .phase.amber { color: var(--accent-amber); }
.timeline-card .phase.rose { color: var(--accent-rose); }

.timeline-card h4 {
  font-size: 1.08rem;
  margin-bottom: 6px;
  color: #fff;
}

.timeline-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Info Grid (Negotiation & Security) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  width: 100%;
  min-width: 0;
}

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

.info-grid > * {
  min-width: 0;
}

/* Pricing Matrix Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
  width: 100%;
  min-width: 0;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

@media (max-width: 640px) {
  .card {
    padding: 20px 14px 16px;
  }
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

.card.featured {
  border-color: rgba(6, 182, 212, 0.4);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.05) 0%, var(--bg-card) 100%);
  margin-top: 6px;
}

.featured-tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.35);
  z-index: 2;
  pointer-events: none;
  max-width: 90%;
  text-overflow: ellipsis;
  overflow: hidden;
}

.card-header {
  margin-bottom: 14px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.price-box {
  margin: 14px 0;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.price-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.price-val {
  font-size: clamp(1.6rem, 5vw, 1.95rem);
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
}

.price-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.features-list {
  list-style: none;
  margin-top: 14px;
}

.features-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.features-list li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent-emerald);
}

/* Interactive Calculator */
.calc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  width: 100%;
}

@media (max-width: 900px) {
  .calc-panel {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 20px;
  }
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.control-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.control-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  width: 100%;
}

.btn-choice {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.btn-choice:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-choice.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.slider-container input[type="range"] {
  flex: 1;
  accent-color: var(--accent-cyan);
  min-width: 0;
}

.slider-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 65px;
  text-align: right;
}

.preset-group {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.preset-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.preset-btn:hover {
  border-color: var(--accent-cyan);
  color: #fff;
}

.preset-btn.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.calc-results {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.payout-hero {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.payout-hero .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.payout-hero .amount {
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 800;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  margin: 2px 0;
  word-break: break-all;
}

.payout-hero .sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.payout-breakdown {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  gap: 8px;
}

.breakdown-row.total {
  font-weight: 700;
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  color: var(--text-primary);
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  display: block;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.channel-tag {
  display: inline-block;
  font-weight: 700;
  color: var(--text-primary);
}

/* Code Snippets */
.code-block {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.code-header {
  background: var(--bg-secondary);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.btn-copy {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--bg-card);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

pre {
  padding: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.80rem;
  color: #a5b4fc;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
}

pre code {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  display: inline-block;
  max-width: 100%;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}
