  :root {
    --bg: #050a0e;
    --surface: #0b1520;
    --surface2: #0f1e2e;
    --border: #1a3a50;
    --accent: #00e5ff;
    --accent2: #7b61ff;
    --accent3: #00ff88;
    --warn: #ff6b35;
    --text: #e0f0ff;
    --muted: #4a7a99;
    --glow: rgba(0, 229, 255, 0.15);
  }

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

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* Grid background */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
  }

  /* Orb glow */
  body::after {
    content: '';
    position: fixed;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,229,255,0.06) 0%, transparent 70%);
    top: -200px; right: -200px;
    pointer-events: none;
    z-index: 0;
  }

  .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    position: relative;
    z-index: 1;
  }

  /* Header */
  header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeDown 0.7s ease both;
  }

  .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
  }

  .logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 20px;
    box-shadow: 0 0 20px rgba(0,229,255,0.4);
  }

  h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, var(--accent3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .subtitle {
    color: var(--muted);
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 8px;
  }

  /* Tabs */
  .tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 32px;
    animation: fadeUp 0.7s 0.1s ease both;
    overflow-x: auto;
  }

  .tab {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    letter-spacing: 0.3px;
  }

  .tab:hover { color: var(--text); background: var(--surface2); }

  .tab.active {
    background: linear-gradient(135deg, rgba(0,229,255,0.15), rgba(123,97,255,0.15));
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(0,229,255,0.2);
  }

  .tab-emoji { margin-right: 6px; }

  /* Panels */
  .panel {
    display: none;
    animation: fadeUp 0.4s ease both;
  }

  .panel.active { display: block; }

  /* Card */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px;
    position: relative;
    overflow: hidden;
  }

  .card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
  }

  .card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .card-desc {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.6;
  }

  /* Form grid */
  .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
  }

  .field {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
  }

  input, select {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text);
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.2s;
    outline: none;
    width: 100%;
  }

  input:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
  }

  input::placeholder { color: var(--muted); }

  select option { background: var(--surface2); }

  /* Button */
  .btn {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    color: #000;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(0,229,255,0.25);
    width: 100%;
  }

  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,229,255,0.4);
  }

  .btn:active { transform: translateY(0); }

  /* Result box */
  .result-box {
    margin-top: 24px;
    background: linear-gradient(135deg, rgba(0,229,255,0.05), rgba(123,97,255,0.05));
    border: 1px solid rgba(0,229,255,0.2);
    border-radius: 14px;
    padding: 24px;
    display: none;
  }

  .result-box.show { display: block; animation: fadeUp 0.3s ease both; }

  .result-header {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .result-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(0,229,255,0.3), transparent);
  }

  .result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
  }

  .result-item {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--border);
  }

  .result-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  .result-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent3);
  }

  .result-value.accent { color: var(--accent); }
  .result-value.warn { color: var(--warn); }
  .result-value.purple { color: var(--accent2); }

  .result-note {
    margin-top: 14px;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--muted);
    line-height: 1.7;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }

  /* DCA table */
  .dca-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
  }

  table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
  }

  thead tr { background: var(--surface2); }

  th {
    padding: 10px 14px;
    text-align: left;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.65rem;
    border-bottom: 1px solid var(--border);
  }

  td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(26,58,80,0.5);
    color: var(--text);
  }

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

  tbody tr:hover { background: rgba(0,229,255,0.03); }

  .positive { color: var(--accent3); }
  .negative { color: var(--warn); }

  /* Slider */
  .slider-wrap { position: relative; }

  input[type="range"] {
    padding: 0;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    cursor: pointer;
    appearance: none;
  }

  input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(0,229,255,0.5);
    cursor: pointer;
  }

  .range-val {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    text-align: right;
    margin-top: 4px;
  }

  /* Toggle */
  .toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 16px;
    background: var(--surface2);
    border-radius: 10px;
    border: 1px solid var(--border);
  }

  .toggle-row label { margin: 0; font-size: 0.8rem; text-transform: none; letter-spacing: 0; color: var(--text); }

  .toggle {
    position: relative;
    width: 36px; height: 20px;
    flex-shrink: 0;
  }

  .toggle input { opacity: 0; width: 0; height: 0; }

  .toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: 0.25s;
  }

  .toggle-track::after {
    content: '';
    position: absolute;
    left: 2px; top: 2px;
    width: 16px; height: 16px;
    background: var(--muted);
    border-radius: 50%;
    transition: 0.25s;
  }

  .toggle input:checked + .toggle-track { background: rgba(0,229,255,0.3); }
  .toggle input:checked + .toggle-track::after { transform: translateX(16px); background: var(--accent); }

  /* Divider */
  .divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 28px 0;
  }

  /* Info badge */
  .info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(123,97,255,0.1);
    border: 1px solid rgba(123,97,255,0.2);
    border-radius: 20px;
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--accent2);
    margin-bottom: 20px;
  }

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

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Footer */
  footer {
    text-align: center;
    margin-top: 60px;
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 1px;
  }

  /* Responsive */
  @media (max-width: 480px) {
    .card { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
  }