/* PortScope — v2 arayüz */
:root {
  --bg: #07080d;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f2f3f8;
  --text-2: #a4a8bd;
  --text-3: #6c7089;
  --brand: #7c7cff;
  --brand-2: #b38cff;
  --mint: #38e8c6;
  --open: #34e3a4;
  --closed: #ff6b81;
  --filtered: #ffc35c;
  --open-soft: rgba(52, 227, 164, 0.12);
  --closed-soft: rgba(255, 107, 129, 0.1);
  --filtered-soft: rgba(255, 195, 92, 0.11);
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 60px -24px rgba(0,0,0,0.7);
  --r: 20px;
  --r-sm: 12px;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-2: rgba(15, 18, 40, 0.04);
  --line: rgba(15, 18, 40, 0.08);
  --line-2: rgba(15, 18, 40, 0.15);
  --text: #0e1022;
  --text-2: #4d5170;
  --text-3: #8a8ea8;
  --brand: #5b5bf0;
  --brand-2: #9a6bff;
  --mint: #0fb894;
  --open: #0ea877;
  --closed: #e2445e;
  --filtered: #c98500;
  --open-soft: rgba(14, 168, 119, 0.1);
  --closed-soft: rgba(226, 68, 94, 0.08);
  --filtered-soft: rgba(201, 133, 0, 0.1);
  --shadow: 0 1px 2px rgba(15,18,40,0.04), 0 18px 40px -22px rgba(15,18,40,0.25);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: 0.85em; }

/* ---------- Arka plan ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { width: 620px; height: 620px; top: -260px; left: 50%; margin-left: -520px; background: radial-gradient(circle, rgba(124,124,255,0.55), transparent 65%); }
.aurora span:nth-child(2) { width: 520px; height: 520px; top: -200px; left: 50%; margin-left: 40px; background: radial-gradient(circle, rgba(56,232,198,0.32), transparent 65%); animation-delay: -8s; }
.aurora span:nth-child(3) { width: 460px; height: 460px; top: 120px; left: 50%; margin-left: -160px; background: radial-gradient(circle, rgba(179,140,255,0.28), transparent 65%); animation-delay: -14s; }
:root[data-theme="light"] .aurora span { opacity: 0.35; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(40px, 30px, 0) scale(1.12); }
}
.noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  max-width: 1040px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1rem; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
.logo-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 20px -6px rgba(124,124,255,0.8), inset 0 1px 0 rgba(255,255,255,0.3);
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--text-2);
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--open); position: relative; }
.pulse::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--open); opacity: 0; animation: ping 2s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.7; } 100% { transform: scale(1.6); opacity: 0; } }

.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); cursor: pointer; transition: all 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.i-sun { display: none; }
:root[data-theme="light"] .i-sun { display: block; }
:root[data-theme="light"] .i-moon { display: none; }

/* ---------- Layout ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 8px 20px 40px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 56px 0 36px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 500; color: var(--text-2);
  padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 10px var(--mint);
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 6.4vw, 4rem);
  font-weight: 800; letter-spacing: -0.045em; line-height: 1.02;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 55%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.shine {
  background: linear-gradient(100deg, var(--brand) 0%, var(--mint) 45%, var(--brand-2) 90%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }
.hero p { max-width: 520px; margin: 0 auto; color: var(--text-2); font-size: 1.05rem; }

/* ---------- Komut çubuğu ---------- */
.command { max-width: 760px; margin: 0 auto; }
.command-bar {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.command-bar::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--a, 0deg), transparent 0 60%, var(--brand) 75%, var(--mint) 85%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.command-bar:focus-within { border-color: transparent; box-shadow: var(--shadow), 0 0 0 6px rgba(124,124,255,0.1); }
.command-bar:focus-within::before, .scanning .command-bar::before { opacity: 1; animation: spin 3s linear infinite; }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --a: 360deg; } }

.cb-ico { color: var(--text-3); flex-shrink: 0; }
.command-bar input {
  flex: 1; min-width: 0;
  padding: 12px 0;
  font-family: var(--mono); font-size: 1.05rem;
  color: var(--text); background: transparent;
  border: 0; outline: none;
}
.command-bar input::placeholder { color: var(--text-3); }
.kbd {
  font-family: var(--mono); font-size: 0.72rem; color: var(--text-3);
  padding: 2px 8px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--surface-2);
}
.command-bar:focus-within .kbd { display: none; }

