:root {
  --bg: #050816;
  --bg-elevated: rgba(15, 23, 42, 0.9);
  --bg-elevated-soft: rgba(15, 23, 42, 0.7);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --accent-strong: rgba(56, 189, 248, 0.32);
  --accent-secondary: #a855f7;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.27);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.75);
  --shadow-soft-alt: 0 12px 35px rgba(15, 23, 42, 0.7);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #020617;
  color: #e5e7eb;
  border: 1px solid rgba(56, 189, 248, 0.8);
  font-size: 0.85rem;
  text-decoration: none;
  z-index: 100;
  transition: top 0.18s ease;
}

.skip-link:focus-visible {
  top: 12px;
}

* {
  box-sizing: border-box;
}

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

body {
  display: flex;
  justify-content: center;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.7;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22), transparent 60%);
  top: -120px;
  left: -80px;
  animation: floatBlob1 26s ease-in-out infinite alternate;
}

body::after {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22), transparent 60%);
  bottom: -140px;
  right: -100px;
  animation: floatBlob2 30s ease-in-out infinite alternate;
}

.page {
  width: 100%;
  max-width: 1200px;
  padding: 24px 16px 40px;
}

.hero {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(
      135deg,
      rgba(56, 189, 248, 0.12),
      rgba(56, 189, 248, 0.03)
    )
    border-box;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-xl);
  padding: 20px 20px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-title {
  font-size: 1.9rem;
  line-height: 1.15;
  letter-spacing: 0.03em;
  margin: 0;
  background: linear-gradient(120deg, #e5e7eb, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.content {
  margin-top: 20px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-soft-alt);
}

.controls-left,
.controls-right {
  display: flex;
  flex: 1 1 260px;
}

.controls-right {
  justify-content: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.field-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field-input-wrap {
  position: relative;
}

.field-input-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: radial-gradient(circle at top left, #38bdf8, transparent 50%);
  opacity: 0.55;
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  border: none;
  background: #020617;
  color: var(--text-main);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

#searchInput::placeholder {
  color: #64748b;
}

#searchInput:focus {
  outline: 2px solid rgba(56, 189, 248, 0.7);
  outline-offset: 1px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.1), rgba(15, 23, 42, 0.98));
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 5px 11px 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.08s ease;
}

.chip span.count {
  font-size: 0.7rem;
  color: #e5e7eb;
  opacity: 0.7;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.85);
  color: var(--text-main);
}

.chip--active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(56, 189, 248, 0.05));
  border-color: rgba(56, 189, 248, 0.9);
  color: #ecfeff;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4), 0 0 18px rgba(56, 189, 248, 0.4);
  animation: chipGlow 3.2s ease-in-out infinite;
}

.summary {
  margin: 16px 4px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px 16px;
  margin-top: 6px;
}

.grid-empty {
  grid-column: 1 / -1;
  padding: 18px 14px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.55);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.9));
  color: var(--text-muted);
  font-size: 0.86rem;
  text-align: center;
}

.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.1), rgba(15, 23, 42, 0.98));
  padding: 15px 14px 13px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.75);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.18s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.3), transparent 55%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px) translateZ(0) scale(1.015);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.8);
}

.card:hover::before {
  opacity: 0.8;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.card-badge {
  align-self: flex-start;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 3px 9px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #e0f2fe;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), rgba(15, 23, 42, 0.7));
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-meta-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-provider {
  font-weight: 500;
  color: #bae6fd;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.tag {
  border-radius: 999px;
  padding: 2px 8px 3px;
  font-size: 0.7rem;
  color: #e5e7eb;
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.tag--secondary {
  background: rgba(168, 85, 247, 0.24);
  border-color: rgba(168, 85, 247, 0.7);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #e0f2fe;
}

.card-cta-icon {
  font-size: 0.85rem;
}

.card:focus-visible,
.chip:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.9);
  outline-offset: 3px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8), 0 0 0 4px rgba(56, 189, 248, 0.55);
}

.footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-text {
  margin: 0;
}

.footer span {
  color: #38bdf8;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-social-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.footer-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 0.98));
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.18s ease;
}

.footer-icon-link:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.75);
}

.footer-icon {
  width: 16px;
  height: 16px;
}

@media (max-width: 480px) {
  .footer {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .footer-text {
    text-align: center;
    line-height: 1.5;
  }

  .footer-social {
    width: 100%;
    justify-content: center;
  }
}

@keyframes floatBlob1 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(40px, 60px, 0) scale(1.08);
  }
  100% {
    transform: translate3d(80px, 20px, 0) scale(0.98);
  }
}

@keyframes floatBlob2 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-40px, -40px, 0) scale(1.06);
  }
  100% {
    transform: translate3d(-70px, -10px, 0) scale(1);
  }
}

@keyframes chipGlow {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4), 0 0 12px rgba(56, 189, 248, 0.4);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7), 0 0 20px rgba(56, 189, 248, 0.7);
  }
}

@media (max-width: 768px) {
  .page {
    padding: 18px 12px 28px;
  }

  .hero {
    position: static;
    padding: 14px 14px 12px;
    margin-bottom: 18px;
  }

  .hero-title {
    font-size: 1.45rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .controls {
    padding: 10px 10px 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .controls-left,
  .controls-right {
    flex: 1 1 100%;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 13px 12px 12px;
  }

  .card-title {
    font-size: 0.94rem;
  }
}
