:root {
  --bg-1: #090014;
  --bg-2: #120022;
  --panel: rgba(18, 10, 34, 0.68);
  --panel-strong: rgba(23, 13, 42, 0.88);
  --line: rgba(182, 143, 255, 0.18);
  --text: #f5ecff;
  --muted: #b9abd9;
  --accent: #9f5cff;
  --accent-2: #5ee7ff;
  --shadow: 0 30px 80px rgba(65, 17, 136, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(125, 65, 255, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(94, 231, 255, 0.12), transparent 20%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

#space-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 42px 0 60px;
}

.hero {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(22, 12, 40, 0.86), rgba(11, 7, 24, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero__badge {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(159, 92, 255, 0.14);
  border: 1px solid rgba(159, 92, 255, 0.26);
  color: #d9c5ff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

.hero h1 {
  max-width: 900px;
  margin: 18px 0 16px;
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero__text {
  max-width: 740px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.search input {
  height: 64px;
  padding: 0 22px;
  border: 1px solid rgba(182, 143, 255, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search input::placeholder {
  color: rgba(221, 208, 247, 0.58);
}

.search input:focus {
  border-color: rgba(94, 231, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(94, 231, 255, 0.08);
}

.search button,
.result-card__button {
  border: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), #7440ff 54%, var(--accent-2));
  color: white;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(114, 69, 255, 0.3);
}

.search button {
  min-width: 160px;
}

.results-wrap {
  position: relative;
  z-index: 1;
  margin-top: 24px;
}

.results-meta {
  margin: 0 6px 18px;
  color: #d4c7f2;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.result-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(20, 11, 37, 0.84), rgba(13, 8, 26, 0.88));
  border: 1px solid rgba(182, 143, 255, 0.18);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.result-card__glow {
  position: absolute;
  inset: auto -20% 65% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 231, 255, 0.24), transparent 60%);
  pointer-events: none;
}

.result-card__header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.result-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(182, 143, 255, 0.14);
}

.result-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.result-card__button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 0 18px;
  width: fit-content;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 16px, 100%);
    padding-top: 18px;
  }

  .hero {
    padding: 22px;
    border-radius: 28px;
  }

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

  .search button,
  .result-card__button {
    width: 100%;
    min-height: 56px;
  }
}
