:root {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.06);
  --text-main: #111827;
  --text-muted: #6b7280;
  --accent: #111827;
  --accent-soft: rgba(15, 23, 42, 0.06);
  --radius-xl: 18px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
}

:root.dark {
  --bg: #020617;
  --bg-elevated: #020617;
  --border-subtle: rgba(248, 250, 252, 0.08);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #e5e7eb;
  --accent-soft: rgba(148, 163, 184, 0.16);
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #f9fafb 0, var(--bg) 45%);
  color: var(--text-main);
}

:root.dark body {
  background: radial-gradient(circle at top, #020617 0, #020617 45%);
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* Header */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  gap: 8px;
}

.btn-ghost,
.btn-primary {
  border-radius: 999px;
  font-size: 14px;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: var(--text-main);
}

.btn-ghost {
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

.btn-primary {
  background: var(--accent);
  color: #f9fafb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

/* Main layout */

.main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Card / Hero */

.card {
  border-radius: 24px;
  padding: 22px 20px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.subtitle {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Search */

.search {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.search-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  outline: none;
}

:root.dark .search-input {
  background: rgba(15, 23, 42, 0.8);
}

.search-input:focus {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

/* Sections */

.section {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.26);
  padding: 16px 16px 14px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px);
}

:root.dark .section {
  background: rgba(15, 23, 42, 0.9);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-header h2 {
  margin: 0;
  font-size: 15px;
}

/* Link grid */

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.link-card {
  text-decoration: none;
  color: inherit;
  border-radius: 13px;
  padding: 10px 10px 9px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at top left, #f9fafb 0, #ffffff 45%);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    border-color 0.12s ease-out, background 0.12s ease-out;
}

:root.dark .link-card {
  background: radial-gradient(circle at top left, #020617 0, #020617 45%);
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  border-color: rgba(37, 99, 235, 0.4);
}

.link-title {
  font-weight: 600;
}

.link-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Footer */

.footer {
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
}

/* Responsive */

@media (max-width: 720px) {
  .page {
    padding-inline: 14px;
  }

  .card {
    padding: 18px 16px 16px;
  }

  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search {
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
}