/* DevOps Kit 前端公共样式 */
:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --border-accent: #388bfd;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-strong: #f0f6fc;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --accent-green: #3fb950;
  --accent-purple: #a371f7;
  --accent-orange: #d29922;
  --accent-cyan: #39c5cf;
  --accent-yellow: #fbc02d;
  --accent-pink: #ec407a;
  --accent-indigo: #7986cb;
  --accent-teal: #26a69a;
  --accent-rose: #e91e63;
  --success: #3fb950;
  --error: #f85149;
  --gradient-primary: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
  --gradient-soft: linear-gradient(135deg, rgba(88, 166, 255, 0.15) 0%, rgba(163, 113, 247, 0.1) 100%);
  --radius: 8px;
  --radius-lg: 10px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --input-bg: #0d1117;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-focus: 0 0 0 3px rgba(88, 166, 255, 0.25);
  /* 功能选择 / 输入 / 结果 三区配色 */
  --zone-tabs-bg: rgba(88, 166, 255, 0.08);
  --zone-tabs-border: rgba(88, 166, 255, 0.35);
  --zone-input-bg: rgba(26, 35, 50, 0.6);
  --zone-input-border: rgba(45, 58, 77, 0.9);
  --zone-result-bg: rgba(63, 185, 80, 0.06);
  --zone-result-border: rgba(63, 185, 80, 0.35);
}