.scan-btn, .stop-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; border: 0;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.scan-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 26px -10px rgba(124,124,255,0.9), inset 0 1px 0 rgba(255,255,255,0.25);
}
.scan-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(124,124,255,1), inset 0 1px 0 rgba(255,255,255,0.25); }
.scan-btn:active { transform: translateY(0); }
.scan-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.scan-btn svg { transition: transform 0.2s; }
.scan-btn:hover svg { transform: translateX(2px); }
.stop-btn { color: var(--closed); background: var(--closed-soft); }
.stop-btn:hover { background: color-mix(in srgb, var(--closed) 20%, transparent); }

/* ---------- Kontroller ---------- */
.controls {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; flex-wrap: wrap;
}
.segmented {
  display: inline-flex; gap: 2px; padding: 4px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  overflow-x: auto; max-width: 100%; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.seg {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 9px; border: 0;
  font-size: 0.84rem; font-weight: 500; color: var(--text-2);
  background: transparent; cursor: pointer; white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.seg:hover { color: var(--text); }
.seg.active {
  color: var(--text); background: var(--surface-2);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 0 0 1px var(--line-2);
}
.seg b { font-family: var(--mono); font-weight: 500; font-size: 0.74rem; color: var(--text-3); }
.segmented.small .seg { padding: 6px 11px; font-size: 0.8rem; }

.ghost-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 10px; border: 0;
  font-size: 0.84rem; color: var(--text-2); background: transparent; cursor: pointer;
}
.ghost-link:hover, .ghost-link[aria-expanded="true"] { color: var(--text); background: var(--surface); }

.advanced {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px;
  margin-top: 14px; padding: 18px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  animation: rise 0.25s ease;
}
.adv-field { display: flex; flex-direction: column; gap: 8px; }
.adv-field > span { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.adv-field em { font-style: normal; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.adv-field em b { font-family: var(--mono); color: var(--text); font-weight: 500; }
.adv-field input[type="text"] {
  padding: 11px 14px; border-radius: 10px;
  font-family: var(--mono); font-size: 0.9rem;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.adv-field input[type="text"]:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(124,124,255,0.15); }
.adv-range { justify-content: space-between; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; margin: 12px 0;
  border-radius: 999px; outline: none;
  background: linear-gradient(90deg, var(--brand) var(--p, 25%), var(--surface-2) var(--p, 25%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 0; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(124,124,255,0.35), 0 2px 6px rgba(0,0,0,0.4);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(124,124,255,0.35);
}

/* ---------- Geçmiş ---------- */
.history { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.history-label { font-size: 0.76rem; color: var(--text-3); }
.history-list { display: flex; gap: 6px; flex-wrap: wrap; }
.h-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px;
  font-family: var(--mono); font-size: 0.76rem; color: var(--text-2);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  transition: all 0.2s;
}
.h-chip:hover { color: var(--text); border-color: var(--line-2); }
.h-chip i { font-style: normal; color: var(--open); }

/* ---------- Özellikler ---------- */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin: 64px 0 40px;
}
.feature {
  padding: 22px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.25s, transform 0.25s;
}
.feature:hover { border-color: var(--line-2); transform: translateY(-2px); }
.f-ico {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 16px;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
}
.feature h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.feature p { margin: 0; font-size: 0.88rem; color: var(--text-2); }

/* ---------- Sonuçlar ---------- */
.results { margin-top: 40px; animation: rise 0.4s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card {
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}

.bento {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px; margin-bottom: 14px;
}
.ring-card {
  grid-row: span 2;
  display: flex; align-items: center; gap: 26px; padding: 26px;
}
.ring { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-2); stroke-width: 9; }
.ring-fill {
  fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 326.73; stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.3s ease, stroke 0.3s;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--brand) 60%, transparent));
}
.ring.done .ring-fill { stroke: var(--mint); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--mint) 60%, transparent)); }
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-pct { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring-sub { font-family: var(--mono); font-size: 0.74rem; color: var(--text-3); }

.target { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.target-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.target-host {
  font-family: var(--mono); font-size: 1.3rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.target-ip { font-family: var(--mono); font-size: 0.8rem; color: var(--text-3); overflow-wrap: anywhere; }
.target-state {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin-top: 10px; padding: 5px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 500;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.target-state.ok { color: var(--mint); background: color-mix(in srgb, var(--mint) 12%, transparent); }
.target-state.ok .spinner { display: none; }
.target-state.ok::before { content: '✓'; font-weight: 700; }
.target-state.stop { color: var(--text-2); background: var(--surface-2); }
.target-state.stop .spinner { display: none; }
.spinner {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: rot 0.8s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }

.stat { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; position: relative; overflow: hidden; }
.stat-k { font-size: 0.8rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.stat-k::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--text-3)); }
.stat-v { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-hint { font-family: var(--mono); font-size: 0.74rem; color: var(--text-3); }
.stat-bar { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.stat-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width 0.3s ease; }
.s-open { --c: var(--open); }
.s-open .stat-v { color: var(--open); }
.s-closed { --c: var(--closed); }
.s-filtered { --c: var(--filtered); }
.s-time { --c: var(--brand); }

.panel { padding: 18px; }
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px;
  font-size: 0.8rem; font-weight: 500; color: var(--text-2);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  transition: all 0.2s;
}
.tool-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }

/* Izgara görünümü */
.port-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px;
}
.tile {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 12px 11px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2);
  animation: pop 0.3s cubic-bezier(.2,.9,.3,1.3);
  transition: transform 0.2s, border-color 0.2s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--line-2); }
