*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #121212;
  color: #e0e0e0;
  min-height: 100vh;
}

/* ── Header ── */

header {
  background: #1a1a1a;
  border-bottom: 2px solid #4ecdc4;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4ecdc4;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.search-row {
  display: flex;
  flex: 1;
  min-width: 200px;
  max-width: 640px;
  gap: 0;
}

.search-row input {
  flex: 1;
  padding: 0.625rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-right: none;
  border-radius: 4px 0 0 4px;
  color: #e0e0e0;
  outline: none;
  transition: border-color 0.15s;
}

.search-row input:focus {
  border-color: #4ecdc4;
}

.search-row input::placeholder {
  color: #6a6a6a;
}

.search-row button {
  padding: 0.625rem 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  background: #4ecdc4;
  color: #121212;
  border: 1px solid #4ecdc4;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background 0.15s;
}

.search-row button:hover {
  background: #3dbdb5;
}

.search-row button:active {
  background: #36a8a0;
}


/* ── Main Content ── */

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Results Grid ── */

.recommendations-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 1.5rem;
  align-items: center;
  margin: 1.5rem 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(78, 205, 196, 0.18), transparent 34%),
    #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 2rem;
}

.recommendations-copy .eyebrow {
  margin-bottom: 0.625rem;
  color: #4ecdc4;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.recommendations-copy h1 {
  max-width: 560px;
  color: #f2f2f2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.recommendations-copy p {
  max-width: 520px;
  margin-top: 1rem;
  color: #a0a0a0;
  font-size: 1rem;
  line-height: 1.55;
}

.recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.recommendation-chip {
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e0e0e0;
  background: rgba(42, 42, 42, 0.88);
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.recommendation-chip:hover {
  color: #121212;
  background: #4ecdc4;
  border-color: #4ecdc4;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.video-card {
  display: block;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.video-card:hover {
  border-color: #4ecdc4;
}

.video-card .thumbnail-wrap {
  position: relative;
  overflow: hidden;
  background: #2a2a2a;
}

.video-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #2a2a2a;
}

.video-card.sensitive-thumbnail img {
  filter: blur(18px) brightness(0.55);
  transform: scale(1.08);
}

.sensitive-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.sensitive-icon svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: #f2f2f2;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65));
}

.video-card .card-body {
  padding: 0.75rem 1rem;
}

.video-card .card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e0e0e0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card .card-meta {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #8a8a8a;
}

/* ── Status Area ── */

.status-area {
  text-align: center;
  padding: 3rem 1rem;
  color: #6a6a6a;
}

.status-area .status-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

.status-area .status-text {
  font-size: 1.0625rem;
}

.status-area .status-sub {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  color: #5a5a5a;
}

/* ── Spinner ── */

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #2a2a2a;
  border-top-color: #4ecdc4;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Scroll Sentinel (infinite scroll trigger) ── */

.scroll-sentinel {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.scroll-sentinel .spinner {
  margin-bottom: 0;
}

/* ── Footer ── */

footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.8125rem;
  color: #5a5a5a;
  border-top: 1px solid #1e1e1e;
  margin-top: 2rem;
}

footer a {
  color: #8a8a8a;
  text-decoration: none;
}

footer a:hover {
  color: #4ecdc4;
}

@media (max-width: 760px) {
  .recommendations-panel {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .recommendation-actions {
    justify-content: flex-start;
  }

}
