:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --text: #eef4ff;
  --muted: #9fb0ca;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #68e1fd;
  --accent-2: #a78bfa;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.36);
}

:root.light {
  color-scheme: light;
  --bg: #edf4ff;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --text: #102033;
  --muted: #50627a;
  --line: rgba(30, 41, 59, 0.14);
  --accent: #0ea5e9;
  --accent-2: #7c3aed;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(104, 225, 253, 0.22), transparent 32rem),
    radial-gradient(circle at 90% 5%, rgba(167, 139, 250, 0.24), transparent 34rem),
    linear-gradient(135deg, var(--bg), #0e1726 70%);
}

:root.light body { background: linear-gradient(135deg, #e8f3ff, #f8fbff 70%); }

a { color: inherit; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 56px;
}

.hero, .toolbar, .group {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 34px;
  border-radius: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 86px);
  line-height: .9;
  letter-spacing: -0.07em;
}

.subtitle {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.clock {
  min-width: 190px;
  padding: 18px 20px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  text-align: right;
}

.clock span, .clock strong { display: block; }
.clock span { color: var(--muted); font-size: 13px; }
.clock strong { margin-top: 4px; font-size: 28px; letter-spacing: -0.04em; }

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
  padding: 16px;
  border-radius: 24px;
}

.search { flex: 1; }
.search span { display: block; margin: 0 0 8px 4px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
input, button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
}
button {
  width: auto;
  cursor: pointer;
  font-weight: 700;
}

.groups { display: grid; gap: 18px; }
.group { border-radius: 28px; padding: 22px; }
.group-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.group h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.group-count { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 14px; }

.card {
  display: flex;
  gap: 14px;
  min-height: 118px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel-strong), rgba(15, 23, 42, 0.30));
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

:root.light .card { background: linear-gradient(145deg, #fff, rgba(255, 255, 255, 0.55)); }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06111f;
  font-size: 23px;
}
.content { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.name { font-size: 17px; }
.description { color: var(--muted); font-size: 14px; line-height: 1.35; }
.url { margin-top: auto; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty { padding: 40px; text-align: center; color: var(--muted); }

@media (max-width: 720px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 20px; }
  .hero, .toolbar { flex-direction: column; align-items: stretch; }
  .clock { text-align: left; }
  button { width: 100%; }
}
