:root {
  --bg: #f4f8fb;
  --ink: #102036;
  --card: #ffffff;
  --accent: #0f766e;
  --line: #dde7ef;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eef6ff 0%, var(--bg) 70%);
  color: var(--ink);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  z-index: -1;
}

.orb-a {
  width: 320px;
  height: 320px;
  background: rgba(15, 118, 110, 0.18);
  top: -80px;
  left: -60px;
}

.orb-b {
  width: 380px;
  height: 380px;
  background: rgba(9, 86, 170, 0.16);
  right: -100px;
  top: 30%;
}

.home-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 20;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid #c9d8e8;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 22px rgba(16, 32, 54, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px;
}

.home-btn:hover {
  background: #ffffff;
  border-color: #9cb6cf;
}

.home-icon {
  width: 24px;
  height: 24px;
  fill: #0b5072;
}

.home-label {
  font-size: 10px;
  font-weight: 700;
  color: #0b5072;
  line-height: 1;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero p { margin: 8px 0 12px; color: #3b4f66; }
.status { font-size: .95rem; color: #3b4f66; }

.search-panel {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
}

input, button {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 1rem;
}

button {
  background: var(--card);
  cursor: pointer;
}

#searchBtn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.chips {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip { background: #f8fbfe; }

.results {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #e9eef4;
}

.card-body { padding: 10px; }
.title { font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.meta { color: #60758e; font-size: .9rem; }

.player {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.hidden { display: none; }
.close { align-self: flex-end; }
#playerFrame { border: none; width: 100%; height: calc(100% - 52px); border-radius: 10px; background: #000; }

@media (max-width: 680px) {
  .home-btn {
    width: 58px;
    height: 58px;
    top: 10px;
    right: 10px;
  }

  .search-panel { grid-template-columns: 1fr 1fr; }
  #searchBtn { grid-column: span 2; }
}
