:root {
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #13222c;
  --muted: #5c6d78;
  --line: #d8e1e8;
  --brand: #0b5cff;
  --brand-strong: #003fc0;
  --mint: #0e9f6e;
  --danger: #c53a35;
  --shadow: 0 12px 30px rgba(10, 34, 54, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #f9fbff 0%, #eef2f6 45%, #edf1f5 100%);
}

.bg-blur {
  position: fixed;
  border-radius: 999px;
  filter: blur(65px);
  pointer-events: none;
  opacity: 0.45;
  z-index: -1;
}

.bg-blur-a {
  width: 340px;
  height: 340px;
  top: -100px;
  left: -80px;
  background: #7fc9ff;
}

.bg-blur-b {
  width: 320px;
  height: 320px;
  bottom: -110px;
  right: -60px;
  background: #a4f0cf;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d7e6f4;
  padding: 6px;
}

.eyebrow {
  margin: 0;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(18px, 2.3vw, 28px);
  line-height: 1.1;
}

.search-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-wrap input {
  width: min(560px, 60vw);
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

.search-wrap input:focus {
  outline: 2px solid #99b9ff;
  border-color: #9ab8ff;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#searchBtn {
  color: #fff;
  background: linear-gradient(130deg, var(--brand), var(--brand-strong));
  box-shadow: 0 8px 20px rgba(11, 92, 255, 0.3);
}

#searchBtn:not(:disabled):hover {
  transform: translateY(-1px);
}

button.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

main {
  max-width: 1240px;
  margin: 0 auto;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
}

.example {
  color: var(--muted);
  font-size: 14px;
}

.status {
  color: #3b5060;
  font-size: 14px;
  font-weight: 600;
}

.status-success {
  color: var(--mint);
}

.status-error {
  color: var(--danger);
}

.resultsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 18px 22px 28px;
}

.card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid #e0e8ef;
  box-shadow: var(--shadow);
  padding: 14px;
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  border-color: #b8ccdf;
  box-shadow: 0 16px 36px rgba(10, 34, 54, 0.12);
}

.card-clickable:focus-visible {
  outline: 3px solid #99b9ff;
  outline-offset: 2px;
}

.thumb {
  width: 86px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f4f8;
  flex: 0 0 86px;
  border: 1px solid #e4edf4;
}

.meta {
  min-width: 0;
  flex: 1;
}

.title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.match {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.matchDots {
  display: inline-flex;
  gap: 4px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d7dee6;
}

.dot.filled {
  background: #0e9f6e;
}

.matchLabel {
  font-size: 12px;
  color: #3c4f5d;
  font-weight: 700;
}

.about {
  margin: 10px 0;
  color: #253440;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.about p,
.about ul,
.about ol {
  margin: 0 0 8px;
}

.about p:last-child,
.about ul:last-child,
.about ol:last-child {
  margin-bottom: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.chip {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #214474;
  font-size: 12px;
  font-weight: 700;
}

.profileLink {
  color: var(--brand-strong);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.profileLink:hover {
  text-decoration: underline;
}

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

@media (max-width: 760px) {
  .topbar {
    padding: 18px;
  }

  .search-wrap {
    width: 100%;
  }

  .search-wrap input {
    width: 100%;
    min-width: 0;
  }

  .controls,
  .resultsGrid {
    padding-left: 16px;
    padding-right: 16px;
  }
}
