/* ============================================
   StreamVault — Custom CSS
   Netflix-inspired dark streaming UI
   ============================================ */

/* ─── Global ─────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0b0d14;
}
::-webkit-scrollbar-thumb {
    background: #1f2233;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d3048;
}

::selection {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

body {
    overflow-x: hidden;
}

/* ─── Movie Cards ────────────────────────── */
.movie-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
.movie-card:hover {
    transform: translateY(-6px);
}

/* ─── Hero Slider ────────────────────────── */
.hero-slide {
    transition: opacity 0.7s ease-in-out;
}
#hero-slider:hover #hero-prev,
#hero-slider:hover #hero-next {
    opacity: 1;
}
.hero-dot {
    transition: all 0.3s ease;
}
.hero-dot.active {
    background-color: #8b5cf6;
    width: 2rem;
}

/* ─── Glassmorphism ──────────────────────── */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── Toast Notifications ────────────────── */
.toast {
    animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.toast.toast-out {
    animation: toastOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ─── Skeleton Loading ───────────────────── */
.skeleton {
    background: linear-gradient(90deg, #1a1d29 25%, #22253a 50%, #1a1d29 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Theater Mode ───────────────────────── */
.theater-mode {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theater-mode #player-wrapper {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border: none;
}

/* ─── Flash Message Auto Hide ────────────── */
.flash-message {
    animation: flashFade 0.3s ease-in;
}
@keyframes flashFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Search Dropdown ────────────────────── */
#search-results .search-item,
#mobile-search-results .search-item {
    transition: background 0.15s ease;
}
#search-results .search-item:hover,
#mobile-search-results .search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ─── Line Clamp ─────────────────────────── */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Navbar Active State ────────────────── */
.nav-link.active {
    color: white;
    position: relative;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #8b5cf6, #ec4899);
    border-radius: 1px;
}

/* ─── Ad Slots ───────────────────────────── */
.ad-slot {
    text-align: center;
    min-height: 1px;
}
.ad-slot:empty {
    display: none;
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 768px) {
    .movie-card:hover {
        transform: translateY(-3px);
    }
    #admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    #admin-sidebar.open {
        transform: translateX(0);
    }
}

/* ─── Pulse Animation ────────────────────── */
@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* ─── Gradient Text ──────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
