/* Styla utforska- och trending-sidorna. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0b0b0f;
  color: #fff;
}

.topbar {
  /* Halla navigationen synlig overst. */
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.nav-btn {
  text-decoration: none;
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 14px;
}

.nav-primary {
  color: #fff;
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.3);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.search-panel {
  /* Visa sokpanel med filter och metadata. */
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.search-panel h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

.search-form {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr auto auto;
  gap: 8px;
}

.search-form input,
.search-form select,
.search-form button {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 10px;
}

.search-form button {
  background: #6366f1;
  border-color: #6366f1;
  cursor: pointer;
  font-weight: 600;
}

.clear-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 0 12px;
}

.result-meta {
  margin: 10px 0 0;
  color: #a7adb8;
  font-size: 14px;
}

.active-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.hashtag-chip {
  font-size: 12px;
  color: #ddd6fe;
  border: 1px solid #8b5cf6;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
}

.results-grid {
  /* Visa resultat i responsivt rutnat. */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.thumb-card,
.empty-state {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
}

.thumb-link {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  background: #121218;
  aspect-ratio: 9 / 16;
}

.thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0f0f14;
}

.thumb-overlay {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.thumb-pill {
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px 7px;
}

@media (max-width: 900px) {
  /* Forenkla soklayout pa mindre skarmar. */
  .search-form {
    grid-template-columns: 1fr 1fr;
  }

  .search-form input {
    grid-column: 1 / -1;
  }
}
