:root {
  --font-geist-sans: "Segoe UI", Arial, sans-serif;
  --font-geist-mono: "Cascadia Code", Consolas, monospace;
  --bg: #05070b;
  --surface: #0b0e14;
  --surface-2: #11151d;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f6f8;
  --muted: #9097a6;
  --orange: #ff9416;
  --blue: #1460ed;
  --red: #ff3a30;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-geist-sans), Arial, sans-serif;
  min-height: 100vh;
}
button, input { font: inherit; }
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}
.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}
.ambient { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(120px); opacity: .13; z-index: -2; pointer-events: none; }
.ambient-one { background: var(--orange); top: 10px; left: -340px; }
.ambient-two { background: var(--blue); top: 160px; right: -360px; }

.topbar {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; font-size: 19px; letter-spacing: -.02em; }
.brand img { border-radius: 13px; box-shadow: 0 0 28px rgba(255,148,22,.15); }
.brand strong { color: #568bff; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.button {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 17px;
  border: 1px solid transparent;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .tool-card a:focus-visible, .add-card:focus-visible, input:focus-visible { outline: 2px solid #6c9bff; outline-offset: 3px; }
.button-primary { background: var(--orange); color: #160b00; box-shadow: 0 8px 24px rgba(255,148,22,.16); }
.button-primary span { font-size: 19px; margin-right: 6px; }
.button-ghost { background: rgba(255,255,255,.04); border-color: var(--line); }
.button-ghost:hover { background: rgba(255,255,255,.075); }

.hero { width: min(920px, calc(100% - 48px)); margin: 96px auto 0; text-align: center; }
.eyebrow, .section-kicker { color: #aeb4c0; letter-spacing: .18em; font-family: var(--font-geist-mono), monospace; font-size: 11px; font-weight: 650; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.eyebrow span { width: 5px; height: 5px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 12px var(--orange); }
.hero h1 { margin: 22px 0 20px; font-size: clamp(48px, 8vw, 86px); line-height: .96; letter-spacing: -.065em; font-weight: 730; }
.hero h1 span { color: transparent; background: linear-gradient(90deg, var(--orange) 18%, #ffb24d 42%, #3979ff 70%, var(--blue)); background-clip: text; -webkit-background-clip: text; }
.hero > p { width: min(610px, 100%); margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.65; }

.search-wrap { width: min(650px, 100%); margin: 42px auto 0; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 20px; background: rgba(14,17,24,.9); border: 1px solid rgba(255,255,255,.14); border-radius: 17px; box-shadow: 0 18px 60px rgba(0,0,0,.35); backdrop-filter: blur(14px); }
.search-wrap:focus-within { border-color: rgba(75,125,255,.7); box-shadow: 0 0 0 4px rgba(20,96,237,.1), 0 18px 60px rgba(0,0,0,.35); }
.search-icon { width: 17px; height: 17px; border: 1.8px solid #8b93a1; border-radius: 50%; position: relative; flex: 0 0 auto; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: #8b93a1; right: -5px; bottom: -2px; rotate: 45deg; border-radius: 2px; }
.search-wrap input { min-width: 0; flex: 1; color: white; background: transparent; border: 0; outline: 0; font-size: 15px; }
.search-wrap input::placeholder { color: #69707e; }
.search-wrap kbd { color: #6d7480; border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 6px; padding: 4px 7px; font-size: 11px; }

.tools-section { width: min(1180px, calc(100% - 48px)); margin: 112px auto 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.section-kicker { color: var(--orange); margin: 0 0 7px; }
.section-heading h2, .dialog h2 { font-size: 29px; letter-spacing: -.035em; margin: 0; }
.tool-count { color: #777e8c; font-family: var(--font-geist-mono), monospace; font-size: 12px; }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-card, .add-card { min-height: 238px; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(145deg, rgba(18,22,30,.9), rgba(8,10,15,.95)); position: relative; overflow: hidden; animation: card-in .45s ease both; animation-delay: var(--delay, 0ms); }
.tool-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; opacity: .8; background: var(--accent); }
.tool-card.orange { --accent: var(--orange); }
.tool-card.blue { --accent: var(--blue); }
.tool-card.red { --accent: var(--red); }
.tool-card a { min-height: 238px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; color: inherit; text-decoration: none; }
.tool-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 42%, transparent); box-shadow: 0 24px 54px rgba(0,0,0,.28); }
.tool-card { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.tool-icon { width: 55px; height: 55px; border-radius: 15px; display: grid; place-items: center; font-family: var(--font-geist-mono), monospace; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: -.04em; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.open-arrow { color: #666d7a; font-size: 20px; transition: color .2s, transform .2s; }
.tool-card:hover .open-arrow { color: var(--accent); transform: translate(2px, -2px); }
.tool-card h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.02em; }
.tool-card p { color: #858c98; font-size: 13px; line-height: 1.5; margin: 0; max-width: 210px; }
.remove-tool { position: absolute; top: 67px; right: 16px; opacity: 0; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #10131a; color: #878e9b; cursor: pointer; transition: opacity .2s, color .2s; z-index: 2; }
.tool-card:hover .remove-tool, .remove-tool:focus-visible { opacity: 1; }
.remove-tool:hover { color: white; }
.add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #7f8794; border-style: dashed; cursor: pointer; min-height: 238px; }
.add-card:hover { border-color: rgba(255,148,22,.45); color: #c9ced7; background: rgba(255,148,22,.035); }
.add-card > span { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 25px; margin-bottom: 14px; }
.add-card strong { color: #c2c7d0; font-size: 15px; margin-bottom: 5px; }
.add-card small { font-size: 12px; }
.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }
.empty-state > span { font-size: 34px; color: var(--orange); }
.empty-state h3 { color: white; margin: 14px 0 7px; }
.empty-state p { margin: 0; font-size: 14px; }

footer { width: min(1180px, calc(100% - 48px)); margin: 96px auto 0; min-height: 96px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: #676e7a; font-size: 12px; }
footer span { display: flex; align-items: center; gap: 8px; }
footer i { width: 6px; height: 6px; border-radius: 50%; background: #38c985; box-shadow: 0 0 10px #38c985; }

.dialog-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); backdrop-filter: blur(9px); animation: fade-in .16s ease both; }
.dialog { width: min(500px, 100%); position: relative; padding: 31px; border: 1px solid rgba(255,255,255,.15); background: #0d1016; border-radius: 22px; box-shadow: 0 32px 100px rgba(0,0,0,.6); }
.dialog-copy { color: var(--muted); margin: 10px 0 26px; font-size: 14px; }
.dialog-close { position: absolute; top: 18px; right: 18px; width: 32px; height: 32px; color: #9ba1ac; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 9px; cursor: pointer; font-size: 18px; }
.dialog form { display: grid; gap: 16px; }
.dialog label { display: grid; gap: 8px; color: #b8bec8; font-size: 12px; font-weight: 650; }
.dialog input { height: 47px; border-radius: 11px; padding: 0 13px; color: white; background: #080a0f; border: 1px solid var(--line); outline: 0; }
.dialog input:focus { border-color: #3e77ee; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; }

@keyframes card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { margin-top: 72px; }
}
@media (max-width: 560px) {
  .topbar, .tools-section, footer { width: min(100% - 28px, 1180px); }
  .topbar { min-height: 74px; }
  .brand { font-size: 16px; }
  .brand img { width: 42px; height: 42px; }
  .button { padding-inline: 13px; }
  .button-ghost { display: none; }
  .hero { width: calc(100% - 28px); margin-top: 62px; }
  .hero h1 { font-size: clamp(45px, 14vw, 64px); }
  .hero > p { font-size: 15px; }
  .search-wrap { margin-top: 30px; }
  .search-wrap kbd { display: none; }
  .tools-section { margin-top: 76px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card, .tool-card a, .add-card { min-height: 205px; }
  .remove-tool { opacity: 1; }
  footer { margin-top: 70px; padding: 28px 0; display: grid; gap: 10px; }
  footer p { margin: 0; }
  .dialog { padding: 25px 20px 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
