/* ============================================================
   SERIES_DETAIL.CSS (Netflix Inspired)
   ============================================================ */

.s-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4rem 5%;
    color: white;
}

.s-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: top center;
    background-attachment: fixed;
    z-index: 0;
}

.s-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 30%, #060608 100%),
                radial-gradient(circle at center, transparent 0%, rgba(100,0,0,0.15) 100%);
    z-index: 1;
}

.s-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.s-meta-top {
    margin-bottom: 1rem;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.8);
}

.s-rating-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.s-star { width: 14px; height: 14px; fill: #f59e0b; stroke: #f59e0b; }
.s-rating { color: #f59e0b; }
.s-year { color: #aaa; }
.s-tagline { color: #ddd; font-style: italic; }

.s-title {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    letter-spacing: -1px;
}

.s-overview {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.s-actions {
    display: flex;
    gap: 1rem;
}

.s-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}

.s-btn-primary {
    background: var(--grad);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 71, 101, 0.25);
    border-radius: 50px;
}
.s-btn-primary:hover { 
    background: var(--grad-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 8px 28px rgba(255, 71, 101, 0.45);
}

.s-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50px;
}
.s-btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }


/* TRENDS SECTION */
.s-trends-section {
    padding: 2rem 5% 5rem;
    background: #060608;
}

.s-trends-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.s-trends-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
}

.s-tabs {
    display: flex;
    gap: 1.5rem;
}
.s-tabs span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #777;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}
.s-tabs span.active, .s-tabs span:hover {
    color: white;
}

.s-genres-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.s-genre-pill {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}

.s-genre-pill.active, .s-genre-pill:hover {
    background: var(--pink);
    border-color: var(--pink);
    box-shadow: 0 4px 15px rgba(255, 71, 101, 0.4);
}

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

.s-card {
    display: block;
    text-decoration: none;
    color: white;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
    background: #111;
}

.s-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.s-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.s-card-info {
    padding: 1rem;
}

.s-card-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
}


/* WHERE TO WATCH */
.s-providers-section {
    padding: 0 5% 5rem;
}

.s-providers-header {
    margin-bottom: 2rem;
}

.s-providers-header h2 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.s-providers-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.s-provider-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #ccc;
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 12px;
    width: 120px;
    text-align: center;
    transition: 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}

.s-provider-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
    border-color: var(--pink);
}

.s-provider-item img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.s-provider-item span {
    font-size: 0.8rem;
    font-weight: 600;
}
.s-provider-item small {
    font-size: 0.7rem;
    color: #777;
}

/* Trailer Modal */
.trailer-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.trailer-modal.active {
    opacity: 1;
    pointer-events: all;
}

.trailer-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.trailer-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: black;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    transform: scale(0.95);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.trailer-modal.active .trailer-content {
    transform: scale(1);
}

.trailer-content iframe {
    width: 100%;
    height: 100%;
}

.close-modal {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
}
.close-modal:hover { background: var(--pink); }

/* ── Floating Action Button (FAB) ── */
.fab-random {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(255, 71, 101, 0.35);
  transition: all 0.2s ease;
  color: white;
}
.fab-random svg {
  width: 22px;
  height: 22px;
}
.fab-random:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 12px 40px rgba(255, 71, 101, 0.55);
}
.fab-random:active {
  transform: scale(0.95);
}
.fab-random:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .s-hero { padding: 4rem 1.2rem 3rem; }
  .s-title { font-size: 2.2rem; }
  .s-trends-section, .s-providers-section { padding: 2rem 1.2rem; }
  .s-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}
@media (max-width: 480px) {
  .s-actions { flex-direction: column; }
  .s-btn { width: 100%; justify-content: center; }
  .s-providers-grid { flex-direction: column; }
  .s-provider-item { width: 100%; }
}
