/* ============================
   PREMIUM SEARCH PAGE CSS
   ============================ */

/* Search Hero Bar */
.search-hero {
    padding: 40px 0 30px;
    text-align: center;
}
.search-hero-title {
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.search-hero-title span {
    background: linear-gradient(135deg, #e50914, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Big Search Input */
.search-bar-wrap {
    position: relative;
    max-width: 680px;
    margin: 0 auto 10px;
}
.search-input-big {
    width: 100%;
    padding: 16px 60px 16px 22px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}
.search-input-big::placeholder { color: rgba(255,255,255,0.3); }
.search-input-big:focus {
    border-color: rgba(229,9,20,0.55);
    background: rgba(255,255,255,0.09);
    box-shadow: 0 0 0 3px rgba(229,9,20,0.12), 0 8px 32px rgba(0,0,0,0.4);
}
.search-submit-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e50914, #ec4899);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(229,9,20,0.4);
}
.search-submit-btn:hover { transform: translateY(-50%) scale(1.08); box-shadow: 0 6px 20px rgba(229,9,20,0.55); }

/* Result count strip */
.result-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 12px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
}
.result-strip-count {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}
.result-strip-count span {
    color: #e50914;
    font-size: 16px;
}
.result-strip-query {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    font-style: italic;
}

/* Search result cards — same as home grid */
.search-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 480px) { .search-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .search-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .search-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1280px) { .search-grid { grid-template-columns: repeat(6, 1fr); } }

.s-card {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.06);
    aspect-ratio: 2/3;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.s-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 45px rgba(0,0,0,0.65), 0 0 20px rgba(229,9,20,0.18);
    border-color: rgba(229,9,20,0.35);
    z-index: 5;
}
.s-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}
.s-card:hover img { transform: scale(1.08); }

/* Type badge top-right */
.s-type-badge {
    position: absolute;
    top: 0; right: 0;
    font-size: 9px; font-weight: 800;
    padding: 4px 10px;
    border-radius: 0 14px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.s-type-badge.movie { background: linear-gradient(135deg, #e50914, #ec4899); color: #fff; box-shadow: 0 2px 8px rgba(229,9,20,0.4); }
.s-type-badge.series { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; box-shadow: 0 2px 8px rgba(139,92,246,0.4); }

/* Year badge bottom-left */
.s-year-badge {
    position: absolute;
    bottom: 38px; left: 8px;
    font-size: 10px; font-weight: 700;
    padding: 2px 8px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    color: rgba(255,255,255,0.7);
}

/* Play overlay center */
.s-play-overlay {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    background: rgba(0,0,0,0.15);
}
.s-card:hover .s-play-overlay { opacity: 1; }
.s-play-btn {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(229,9,20,0.85);
    display: flex; align-items: center; justify-content: center;
    transform: scale(0.6);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 24px rgba(229,9,20,0.55);
}
.s-card:hover .s-play-btn { transform: scale(1); }

/* Bottom info */
.s-card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 24px 10px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.65) 60%, transparent 100%);
}
.s-card-title {
    font-size: 11px; font-weight: 800;
    color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color 0.2s;
}
.s-card:hover .s-card-title { color: #f87171; }

/* Stagger animation */
@keyframes srFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.s-card { animation: srFadeUp 0.4s ease both; }

/* Empty / no-query states */
.search-empty-state {
    text-align: center;
    padding: 80px 20px;
}
.search-empty-icon {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    font-size: 34px;
    color: rgba(255,255,255,0.25);
}
.search-empty-title {
    font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 8px;
}
.search-empty-sub {
    font-size: 14px; color: rgba(255,255,255,0.35); line-height: 1.6; max-width: 360px; margin: 0 auto;
}

/* Quick suggestion chips */
.suggestion-chips {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px;
}
.chip {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: all 0.2s;
}
.chip:hover {
    background: rgba(229,9,20,0.12);
    border-color: rgba(229,9,20,0.4);
    color: #fff;
}

/* Rating badge */
.s-rating {
    display: flex; align-items: center; gap: 3px;
    font-size: 9px; font-weight: 800; color: #facc15;
}

/* ════════════════════════════════════════════
   SEARCH RESULTS — ROW-WISE LIST LAYOUT
   ════════════════════════════════════════════ */

/* Header count */
.sr-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    padding: 0 2px;
}
.sr-count {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.45);
}
.sr-count span {
    color: #e50914;
    font-size: 18px;
    font-weight: 900;
    margin-right: 2px;
}
.sr-count em {
    font-style: italic;
    color: rgba(255,255,255,0.55);
}

/* Row list wrapper */
.sr-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 820px;
    margin: 0 auto;
}

/* Each row */
.sr-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px 10px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.22s ease;
    animation: srRowFadeIn 0.35s ease both;
    position: relative;
    overflow: hidden;
}
.sr-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(229,9,20,0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.22s;
    pointer-events: none;
}
.sr-row:hover {
    background: rgba(255,255,255,0.055);
    border-color: rgba(229,9,20,0.25);
    transform: translateX(4px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), -3px 0 0 0 rgba(229,9,20,0.5);
}
.sr-row:hover::before { opacity: 1; }

/* Poster */
.sr-poster-wrap {
    position: relative;
    flex-shrink: 0;
    width: 60px;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
}
.sr-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.sr-row:hover .sr-poster { transform: scale(1.07); }
.sr-poster-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: rgba(255,255,255,0.18);
    font-size: 22px;
}
.sr-poster-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.22s;
}
.sr-row:hover .sr-poster-overlay { opacity: 1; }
.sr-play-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(229,9,20,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    padding-left: 2px;
    box-shadow: 0 0 16px rgba(229,9,20,0.5);
    transform: scale(0.7);
    transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.sr-row:hover .sr-play-btn { transform: scale(1); }

/* Info section */
.sr-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.sr-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

/* Type badge */
.sr-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sr-badge-movie {
    background: linear-gradient(135deg, rgba(229,9,20,0.18), rgba(236,72,153,0.18));
    border: 1px solid rgba(229,9,20,0.3);
    color: #f87171;
}
.sr-badge-series {
    background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(99,102,241,0.18));
    border: 1px solid rgba(139,92,246,0.3);
    color: #a78bfa;
}

/* Year */
.sr-year {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 6px;
}

/* Rating */
.sr-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
    color: #facc15;
}
.sr-rating i { font-size: 9px; filter: drop-shadow(0 0 3px #facc15); }
.sr-match {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    flex-shrink: 0;
}

/* Title */
.sr-title {
    font-size: 15px;
    font-weight: 800;
    color: #f3f4f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.3;
    transition: color 0.2s;
}
.sr-row:hover .sr-title { color: #fff; }

/* Original title */
.sr-orig-title {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CTA */
.sr-cta { margin-top: 2px; }
.sr-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    transition: color 0.2s;
}
.sr-row:hover .sr-cta-btn { color: #e50914; }

/* Arrow */
.sr-arrow {
    flex-shrink: 0;
    color: rgba(255,255,255,0.15);
    font-size: 12px;
    transition: all 0.22s;
}
.sr-row:hover .sr-arrow {
    color: #e50914;
    transform: translateX(4px);
}

/* Stagger animation */
@keyframes srRowFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .sr-poster-wrap { width: 50px; height: 74px; }
    .sr-title { font-size: 13px; }
    .sr-row { padding: 8px 10px 8px 8px; gap: 12px; }
}
