/* ===== Search Page — Premium Dark ===== */

.search-page {
  position: relative;
  width: 375px;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0 auto;
  background: #0A0A0E;
  padding-bottom: 40px;
}

/* ===== Top Bar ===== */
.s-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, #0A0A0E 85%, transparent);
  padding: 52px 14px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.s-back {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  backdrop-filter: blur(8px);
}
.s-back:active {
  transform: scale(0.9);
  background: rgba(255,77,148,0.15);
}

.s-input-box {
  flex: 1;
  height: 40px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  backdrop-filter: blur(8px);
}

.s-input-box:focus-within {
  border-color: rgba(255,77,148,0.5);
  box-shadow: 0 0 0 3px rgba(255,77,148,0.1), 0 4px 20px rgba(255,77,148,0.08);
  background: rgba(255,255,255,0.08);
}

.s-input-icon { flex-shrink: 0; opacity: 0.45; }

.s-input-box input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: #F2F2F2;
  font-size: 14px;
  font-family: -apple-system, "PingFang SC", sans-serif;
  caret-color: #FF4D94;
}

.s-input-box input::placeholder {
  color: rgba(255,255,255,0.28);
}

.s-cancel {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 6px 2px;
  transition: color 0.2s;
}
.s-cancel:active { color: #FF4D94; }

/* ===== Section Titles ===== */
.s-section {
  padding: 0 14px;
}

.s-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  margin-top: 24px;
}

.s-section-title {
  font-size: 16px;
  color: #F2F2F2;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.s-section-action {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  transition: all 0.2s;
}
.s-section-action:active {
  background: rgba(255,77,148,0.1);
  color: rgba(255,77,148,0.6);
}

/* ===== Tags — Glassmorphism Pills ===== */
.s-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.s-tag {
  position: relative;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
}

.s-tag:active {
  transform: scale(0.94);
}

.s-tag:nth-child(1) { border-color: rgba(255,77,148,0.25); color: #FF4D94; background: rgba(255,77,148,0.08); }
.s-tag:nth-child(2) { border-color: rgba(255,126,179,0.2); color: #FF7EB3; background: rgba(255,126,179,0.06); }
.s-tag:nth-child(3) { border-color: rgba(244,213,98,0.2); color: #F4D562; background: rgba(244,213,98,0.06); }

/* ===== History Tags ===== */
.s-history-tag {
  padding: 7px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.s-history-tag:active {
  background: rgba(255,77,148,0.08);
  border-color: rgba(255,77,148,0.2);
  color: #FF4D94;
}

/* ===== Results ===== */
.s-results {
  padding: 0 14px;
}

.s-results-count {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  margin: 20px 0 16px;
}

.s-result-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.25s ease;
}
.s-result-card:active {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,77,148,0.15);
  transform: scale(0.985);
}

.s-result-cover-wrap {
  position: relative;
  width: 130px;
  height: 74px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #141418;
}

.s-result-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.s-result-duration {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.s-result-badge {
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.s-result-badge.badge-vip {
  background: linear-gradient(135deg, #F4D562, #E6A817);
  color: #1a1a1a;
}
.s-result-badge.badge-coins {
  background: linear-gradient(135deg, #FF6B6B, #EE5A24);
  color: #fff;
}

.s-result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0;
}

.s-result-title {
  font-size: 14px;
  color: #F2F2F2;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
}

.s-result-title em {
  color: #FF4D94;
  font-style: normal;
  font-weight: 500;
}

.s-result-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}

.s-result-author {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s-result-author em {
  color: #FF4D94;
  font-style: normal;
}

.s-result-stat {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ===== Empty State ===== */
.s-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
}

.s-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.s-empty p {
  font-size: 14px;
  color: rgba(255,255,255,0.25);
}

.s-empty .s-empty-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.15);
  margin-top: 6px;
}