[data-theme="light"] {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --border: #d1d5db;
  --border-accent: #1890ff;
  --text: #1e293b;
  --text-muted: #475569;
  --text-strong: #0f172a;
  --accent: #1890ff;
  --accent-hover: #40a9ff;
  --accent-green: #16a34a;
  --accent-purple: #722ed1;
  --accent-orange: #ea580c;
  --accent-cyan: #0d9488;
  --accent-yellow: #ca8a04;
  --accent-pink: #db2777;
  --accent-indigo: #4f46e5;
  --accent-teal: #0f766e;
  --accent-rose: #e11d48;
  --success: #16a34a;
  --error: #dc2626;
  --gradient-primary: linear-gradient(135deg, #1890ff 0%, #722ed1 100%);
  --gradient-soft: linear-gradient(135deg, rgba(24, 144, 255, 0.12) 0%, rgba(114, 46, 209, 0.08) 100%);
  --input-bg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-focus: 0 0 0 3px rgba(24, 144, 255, 0.25);
  --zone-tabs-bg: rgba(24, 144, 255, 0.06);
  --zone-tabs-border: rgba(24, 144, 255, 0.3);
  --zone-input-bg: #ffffff;
  --zone-input-border: #d1d5db;
  --zone-result-bg: rgba(22, 163, 74, 0.04);
  --zone-result-border: rgba(22, 163, 74, 0.3);
}

[data-theme="light"] .result-table-view thead {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .result-table-view tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .result-table-view tbody tr:hover {
  background: rgba(9, 105, 218, 0.06);
}

/* ===== Skip to Content (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: -4px;
}

/* ===== Theme Switch ===== */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.theme-switch {
  position: relative;
  display: inline-block;
  margin: 0;
  width: 40px;
  height: 22px;
  border-radius: 22px;
  background-color: var(--input-bg);
  border: 1px solid var(--border);
  transition: border-color 0.3s;
  cursor: pointer;
}

.theme-switch:hover {
  border-color: var(--border-accent);
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input:checked+.slider {
  transform: translateX(18px);
  background-color: #ffffff;
}

.theme-switch-icon {
  position: absolute;
  top: 4px;
  width: 12px;
  height: 12px;
  fill: var(--text-muted);
  transition: opacity 0.3s;
  z-index: 1;
}

.vt-switch-appearance-sun {
  left: 4px;
  opacity: 1;
}

.vt-switch-appearance-moon {
  right: 4px;
  opacity: 1;
}

input:checked~.vt-switch-appearance-sun {
  opacity: 0.3;
}

input:not(:checked)~.vt-switch-appearance-moon {
  opacity: 0.3;
}

[data-theme="light"] .theme-switch {
  background-color: #f1f1f1;
}

[data-theme="light"] input:checked+.slider {
  background-color: var(--accent);
}

/* ===== Reset & Base ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 1rem;
  -webkit-text-size-adjust: 100%;
}

/* ===== Header ===== */
.app-header {
  background: var(--surface);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--accent) 0%, var(--accent-purple) 100%) 1;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 2px 8px rgba(88, 166, 255, 0.08), 0 1px 3px rgba(0, 0, 0, 0.12);
  position: sticky;
  top: 0;
  z-index: 100;
}

[data-theme="light"] .app-header {
  background: linear-gradient(90deg, #ffffff 0%, rgba(24, 144, 255, 0.04) 50%, rgba(255, 255, 255, 1) 100%);
  box-shadow: 0 2px 12px rgba(24, 144, 255, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.app-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.app-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.app-title a:hover {
  color: var(--accent);
}

/* ===== Hamburger Menu Button ===== */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  gap: 5px;
}

.hamburger-btn:hover {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}

.hamburger-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.hamburger-btn .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.hamburger-btn[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-btn[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* ===== Navigation ===== */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  min-height: 36px;
}

.nav-links a .nav-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.85;
}

.nav-links a:hover .nav-icon,
.nav-links a.active .nav-icon {
  opacity: 1;
}

/* Nav icons - dark theme stroke #b1bac4 */
.nav-icon-home { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E"); }
.nav-icon-cidr { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.nav-icon-ops { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
.nav-icon-asn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }
.nav-icon-encode { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E"); }
.nav-icon-time { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E"); }
.nav-icon-lookup { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E"); }
.nav-icon-text { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7V4h16v3M9 21h6M12 4v17'/%3E%3C/svg%3E"); }
.nav-icon-crypto { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.nav-icon-network { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }

/* Light theme nav icons - stroke #475569 */
[data-theme="light"] .nav-icon-home { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-icon-cidr { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-icon-ops { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-icon-asn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-icon-encode { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-icon-time { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-icon-lookup { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-icon-text { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7V4h16v3M9 21h6M12 4v17'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-icon-crypto { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-icon-network { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }

/* Active nav icons - dark theme */
.nav-links a:nth-child(2):hover .nav-icon-cidr,
.nav-links a:nth-child(2).active .nav-icon-cidr { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2339c5cf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.nav-links a:nth-child(3):hover .nav-icon-ops,
.nav-links a:nth-child(3).active .nav-icon-ops { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233fb950' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
.nav-links a:nth-child(4):hover .nav-icon-asn,
.nav-links a:nth-child(4).active .nav-icon-asn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a371f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }
.nav-links a:nth-child(5):hover .nav-icon-encode,
.nav-links a:nth-child(5).active .nav-icon-encode { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d29922' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E"); }
.nav-links a:nth-child(6):hover .nav-icon-time,
.nav-links a:nth-child(6).active .nav-icon-time { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fbc02d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E"); }
.nav-links a:nth-child(7):hover .nav-icon-lookup,
.nav-links a:nth-child(7).active .nav-icon-lookup { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ec407a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E"); }
.nav-links a:nth-child(8):hover .nav-icon-text,
.nav-links a:nth-child(8).active .nav-icon-text { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237986cb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7V4h16v3M9 21h6M12 4v17'/%3E%3C/svg%3E"); }
.nav-links a:nth-child(9):hover .nav-icon-crypto,
.nav-links a:nth-child(9).active .nav-icon-crypto { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2326a69a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.nav-links a:nth-child(10):hover .nav-icon-network,
.nav-links a:nth-child(10).active .nav-icon-network { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e91e63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }

/* Active nav icons - light theme */
[data-theme="light"] .nav-links a:nth-child(2):hover .nav-icon-cidr,
[data-theme="light"] .nav-links a:nth-child(2).active .nav-icon-cidr { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-links a:nth-child(3):hover .nav-icon-ops,
[data-theme="light"] .nav-links a:nth-child(3).active .nav-icon-ops { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-links a:nth-child(4):hover .nav-icon-asn,
[data-theme="light"] .nav-links a:nth-child(4).active .nav-icon-asn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23722ed1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-links a:nth-child(5):hover .nav-icon-encode,
[data-theme="light"] .nav-links a:nth-child(5).active .nav-icon-encode { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-links a:nth-child(6):hover .nav-icon-time,
[data-theme="light"] .nav-links a:nth-child(6).active .nav-icon-time { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ca8a04' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-links a:nth-child(7):hover .nav-icon-lookup,
[data-theme="light"] .nav-links a:nth-child(7).active .nav-icon-lookup { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23db2777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-links a:nth-child(8):hover .nav-icon-text,
[data-theme="light"] .nav-links a:nth-child(8).active .nav-icon-text { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7V4h16v3M9 21h6M12 4v17'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-links a:nth-child(9):hover .nav-icon-crypto,
[data-theme="light"] .nav-links a:nth-child(9).active .nav-icon-crypto { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
[data-theme="light"] .nav-links a:nth-child(10):hover .nav-icon-network,
[data-theme="light"] .nav-links a:nth-child(10).active .nav-icon-network { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e11d48' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E"); }

/* Active & Hover states for nav links */
.nav-links a.active {
  color: var(--accent);
  font-weight: 500;
  background: rgba(88, 166, 255, 0.1);
}

.nav-links a:nth-child(2).active { color: var(--accent-cyan); background: rgba(57, 197, 207, 0.1); }
.nav-links a:nth-child(3).active { color: var(--accent-green); background: rgba(63, 185, 80, 0.1); }
.nav-links a:nth-child(4).active { color: var(--accent-purple); background: rgba(163, 113, 247, 0.1); }
.nav-links a:nth-child(5).active { color: var(--accent-orange); background: rgba(210, 153, 34, 0.1); }
.nav-links a:nth-child(6).active { color: var(--accent-yellow); background: rgba(251, 192, 45, 0.1); }
.nav-links a:nth-child(7).active { color: var(--accent-pink); background: rgba(236, 64, 122, 0.1); }
.nav-links a:nth-child(8).active { color: var(--accent-indigo); background: rgba(121, 134, 203, 0.1); }
.nav-links a:nth-child(9).active { color: var(--accent-teal); background: rgba(38, 166, 154, 0.1); }
.nav-links a:nth-child(10).active { color: var(--accent-rose); background: rgba(233, 30, 99, 0.1); }

.nav-links a:hover {
  background: rgba(88, 166, 255, 0.1);
}
.nav-links a:nth-child(2):hover { color: var(--accent-cyan); background: rgba(57, 197, 207, 0.1); }
.nav-links a:nth-child(3):hover { color: var(--accent-green); background: rgba(63, 185, 80, 0.1); }
.nav-links a:nth-child(4):hover { color: var(--accent-purple); background: rgba(163, 113, 247, 0.1); }
.nav-links a:nth-child(5):hover { color: var(--accent-orange); background: rgba(210, 153, 34, 0.1); }
.nav-links a:nth-child(6):hover { color: var(--accent-yellow); background: rgba(251, 192, 45, 0.1); }
.nav-links a:nth-child(7):hover { color: var(--accent-pink); background: rgba(236, 64, 122, 0.1); }
.nav-links a:nth-child(8):hover { color: var(--accent-indigo); background: rgba(121, 134, 203, 0.1); }
.nav-links a:nth-child(9):hover { color: var(--accent-teal); background: rgba(38, 166, 154, 0.1); }
.nav-links a:nth-child(10):hover { color: var(--accent-rose); background: rgba(233, 30, 99, 0.1); }

/* ===== Logo ===== */
.app-title-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
}

.app-title-link:hover {
  color: var(--accent);
}

.app-logo {
  width: 1.5rem;
  height: 1.5rem;
  background: var(--gradient-primary);
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(88, 166, 255, 0.35), 0 0 0 1px rgba(163, 113, 247, 0.2);
}

[data-theme="light"] .app-logo {
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3), 0 0 0 1px rgba(114, 46, 209, 0.15);
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  min-width: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
}

.theme-toggle .theme-icon {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.theme-toggle .theme-icon-sun { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E"); }
.theme-toggle .theme-icon-moon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23b1bac4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E"); }
.theme-toggle .theme-toggle-label { font-size: 0.85rem; }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* ===== Main Content Area ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.page-title {
  font-size: 1.875rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-desc {
  color: var(--text-muted);
  margin: 0 0 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--zone-tabs-border);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 50rem;
  font-weight: 500;
}

/* ===== Landing Page ===== */
.landing-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

[data-theme="light"] .landing-main {
  background: linear-gradient(180deg, #e8f4fc 0%, #f0f4f8 35%, #f8fafc 100%);
  min-height: calc(100vh - 4rem);
}

.landing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  text-align: left;
  padding: 4rem 0;
  background: transparent;
}

.landing-hero-content {
  flex: 1;
  max-width: 600px;
}

.landing-hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-img {
  width: 100%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

[data-theme="light"] .hero-img {
  box-shadow: 0 20px 50px rgba(24, 144, 255, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--gradient-soft);
  border: 1px solid var(--zone-tabs-border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.landing-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin: 0 0 1.5rem;
  line-height: 1.1;
}

.landing-title-line1 {
  display: block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-title-line2 {
  display: block;
  font-size: 0.55em;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.5rem;
  letter-spacing: -0.01em;
}

[data-theme="light"] .landing-title-line2 {
  color: #334155;
}

.landing-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  text-align: left;
  max-width: 100%;
}

[data-theme="light"] .landing-tagline { color: #334155; }

.landing-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.landing-cta .btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.05rem;
}

.landing-features-wrap {
  margin-bottom: 5rem;
}

.landing-section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 3rem 0 2rem;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.landing-stats {
  display: flex;
  justify-content: space-around;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  margin-bottom: 5rem;
  box-shadow: var(--shadow-sm), inset 0 0 20px rgba(88, 166, 255, 0.03);
  backdrop-filter: blur(8px);
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.landing-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.benefit-card {
  position: relative;
  text-align: center;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.benefit-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(88, 166, 255, 0.1);
  transform: translateY(-2px);
}

.benefit-icon-wrap {
  width: 4.5rem;
  height: 4.5rem;
  background: var(--gradient-soft);
  border: 1px solid var(--zone-tabs-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 20px rgba(88, 166, 255, 0.1);
}

.benefit-icon-wrap svg {
  width: 2rem;
  height: 2rem;
  stroke: var(--accent);
}

.benefit-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-strong);
}

.benefit-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Feature Cards ===== */
.feature-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2.25rem;
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  text-decoration: none !important;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.feature-card * {
  text-decoration: none !important;
}

[data-theme="light"] .feature-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(88, 166, 255, 0.3);
  background: rgba(30, 41, 59, 0.6);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .feature-card:hover {
  background: #ffffff;
  border-color: #1890ff;
  box-shadow: 0 8px 24px rgba(24, 144, 255, 0.12), 0 4px 12px rgba(114, 46, 209, 0.06);
}

.feature-card:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.feature-card:nth-child(1) { border-top: 4px solid var(--accent-cyan); }
.feature-card:nth-child(2) { border-top: 4px solid var(--accent-green); }
.feature-card:nth-child(3) { border-top: 4px solid var(--accent-purple); }
.feature-card:nth-child(4) { border-top: 4px solid var(--accent-orange); }
.feature-card:nth-child(5) { border-top: 4px solid var(--accent-yellow); }
.feature-card:nth-child(6) { border-top: 4px solid var(--accent-rose); }

[data-theme="light"] .feature-card:nth-child(1) {
  background: linear-gradient(135deg, #ffffff 0%, rgba(24, 144, 255, 0.04) 100%);
  border-left: 4px solid #1890ff;
}
[data-theme="light"] .feature-card:nth-child(2) {
  background: linear-gradient(135deg, #ffffff 0%, rgba(22, 163, 74, 0.04) 100%);
  border-left: 4px solid #16a34a;
}
[data-theme="light"] .feature-card:nth-child(3) {
  background: linear-gradient(135deg, #ffffff 0%, rgba(114, 46, 209, 0.04) 100%);
  border-left: 4px solid #722ed1;
}

.feature-icon {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border-radius: 10px;
  flex-shrink: 0;
  background-size: 1.75rem;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-icon-aggregate {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.3) 0%, rgba(163, 113, 247, 0.12) 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2358a6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  background-size: 1.5rem;
  background-repeat: no-repeat;
  background-position: center;
}
.feature-icon-ops {
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.3) 0%, rgba(57, 197, 207, 0.15) 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233fb950' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E");
  background-size: 1.5rem;
  background-repeat: no-repeat;
  background-position: center;
}
.feature-icon-asn {
  background: linear-gradient(135deg, rgba(163, 113, 247, 0.3) 0%, rgba(88, 166, 255, 0.15) 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a371f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
  background-size: 1.5rem;
  background-repeat: no-repeat;
  background-position: center;
}
.feature-icon-encode {
  background: linear-gradient(135deg, rgba(210, 153, 34, 0.3) 0%, rgba(251, 192, 45, 0.15) 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23d29922' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E");
  background-size: 1.5rem;
  background-repeat: no-repeat;
  background-position: center;
}
.feature-icon-time {
  background: linear-gradient(135deg, rgba(251, 192, 45, 0.3) 0%, rgba(210, 153, 34, 0.15) 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fbc02d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  background-size: 1.5rem;
  background-repeat: no-repeat;
  background-position: center;
}
.feature-icon-network {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.3) 0%, rgba(163, 113, 247, 0.15) 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e91e63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
  background-size: 1.5rem;
  background-repeat: no-repeat;
  background-position: center;
}

.feature-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text-strong);
}

.feature-desc {
  flex-grow: 1;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.feature-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s ease, color 0.2s ease;
}

.feature-card:hover .feature-cta {
  gap: 0.75rem;
  color: var(--accent-hover);
}

/* ===== Final CTA ===== */
.final-cta {
  text-align: center;
  padding: 6rem 2rem;
  background: var(--gradient-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--zone-tabs-border);
  margin-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.05) 0%, transparent 70%);
  z-index: 0;
}

.final-cta-content {
  position: relative;
  z-index: 1;
}

.final-cta h3 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.final-cta p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* ===== Tab List ===== */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.1) 0%, rgba(163, 113, 247, 0.06) 100%);
  border: 2px solid rgba(88, 166, 255, 0.4);
  border-radius: 12px;
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(88, 166, 255, 0.12), 0 0 20px rgba(163, 113, 247, 0.06), 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Scroll fade indicator */
  background-attachment: local, scroll;
  --fade-color: var(--bg);
}

/* Right-edge fade when tabs overflow (mobile) */
.tab-list::after {
  content: '';
  position: sticky;
  right: -1px;
  width: 2rem;
  min-width: 2rem;
  flex-shrink: 0;
  background: linear-gradient(90deg, transparent, var(--bg) 80%);
  pointer-events: none;
  z-index: 1;
  border-radius: 0 12px 12px 0;
  margin: -0.8rem -0.8rem -0.8rem 0;
  padding: 0.8rem 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tab-list.scrollable::after {
  opacity: 1;
}

[data-theme="light"] .tab-list::after {
  background: linear-gradient(90deg, transparent, #f0f4f8 80%);
}

[data-theme="light"] .tab-list {
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.08) 0%, rgba(114, 46, 209, 0.05) 100%);
  border-color: rgba(24, 144, 255, 0.3);
  box-shadow: 0 2px 12px rgba(24, 144, 255, 0.1), 0 0 24px rgba(114, 46, 209, 0.04), 0 1px 4px rgba(0, 0, 0, 0.06);
}

.tab-list button {
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  margin: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  white-space: nowrap;
  min-height: 44px;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tab-list button:hover {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}

[data-theme="light"] .tab-list button:hover {
  background: rgba(24, 144, 255, 0.1);
}

.tab-list button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

.tab-list button.active {
  color: var(--accent);
  font-weight: 600;
  background: var(--gradient-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(88, 166, 255, 0.2), 0 0 0 1px rgba(163, 113, 247, 0.08);
}

[data-theme="light"] .tab-list button.active {
  background: var(--gradient-soft);
  border-left: 4px solid var(--accent);
  color: #096dd9;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.18), 0 0 0 1px rgba(114, 46, 209, 0.06);
}

/* ===== Tab Panels ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; margin-top: 0.25rem; }

.tab-panel .card:not(.card-result) {
  position: relative;
  background: var(--zone-input-bg);
  border-color: var(--zone-input-border);
  border-left: none;
  overflow: hidden;
}

.tab-panel .card:not(.card-result)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-purple) 100%);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .card,
[data-theme="light"] .tab-panel .card:not(.card-result) {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-strong);
}

.card.card-result {
  background: var(--zone-result-bg);
  border: 2px solid var(--zone-result-border);
  border-left-width: 4px;
  border-left-color: var(--accent-green);
  box-shadow: 0 2px 8px rgba(63, 185, 80, 0.08);
}

/* ===== Forms ===== */
label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--text-muted);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='%238b949e'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  min-height: 44px;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row-inline {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-row-inline .form-group {
  flex: 1;
  min-width: 140px;
}

.chk-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.chk-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  cursor: pointer;
  min-height: 44px;
}

.chk-group input[type="checkbox"],
.chk-group input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
  accent-color: var(--accent);
}

.extract-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.extract-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  box-shadow: 0 2px 10px rgba(88, 166, 255, 0.4), 0 2px 6px rgba(163, 113, 247, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-purple) 100%);
  box-shadow: 0 4px 14px rgba(88, 166, 255, 0.45), 0 4px 10px rgba(163, 113, 247, 0.25), 0 2px 4px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(88, 166, 255, 0.3);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus), 0 2px 8px rgba(88, 166, 255, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border: 2px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(88, 166, 255, 0.12);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(88, 166, 255, 0.15);
  transform: translateY(-1px);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn .btn-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.35rem;
  vertical-align: -0.2em;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  min-height: 36px;
}

/* Button icons - dark */
.btn-icon-copy { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2358a6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
.btn-icon-extract { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2358a6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); }

/* Primary button icons white */
.btn-primary .btn-icon-copy { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
.btn-primary .btn-icon-extract { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); }

/* Button icons - light theme */
[data-theme="light"] .btn-icon-copy { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231890ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
[data-theme="light"] .btn-icon-extract { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231890ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); }
[data-theme="light"] .btn-primary .btn-icon-copy { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
[data-theme="light"] .btn-primary .btn-icon-extract { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); }

/* ===== Focus Management ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Result Boxes ===== */
.result-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
  overflow: visible;
  min-height: 80px;
}

.result-box>.result-summary { margin-bottom: 0.5rem; }
.result-box>.result-summary:empty { display: none; }

.result-box.success {
  position: relative;
  border-color: var(--success);
  border-left: none;
  background: var(--surface);
  overflow: hidden;
}

.result-box.success::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-green) 0%, var(--accent-cyan) 100%);
  border-radius: var(--radius) 0 0 var(--radius);
}

[data-theme="light"] .result-box.success {
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.12);
}

[data-theme="light"] .result-box.success::before {
  background: linear-gradient(180deg, #16a34a 0%, #0d9488 100%);
}

.result-box.error {
  border-color: var(--error);
  border-left-width: 4px;
  border-left-color: var(--error);
  color: var(--text);
  background: var(--surface);
}

[data-theme="light"] .result-box.error {
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.result-box.error .result-table-view {
  color: var(--error);
}

.result-box.placeholder {
  color: var(--text-muted);
  font-style: normal;
}

.result-box.loading {
  border-color: var(--accent);
  animation: pulse-border 1.5s ease-in-out infinite;
}

@keyframes pulse-border {
  50% { opacity: 0.7; }
}

/* ===== Button Loading State ===== */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-primary.is-loading {
  background: var(--gradient-primary);
  opacity: 0.8;
}

.btn-primary.is-loading::after {
  border-top-color: #fff;
}

/* ===== Loading Spinner ===== */
.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.badge-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--accent-cyan) 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(63, 185, 80, 0.4);
}

.badge-error {
  background: linear-gradient(135deg, var(--error) 0%, #ff4d4f 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(245, 34, 45, 0.35);
}

/* ===== Result Actions ===== */
.result-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.result-summary {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ===== Result Table View ===== */
.result-table-view {
  max-height: 420px;
  overflow: auto;
  margin: 0;
  padding: 0.25rem 0;
  -webkit-overflow-scrolling: touch;
}

.result-table-view.placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.result-table-view .result-pre {
  margin: 0;
  padding: 0.75rem;
  font-family: 'Consolas', 'Monaco', 'SF Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.result-table-view .table-wrap {
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow-x: auto;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.result-table-view .table-wrap+.table-wrap {
  margin-top: 1rem;
}

.result-table-view table {
  width: 100%;
  min-width: 200px;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 0;
}

.result-table-view thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 2px solid var(--border);
}

.result-table-view thead th {
  color: var(--text);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

.result-table-view tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.03);
}

.result-table-view tbody tr:hover {
  background: rgba(88, 166, 255, 0.06);
}

.result-table-view th,
.result-table-view td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.result-table-view th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: none;
  white-space: nowrap;
}

.result-table-view td {
  line-height: 1.4;
}

.result-table-view td:first-child:only-child,
.result-table-view td[style*="white-space:pre-wrap"] {
  font-family: 'Consolas', 'Monaco', 'SF Mono', monospace;
  font-size: 0.85em;
  word-break: break-all;
}

.result-table-view .result-summary {
  margin-top: 0.5rem;
}

.result-table-view .result-summary:first-child {
  margin-top: 0;
}

/* Table wraps */
.table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

/* Legacy result-box tables */
.result-box table {
  width: 100%;
  min-width: 200px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.result-box th,
.result-box td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.result-box th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* ===== Loading state ===== */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ===== Code ===== */
code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ===== Footer ===== */
.app-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

[data-theme="light"] .app-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, #f0f4f8 100%);
  border-top: 1px solid rgba(24, 144, 255, 0.12);
}

.app-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.app-footer a:hover {
  text-decoration: underline;
}

.footer-sep {
  margin: 0 0.75rem;
  opacity: 0.4;
  user-select: none;
}

.footer-more {
  opacity: 0.8;
}

.footer-links {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
}

.api-base-hint {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-img {
    animation: none;
  }
}

/* =================================================================== */
/*                        RESPONSIVE BREAKPOINTS                       */
/* =================================================================== */

/* ---- Tablet (≤1024px) ---- */
@media (max-width: 1024px) {
  .landing-hero {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 2rem 0;
  }

  .landing-hero-content {
    max-width: 100%;
  }

  .landing-tagline {
    text-align: center;
  }

  .landing-cta {
    justify-content: center;
  }

  .landing-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-img {
    max-width: 380px;
  }
}

/* ---- Small Tablet / Large Phone (≤768px) ---- */
@media (max-width: 768px) {
  /* Header */
  .app-header {
    padding: 0.6rem 1rem;
  }

  /* Show hamburger, hide nav by default */
  .hamburger-btn {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 85vw);
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    padding-top: 4.5rem;
    z-index: 99;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-links.mobile-open {
    display: flex;
    transform: translateX(0);
  }

  .nav-links a {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius);
    min-height: 44px;
  }

  .theme-switch-wrapper {
    margin-left: 0;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
  }

  /* Main content */
  main {
    padding: 1.25rem 1rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .page-desc {
    font-size: 0.9375rem;
    padding-left: 0.75rem;
  }

  /* Landing */
  .landing-main {
    padding: 1rem;
  }

  .landing-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .landing-tagline {
    font-size: 1.05rem;
  }

  .landing-stats {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .landing-features {
    grid-template-columns: 1fr;
  }

  .landing-benefits {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .benefit-card {
    padding: 1.5rem;
  }

  .landing-section-title {
    font-size: 1.5rem;
    margin: 2rem 0 1.5rem;
  }

  .final-cta {
    padding: 3rem 1.25rem;
  }

  .final-cta h3 {
    font-size: 1.5rem;
  }

  .final-cta p {
    font-size: 1rem;
  }

  /* Feature cards */
  .feature-card {
    padding: 1.5rem;
  }

  .feature-icon {
    width: 2.75rem;
    height: 2.75rem;
    background-size: 1.4rem;
    margin-bottom: 1rem;
  }

  /* Tab list - horizontal scroll */
  .tab-list {
    padding: 0.6rem;
    gap: 0.25rem;
    border-radius: 10px;
  }

  .tab-list button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-height: 40px;
  }

  /* Forms */
  .form-row-inline {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-row-inline .form-group {
    min-width: 100%;
  }

  .extract-row {
    gap: 0.4rem;
  }

  .extract-row .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  /* Cards */
  .card {
    padding: 1rem;
  }

  .result-table-view {
    max-height: 350px;
  }

  /* Footer */
  .app-footer {
    font-size: 0.8rem;
    padding: 1.25rem 0.75rem;
  }
}

/* ---- Small Phone (≤480px) ---- */
@media (max-width: 480px) {
  .app-header {
    padding: 0.5rem 0.75rem;
  }

  .app-title {
    font-size: 1.05rem;
  }

  .nav-links {
    width: 100vw;
  }

  main {
    padding: 1rem 0.75rem;
  }

  .page-title {
    font-size: 1.35rem;
  }

  .landing-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .landing-hero {
    padding: 1.5rem 0;
  }

  .hero-img {
    max-width: 280px;
  }

  .tab-list button {
    font-size: 0.8rem;
    padding: 0.45rem 0.8rem;
    min-height: 38px;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
    min-height: 42px;
  }

  .btn-lg,
  .landing-cta .btn-lg {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  input[type="text"],
  input[type="number"],
  textarea,
  select {
    font-size: 1rem;
    padding: 0.6rem 0.75rem;
  }

  .result-box {
    padding: 0.75rem;
  }

  .result-table-view {
    max-height: 300px;
  }

  .landing-stats {
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    margin-bottom: 3rem;
  }

  .landing-features-wrap {
    margin-bottom: 3rem;
  }

  .final-cta {
    padding: 2.5rem 1rem;
    margin-bottom: 2.5rem;
  }
}
