:root {
  --bg: #040608;
  --bg-deep: #0a0f12;
  --text: #f6f8fa;
  --muted: #9ca3a9;
  --line: #1a2024;
  --line-strong: #273038;
  --accent: #84da4f;
  --accent-soft: rgba(132, 218, 79, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  background:
    radial-gradient(1200px 520px at 15% -10%, #1b2618 0%, transparent 55%),
    radial-gradient(1000px 500px at 85% -5%, #112520 0%, transparent 58%),
    linear-gradient(180deg, #060a0d 0%, #040608 48%, #040507 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(132, 218, 79, 0.08), transparent 42%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.34) 100%);
}

body.is-searching {
  overflow-y: auto;
}

.shell {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: min(1040px, 100%);
  min-height: 100dvh;
  padding: 0 18px 40px;
}

.search-stage {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: min-height 0.28s ease, padding-top 0.28s ease;
}

.search-wrap {
  width: min(740px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  transition: gap 0.24s ease, margin 0.24s ease;
}

.brand-orb {
  width: 122px;
  height: 122px;
  border-radius: 32px;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 35% 25%, rgba(132, 218, 79, 0.15), transparent 60%),
    linear-gradient(160deg, rgba(10, 17, 21, 0.95), rgba(5, 8, 11, 0.95));
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: width 0.24s ease, height 0.24s ease, border-radius 0.24s ease;
}

.brand-logo {
  width: 76px;
  height: 76px;
  filter: brightness(0) invert(1) contrast(240%) drop-shadow(0 0 18px rgba(255, 255, 255, 0.16));
  opacity: 0.95;
  transition: width 0.24s ease, height 0.24s ease;
}

.brand-word {
  position: relative;
  display: inline-block;
  margin: 0;
  color: #f8fafb;
  font-size: clamp(36px, 4.4vw, 44px);
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-trademark {
  position: absolute;
  right: -18px;
  top: 1px;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  opacity: 0.96;
  letter-spacing: 0;
}

.brand-tagline {
  margin: 0;
  max-width: 620px;
  color: #b4bcc2;
  font-size: 14px;
  line-height: 1.38;
  letter-spacing: 0.012em;
  text-align: center;
}

.pause-accent {
  color: #d98787;
  font-weight: 590;
}

.search-shell {
  position: relative;
  border: 1px solid #29323b;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(9, 13, 17, 0.96), rgba(6, 10, 13, 0.98));
  overflow: hidden;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.42);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}

body.is-idle .search-shell::after {
  opacity: 1;
  animation: idlePulse 2.2s ease-in-out infinite;
}

@keyframes idlePulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(132, 218, 79, 0.04), 0 0 0 0 rgba(132, 218, 79, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(132, 218, 79, 0.22), 0 0 0 6px rgba(132, 218, 79, 0.08);
  }
}

.search-shell:focus-within {
  border-color: rgba(132, 218, 79, 0.58);
  box-shadow:
    0 0 0 3px rgba(132, 218, 79, 0.14),
    0 20px 42px rgba(0, 0, 0, 0.5);
}

.query-input {
  width: 100%;
  height: 72px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 23px;
  font-weight: 540;
  letter-spacing: 0;
  padding: 0 22px;
}

.query-input::placeholder {
  color: #899197;
}

.search-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: #0d1216;
}

.search-progress {
  width: 0;
  height: 100%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, #2c3237, var(--accent));
}

.suggestions {
  list-style: none;
  margin: 0;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid #202830;
  background: linear-gradient(180deg, rgba(11, 15, 18, 0.98), rgba(8, 11, 14, 0.98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36);
  display: none;
}

.suggestions.show {
  display: block;
}

.suggestions li + li {
  margin-top: 4px;
}

.suggestion-btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e4e8eb;
  text-align: left;
  padding: 11px 12px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.suggestion-btn:hover,
.suggestion-btn.selected {
  background: #141b21;
  color: #fcfffd;
}

.hint {
  min-height: 20px;
  margin: 2px 6px 0;
  font-size: 12.5px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--muted);
}

body.is-searching .search-stage {
  min-height: 164px;
  align-items: flex-start;
  padding-top: 14px;
}

body.is-searching .search-wrap {
  width: min(700px, 100%);
}

body.is-searching .brand-mark {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 2px;
}

body.is-searching .brand-orb {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

body.is-searching .brand-logo {
  width: 20px;
  height: 20px;
}

body.is-searching .brand-word {
  font-size: 21px;
}

body.is-searching .brand-trademark {
  right: -12px;
  top: 1px;
  font-size: 10px;
}

body.is-searching .brand-tagline {
  display: none;
}

body.is-searching .search-shell {
  border-radius: 16px;
}

body.is-searching .query-input {
  height: 58px;
  font-size: 18px;
}

.results-stage {
  padding-top: 8px;
}

.result-list {
  margin: 0 auto;
  width: min(700px, 100%);
}

.result-card {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 0.26s ease forwards;
  border-bottom: 1px solid #181f24;
  padding: 14px 2px;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.source-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #a2a9ae;
  font-size: 13px;
}

.favicon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  background: #202325;
}

.country-flag {
  font-size: 17px;
}

.card-title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
  color: #f4f7f8;
}

.card-summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.52;
  color: #d5d9dc;
}

.skeleton-lines {
  margin-top: 6px;
}

.skeleton-line {
  display: block;
  width: 100%;
  height: 12px;
  border-radius: 7px;
  margin-bottom: 9px;
}

.skeleton-line.short {
  width: 74%;
  margin-bottom: 0;
}

.shimmer {
  background: linear-gradient(90deg, #171a1d 25%, #22262a 50%, #171a1d 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.empty-state {
  border: 1px solid #1f2730;
  border-radius: 16px;
  padding: 14px;
  color: #acb3b8;
  background: #0c0f11;
}

@media (max-width: 760px) {
  .shell {
    padding: 0 10px 34px;
  }

  .search-wrap {
    gap: 8px;
  }

  .brand-mark {
    gap: 7px;
    margin-bottom: 2px;
  }

  .brand-orb {
    width: 90px;
    height: 90px;
    border-radius: 24px;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .brand-word {
    font-size: 34px;
  }

  .brand-tagline {
    max-width: 320px;
    padding: 0 8px;
    font-size: 11.5px;
    line-height: 1.35;
    text-align: center;
  }

  .brand-tagline #taglineSuffix {
    display: none;
  }

  .search-shell {
    border-radius: 18px;
  }

  .query-input {
    height: 58px;
    font-size: 17px;
    padding: 0 14px;
  }

  .query-input::placeholder {
    font-size: 14px;
  }

  body.is-searching .brand-word {
    font-size: 19px;
  }

  .hint {
    margin: 2px 4px 0;
    font-size: 11px;
  }

  .brand-trademark {
    right: -15px;
    top: 2px;
    font-size: 14px;
  }

  .card-title {
    font-size: 18px;
  }
}
