:root {
  color-scheme: dark;
  font-family: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  background: #000000;
  color: #f2f4ef;
  --signal: #00e676;
  --muted: #898f89;
  --line: #292c29;
  --panel: #0b0c0a;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #000000; }
body { min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.home {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    #000000;
  background-size: 72px 72px;
}

.topbar, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #000000;
  font-size: 12px;
  letter-spacing: .08em;
}

.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; font-weight: 700; }
.brand-mark { width: 14px; height: 14px; background: var(--signal); display: inline-block; }
.system-state { display: flex; gap: 10px; align-items: center; color: var(--signal); }
.pulse { width: 8px; height: 8px; background: var(--signal); display: inline-block; animation: pulse 1.8s steps(2) infinite; }

.hero { width: min(1180px, calc(100% - 48px)); margin: auto; padding: 72px 0; }
.eyebrow { color: var(--signal); letter-spacing: .16em; font-size: 12px; margin: 0 0 28px; }
h1 { margin: 0; font-size: clamp(58px, 10vw, 148px); line-height: .82; letter-spacing: -.09em; font-weight: 700; }
h1 span { color: transparent; -webkit-text-stroke: 1px var(--signal); }
.intro { max-width: 610px; margin: 38px 0 50px; color: var(--muted); line-height: 1.7; font-size: 14px; }

.proxy-form { border: 1px solid var(--line); background: #000000; max-width: 900px; }
.proxy-form > label { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.input-row { display: grid; grid-template-columns: auto 1fr auto; min-height: 68px; }
.protocol { display: grid; place-items: center; padding: 0 18px; border-right: 1px solid var(--line); color: var(--signal); font-size: 12px; }
.input-row input { width: 100%; min-width: 0; background: #000000; color: #f2f4ef; border: 0; outline: 0; padding: 0 20px; font-size: 17px; }
.input-row input:focus { box-shadow: inset 0 0 0 1px var(--signal); }
.input-row button { border: 0; border-left: 1px solid var(--signal); padding: 0 30px; color: #000000; background: var(--signal); font-weight: 700; text-transform: uppercase; }
.input-row button:hover { background: #f2f4ef; }
.input-row button:disabled { background: var(--muted); cursor: wait; }
.route-line { border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto 1fr minmax(70px, auto); align-items: center; gap: 12px; padding: 12px 16px; color: var(--muted); font-size: 10px; overflow: hidden; }
.route-line i { display: block; height: 1px; background: var(--line); position: relative; }
.route-line i::after { content: ""; position: absolute; top: -2px; width: 5px; height: 5px; background: var(--signal); animation: travel 2.6s linear infinite; }
.route-line strong { color: var(--signal); font-weight: 400; }
#route-target { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.error-box { max-width: 900px; border: 1px solid #ff3b30; color: #ff3b30; margin-top: 16px; padding: 14px 16px; font-size: 12px; }
.error-box strong { margin-right: 10px; }
footer { border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); }
footer a { color: var(--muted); }

.browser { position: fixed; inset: 0; display: flex; flex-direction: column; background: #000000; }
.browser-bar { min-height: 54px; display: grid; grid-template-columns: 54px 54px 1fr 54px; border-bottom: 1px solid var(--line); background: #0b0c0a; }
.icon-button { border: 0; border-right: 1px solid var(--line); background: #0b0c0a; color: #f2f4ef; display: grid; place-items: center; }
.icon-button:last-child { border-right: 0; border-left: 1px solid var(--line); }
.icon-button:hover { color: var(--signal); }
.icon-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.address-display { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0 18px; font-size: 12px; color: var(--muted); }
#current-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#proxy-frame { border: 0; flex: 1; width: 100%; background: #ffffff; }

@keyframes pulse { 50% { opacity: .25; } }
@keyframes travel { from { left: 0; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }

@media (max-width: 680px) {
  .topbar { padding: 0 16px; }
  .hero { width: calc(100% - 32px); padding: 50px 0; }
  h1 { font-size: clamp(52px, 19vw, 92px); }
  .intro { margin: 28px 0 34px; }
  .input-row { grid-template-columns: auto 1fr; }
  .input-row button { grid-column: 1 / -1; min-height: 54px; border-left: 0; border-top: 1px solid var(--signal); }
  .route-line { grid-template-columns: auto 1fr auto; }
  .route-line i:nth-of-type(2), #route-target { display: none; }
  footer { align-items: flex-start; gap: 8px; padding: 18px 16px; flex-direction: column; }
}
