body,
body.search-page,
.search-page {
  background:
    radial-gradient(circle at top, rgba(255, 45, 85, 0.16), transparent 28%),
    linear-gradient(180deg, #0d0f14 0%, #08090d 100%);
  color: #eef2f7;
}

.search-page .container {
  width: min(1120px, 94vw);
}

.search-page .app-header {
  justify-content: center;
  color: #f5f7fb;
  margin-bottom: 0.5rem;
  letter-spacing: -0.035em;
}

.search-page .yt-red,
.search-page .note-icon {
  color: #ff3050;
}

.search-page .to-text {
  color: #8a91a1;
}

.search-page .mp3-text {
  color: #f5f7fb;
}

.search-page .tab-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0 auto 0.85rem;
  max-width: 420px;
  padding: 0.24rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.search-page .tab-link {
  flex: 1 1 0;
  min-width: 0;
  max-width: 220px;
  padding: 0.72rem 1rem;
  background: transparent;
  color: #8d95a5;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.search-page .tab-link.active {
  background: linear-gradient(180deg, #ff4566 0%, #ff2a4b 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 42, 75, 0.28);
}

.search-shell,
.results-shell {
  background: linear-gradient(180deg, rgba(24, 27, 35, 0.96) 0%, rgba(15, 17, 23, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.search-shell {
  padding: 1rem 1rem 0.78rem;
  margin-bottom: 0.9rem;
}

.results-shell {
  padding: 1rem;
}

.search-form .search-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.15rem;
}

.search-form input[type="text"] {
  flex: 1;
  padding: 0.92rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: #f5f7fb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.search-form input[type="text"]::placeholder {
  color: #7e8797;
}

.search-form input[type="text"]:focus {
  outline: none;
  border-color: rgba(255, 53, 87, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 53, 87, 0.1);
}

.search-submit {
  padding: 0.82rem 1.08rem;
  background: linear-gradient(180deg, #ff4969 0%, #ff2746 100%);
  color: #fff;
  border-radius: 16px;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(255, 39, 70, 0.24);
}

.search-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.6rem;
}

.search-toolbar .status,
.filters,
.filters label,
.link-btn {
  color: #8b93a3;
}

.link-btn {
  font-weight: 600;
}

.filters {
  display: block;
  margin-top: 0.55rem;
  margin-bottom: 0;
  padding: 0.72rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.filters[hidden] {
  display: none !important;
}

.filters input[type="number"] {
  display: inline-block;
  width: 4.5rem;
  margin-left: 0.4rem;
  color: #f5f7fb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.batch-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.95rem;
  padding-bottom: 0.75rem;
  color: #c7cfdb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.batch-actions .secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

.batch-actions .secondary:disabled {
  opacity: 0.5;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.result-card {
  display: grid;
  grid-template-columns: auto 160px 1fr;
  align-items: start;
  gap: 0.72rem;
  padding: 0.72rem 0.76rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.result-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
}

.result-card.selected {
  background: linear-gradient(180deg, rgba(255, 52, 84, 0.14) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(255, 57, 88, 0.44);
  box-shadow: 0 20px 36px rgba(255, 39, 70, 0.12);
}

.result-checkbox {
  padding-top: 0.35rem;
}

.result-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #ff3050;
}

.result-thumb {
  margin: 0;
  position: relative;
}

.result-thumb img {
  width: 160px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #1a1d24;
  border-radius: 12px;
}

.result-thumb figcaption {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  padding: 0.15rem 0.42rem;
  background: rgba(5, 7, 10, 0.88);
  color: #fff;
  border-radius: 7px;
  font-size: 0.74rem;
}

.result-info h3 {
  margin: 0 0 0.22rem;
  color: #f7f9fc;
  font-size: 0.98rem;
  line-height: 1.32;
}

.result-info .meta {
  margin: 0.08rem 0;
  color: #8c95a6;
  font-size: 0.84rem;
}

.result-info .channel {
  color: #d9dee7;
  font-weight: 700;
}

.actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.convert-btn,
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 0.46rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
}

.convert-btn {
  background: linear-gradient(180deg, #ff4969 0%, #ff2746 100%);
  color: #fff;
  box-shadow: 0 12px 20px rgba(255, 39, 70, 0.24);
}

.convert-btn:hover {
  background: linear-gradient(180deg, #ff3e60 0%, #ef2343 100%);
}

.queued-btn {
  background: rgba(255, 69, 102, 0.12);
  color: #ff8ea2;
  border-color: rgba(255, 85, 116, 0.18);
  box-shadow: none;
}

.retry-btn {
  background: rgba(255, 139, 61, 0.1);
  color: #ffbb82;
  border-color: rgba(255, 160, 102, 0.18);
  box-shadow: none;
}

.download-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.job-inline-meta {
  font-size: 0.86rem;
  color: #8b93a3;
}

.job-inline-meta.success {
  color: #5ed39d;
}

.job-inline-meta.error {
  color: #ffb082;
}

.job-inline-meta.active {
  color: #ff8ea2;
}

.results-footer {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}

.results-footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.results-footer-spacer {
  min-height: 1px;
}

.results-footer .secondary {
  min-width: 150px;
}

#loadMoreBtn {
  align-self: center;
}

.load-more-status {
  font-size: 0.85rem;
  color: #8c95a6;
  text-align: center;
}

@media (max-width: 760px) {
  .search-form .search-row,
  .search-toolbar,
  .batch-bar,
  .batch-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-page .tab-link {
    min-width: 0;
    max-width: none;
  }

  .result-card {
    grid-template-columns: auto 1fr;
  }

  .result-thumb {
    grid-column: 1 / -1;
  }

  .result-thumb img {
    width: 100%;
  }
}