.tile::after {
  content: ''; position: absolute; top: 12px; right: 12px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--c);
}
.tile-port { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; }
.tile-svc { font-size: 0.74rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.open { --c: var(--open); border-color: color-mix(in srgb, var(--open) 40%, transparent); background: var(--open-soft); }
.tile.open::after { box-shadow: 0 0 10px var(--open); }
.tile.open .tile-svc { color: color-mix(in srgb, var(--open) 75%, var(--text-2)); }
.tile.closed { --c: var(--closed); }
.tile.filtered { --c: var(--filtered); }
.tile.closed .tile-port, .tile.filtered .tile-port { color: var(--text-2); }
@keyframes pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }

/* Liste görünümü */
.port-list { border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.pl-head, .pl-row {
  display: grid; grid-template-columns: 110px 1fr 120px; align-items: center;
  padding: 11px 18px;
}
.pl-head {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.pl-row { border-bottom: 1px solid var(--line); font-size: 0.9rem; animation: rise 0.25s ease; }
.pl-row:last-child { border-bottom: 0; }
.pl-row:hover { background: var(--surface-2); }
.pl-port { font-family: var(--mono); font-weight: 600; }
.pl-svc { color: var(--text-2); font-family: var(--mono); font-size: 0.85rem; }

.badge {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.open { color: var(--open); background: var(--open-soft); }
.badge.closed { color: var(--closed); background: var(--closed-soft); }
.badge.filtered { color: var(--filtered); background: var(--filtered-soft); }

.empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 0.9rem; }

/* ---------- Uyarı + footer ---------- */
.notice {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 28px; padding: 14px 16px; border-radius: 14px;
  color: var(--filtered);
  border: 1px solid color-mix(in srgb, var(--filtered) 25%, transparent);
  background: color-mix(in srgb, var(--filtered) 6%, transparent);
}
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice p { margin: 0; font-size: 0.85rem; color: var(--text-2); }
.notice strong { color: var(--text); font-weight: 600; }

.foot {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 28px 20px 44px; font-size: 0.8rem; color: var(--text-3);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translate(-50%, calc(100% + 40px));
  opacity: 0; visibility: hidden;
  max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 500;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2), opacity 0.25s, visibility 0.35s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast.error { color: var(--closed); border-color: color-mix(in srgb, var(--closed) 35%, transparent); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .ring-card { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 640px) {
  .hero { padding: 36px 0 26px; }
  .nav { padding: 14px 16px; }
  .wrap { padding: 4px 16px 32px; }
  .status-pill { display: none; }
  .command-bar { padding: 6px 6px 6px 14px; }
  .command-bar input { font-size: 0.95rem; }
  .kbd { display: none; }
  .scan-btn { padding: 11px 14px; }
  .advanced { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; margin-top: 40px; }
  .ring-card { flex-direction: column; text-align: center; gap: 18px; }
  .target { align-items: center; }
  .target-state { align-self: center; }
  .ring { width: 130px; height: 130px; }
  .toolbar-right { width: 100%; }
  .pl-head, .pl-row { grid-template-columns: 70px 1fr auto; padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
