/* CSS Variables untuk konsistensi */
:root {
    --text-dark-primary: #333;
    --text-light-primary: #fff;
    --text-soft-gray: #777;
    --text-subtle-gray: #aaa;
    --accent-green: #22c55e;
    --glass-bg-opacity-navbar: 0.15;
    --glass-bg-opacity-light: 0.08;
    --glass-blur-amount-strong: 25px;
    --glass-blur-amount-medium: 15px;
    --glass-border-color: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    --glass-hover-bg-opacity: 0.12;
    --glass-hover-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --dark-element-bg: #1f2937; /* A softer dark blue-gray */
    --dark-element-text: #fff;
    --dark-element-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --border-radius-pill: 30px;
    --font-family-primary: 'Poppins', sans-serif;
    --font-size-base: 16px;    
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-family-primary);
    color: var(--text-dark-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: background-color 0.5s ease;
}

/* Fixed Background dengan blur stabil */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../assets/images/background.jpg') center center/cover no-repeat;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -3;
    will-change: auto;
}

body.dark-mode .background-overlay {
    background: url('../assets/images/background_night.jpg') center center/cover no-repeat;
}

/* Overlay transparan stabil */
.background-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
}

/* Tambahan overlay untuk stabilitas */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 245, 245, 0.05);
    z-index: -2;
    pointer-events: none;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-soft-gray);
    background-color: rgba(255, 255, 255, var(--glass-bg-opacity-light)); /* Konsisten dengan .faq-dropdown */
    backdrop-filter: blur(var(--glass-blur-amount-medium));
    -webkit-backdrop-filter: blur(var(--glass-blur-amount-medium));
    border: 1px solid var(--glass-border-color); /* Konsisten dengan .faq-dropdown */
    border-radius: var(--border-radius-md); /* Konsisten dengan .faq-dropdown */
    box-shadow: var(--glass-shadow); /* Konsisten dengan .faq-dropdown */
    padding: 8px 12px; /* Sesuai dengan .faq-dropdown */
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.theme-toggle:hover {
    color: var(--text-dark-primary);
    background-color: rgba(255, 255, 255, var(--glass-hover-bg-opacity)); /* Konsisten dengan .faq-dropdown:hover */
    transform: translateY(-2px); /* Konsisten dengan efek hover lainnya */
    box-shadow: var(--glass-hover-shadow); /* Konsisten dengan .faq-dropdown:hover */
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3); /* Efek fokus untuk aksesibilitas */
}

.theme-toggle i {
    font-size: 20px;
}

/* Dark Mode Styles */
body.dark-mode {
    --text-dark-primary: #e5e7eb;
    --text-soft-gray: #9ca3af;
    --text-subtle-gray: #6b7280;
    --glass-border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .content-card h3 {
    color: var(--text-light-primary);
}
body.dark-mode .navbar .logo,
body.dark-mode .faq-dropdown,
body.dark-mode .section-title,
body.dark-mode .category-pill:not(.active) {
    color: var(--text-light-primary);
}

/* Responsivitas untuk Theme Toggle */
@media (max-width: 768px) {
    .theme-toggle {
        padding: 6px 10px; /* Sesuai dengan skala responsif .faq-dropdown */
        font-size: 18px; /* Sedikit lebih kecil untuk perangkat mobile */
    }
    .theme-toggle i {
        font-size: 18px; /* Sesuai dengan responsivitas */
    }
}

.container {
    width: 100%;
    max-width: 1400px;
    position: relative;
    z-index: 1;
}

/* Navigation Styles */
/* Navigation Styles */
.navbar {
    width: 95%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: rgba(255, 255, 255, var(--glass-bg-opacity-navbar));
    backdrop-filter: blur(var(--glass-blur-amount-medium));
    -webkit-backdrop-filter: blur(var(--glass-blur-amount-medium));
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    margin-top: 20px;
    position: sticky;
    top: 20px;
    z-index: 1000;
    border: 1px solid var(--glass-border-color);
}
/* Target div di dalam navbar untuk kontrol layout */
.navbar > .flex {
    gap: 20px;
}

/* Atur agar search bar tidak terlalu lebar di desktop */
.nav-links-group {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}
.search-container {
    max-width: 450px; /* Batasi lebar maksimum search bar */
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark-primary);
    text-decoration: none;
}

.navbar .logo img {
    height: 35px; /* Ukuran sedikit lebih besar */
    width: 35px;
    border-radius: 50%; /* Membuatnya bulat kembali */
}

.search-container {
    display: flex;
    background-color: var(--dark-element-bg);
    border-radius: var(--border-radius-pill);
    padding: 5px;
    position: relative;
    box-shadow: var(--dark-element-shadow);
}

.search-container input {
    border: none;
    background: transparent;
    padding: 8px 15px;
    padding-right: 40px;
    font-size: var(--font-size-base);
    color: var(--text-light-primary);
    outline: none;
    width: 180px;
    transition: width 0.3s ease;
}

.search-container input::placeholder {
    color: var(--text-subtle-gray);
}

.search-container .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light-primary);
    font-size: 16px;
    pointer-events: none;
}

.user-menu-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.faq-dropdown {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--font-size-base);
    font-weight: 500;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, var(--glass-bg-opacity-light));
    backdrop-filter: blur(var(--glass-blur-amount-medium));
    -webkit-backdrop-filter: blur(var(--glass-blur-amount-medium));
    border-radius: var(--border-radius-md);
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--glass-shadow);
    transition: background-color 0.3s ease;
    color: var(--text-dark-primary);
    text-decoration: none;
}

.faq-dropdown:hover {
    background-color: rgba(255, 255, 255, var(--glass-hover-bg-opacity));
}

/* Hero Section Styles */
.hero-section {
    margin-top: 40px;
}

.hero-card {
    background: rgba(255, 255, 255, var(--glass-bg-opacity-light));
    backdrop-filter: blur(var(--glass-blur-amount-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-amount-strong));
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    position: relative;
    height: 300px;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    border: 1px solid var(--glass-border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-hover-shadow);
}

.hero-card .hero-image {
    position: absolute;
    top: 0;
    height: 100%;
    width: 60%;
    object-fit: cover;
    pointer-events: none;
    border-radius: var(--border-radius-lg);
}

.hero-card.left-content .hero-image {
    right: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.hero-card.left-content .hero-content-wrapper {
    width: 40%;
    position: relative;
    z-index: 2;
    color: var(--text-light-primary);
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hero-card.right-content .hero-image {
    left: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.hero-card.right-content .hero-content-wrapper {
    width: 40%;
    position: relative;
    z-index: 2;
    margin-left: auto;
    text-align: right;
    color: var(--text-light-primary);
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hero-card h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.content-type {
    font-size: 14px;
    color: var(--text-subtle-gray);
    margin-bottom: 5px;
}

.play-button {
    background-color: var(--text-light-primary);
    color: var(--text-dark-primary);
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.play-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Categories Section */
.categories-section {
    margin-top: 40px;
}

.category-pill {
    background: rgba(255, 255, 255, var(--glass-bg-opacity-light));
    backdrop-filter: blur(var(--glass-blur-amount-medium));
    -webkit-backdrop-filter: blur(var(--glass-blur-amount-medium));
    border: 1px solid var(--glass-border-color);
    padding: 10px 20px;
    border-radius: var(--border-radius-pill);
    color: var(--text-dark-primary);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--glass-shadow);
}

.category-pill:hover:not(.active) {
    background-color: rgba(255, 255, 255, var(--glass-hover-bg-opacity));
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.category-pill.active {
    background-color: var(--dark-element-bg);
    color: var(--dark-element-text);
    border-color: var(--dark-element-bg);
    box-shadow: var(--dark-element-shadow);
}

.category-pill .fa-fire {
    background: linear-gradient(45deg, #ffc107, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Movie Grid Section */
.movie-grid-section {
    margin-top: 40px;
}

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

.section-title {
    color: var(--text-dark-primary);
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title .fa-fire {
    background: linear-gradient(45deg, #ffc107, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-options {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background-color: rgba(255, 255, 255, var(--glass-bg-opacity-light));
    backdrop-filter: blur(var(--glass-blur-amount-medium));
    -webkit-backdrop-filter: blur(var(--glass-blur-amount-medium));
    border: 1px solid var(--glass-border-color);
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    color: var(--text-soft-gray);
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: var(--glass-shadow);
}

.filter-btn:hover {
    background-color: rgba(255, 255, 255, var(--glass-hover-bg-opacity));
    transform: translateY(-2px);
    box-shadow: var(--glass-hover-shadow);
}

/* Horizontal Scrolling Trending Section */
.trending-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
}

.trending-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.trending-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.trending-item {
    flex: 0 0 180px;
    min-width: 180px;
}

/* Navigation buttons untuk trending */
.scroll-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scroll-nav:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.scroll-nav.prev {
    left: 10px;
}

.scroll-nav.next {
    right: 10px;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.content-card {
    background: rgba(255, 255, 255, var(--glass-bg-opacity-light));
    backdrop-filter: blur(var(--glass-blur-amount-medium));
    -webkit-backdrop-filter: blur(var(--glass-blur-amount-medium));
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.05) 0%, transparent 40%);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.content-card:hover::before {
    opacity: 1;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-hover-shadow);
}

.content-card img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    display: block;
    border-top-left-radius: var(--border-radius-md);
    border-top-right-radius: var(--border-radius-md);
    position: relative;
    z-index: 1;
}

.content-card .p-4 {
    padding: 15px;
    position: relative;
    z-index: 2;
}

.content-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-card .details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-soft-gray);
}

.content-card .details .release-year {
    font-size: 14px;
    color: var(--text-soft-gray);
    font-weight: 500;
}

.content-card .rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.content-card .rating i {
    color: #FFD700;
}
.content-card .views {
    font-size: 13px;
    color: var(--text-soft-gray);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar { padding: 10px 20px; }
    .hero-card {
        flex-direction: column;
        height: auto;
        padding: 20px;
        align-items: flex-start;
    }
    .hero-card .hero-image {
        position: relative;
        width: 100%;
        height: 200px;
        border-radius: var(--border-radius-md);
        margin-bottom: 15px;
    }
    .hero-card.left-content .hero-image,
    .hero-card.right-content .hero-image {
        left: 0;
        right: 0;
        border-radius: var(--border-radius-md);
    }
    .hero-card.left-content .hero-content-wrapper,
    .hero-card.right-content .hero-content-wrapper {
        width: 100%;
        text-align: left;
        margin-left: 0;
    }
    .nav-links-group { gap: 15px; }
    .trending-item {
        flex: 0 0 150px;
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px;
        margin-top: 15px;
    }
    /* Terapkan flex-wrap ke container yang benar */
    .navbar > .flex {
        flex-wrap: wrap;
        /* Paksa item di baris atas untuk menyebar ke ujung kiri dan kanan */
        justify-content: space-between; 
        row-gap: 15px;
    }
    .navbar .logo {
        order: 1;
        font-size: 20px;
    }
    .user-menu-group {
        order: 2;
    }
    .nav-links-group {
        order: 3; /* Pindahkan ke baris bawah */
        width: 100%; /* Ambil lebar penuh */
        justify-content: center; /* Posisikan search bar ke tengah */
    }
    .search-container {
        max-width: 100%; /* Izinkan search bar mengambil lebar penuh di mobile */
    }
    .search-container input {
        width: 100%;
        padding-right: 35px;
    }
    .categories-section .flex {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
    }
    .category-pill {
        flex-shrink: 0;
        padding: 8px 15px;
        font-size: 14px;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    .content-card img { height: 220px; }
    .content-card h3 { font-size: 16px; }
    .content-card .details { font-size: 12px; }
    .trending-item {
        flex: 0 0 140px;
        min-width: 140px;
    }
    .scroll-nav {
        padding: 8px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container { padding: 10px; }
    .search-container input { width: 100%; }
    .hero-card h2 { font-size: 22px; }
    .play-button { padding: 10px 18px; font-size: 14px; }
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .content-card img { height: 180px; }
    .trending-item {
        flex: 0 0 120px;
        min-width: 120px;
    }
}

/* Loading and error states */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    color: var(--text-soft-gray);
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin: 20px 0;
    color: #d32f2f;
    text-align: center;
}

.no-content {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-soft-gray);
}

.no-content i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.pagination .category-pill {
    min-width: 40px;
    justify-content: center;
}

.pagination .category-pill.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .category-pill.disabled:hover {
    transform: none;
    background-color: rgba(255, 255, 255, var(--glass-bg-opacity-light));
}

/* Smooth scrolling untuk trending section */
.trending-scroll {
    scroll-snap-type: x mandatory;
}

.trending-item {
    scroll-snap-align: start;
}


        #devtools-warning {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            z-index: 9999;
            justify-content: center;
            align-items: center;
            color: white;
            font-family: Arial, sans-serif;
            text-align: center;
        }
        #devtools-warning.show {
            display: flex;
        }
        #devtools-warning .warning-content {
            background: #1f2937;
            padding: 2rem;
            border-radius: 1rem;
            border: 2px solid #dc2626;
            max-width: 90%;
            box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
            animation: pulse 1.5s infinite;
        }
        @keyframes pulse {
            0% { transform: scale(1); box-shadow: 0 0 20px rgba(220, 38, 38, 0.5); }
            50% { transform: scale(1.02); box-shadow: 0 0 30px rgba(220, 38, 38, 0.7); }
            100% { transform: scale(1); box-shadow: 0 0 20px rgba(220, 38, 38, 0.5); }
        }
        #devtools-warning i {
            color: #dc2626;
            margin-bottom: 1rem;
        }

/* History & Favorites Section Styles */
.history-section {
    background: rgba(255, 255, 255, var(--glass-bg-opacity-light));
    backdrop-filter: blur(var(--glass-blur-amount-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-amount-strong));
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--glass-shadow);
}

body.dark-mode .history-section {
    background: rgba(26, 26, 26, 0.5);
}

.history-item, .favorite-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border-color);
}

.history-item:hover, .favorite-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--glass-hover-shadow);
}

.item-poster {
    width: 60px;
    height: 90px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.item-title {
    font-weight: 600;
    color: var(--text-dark-primary);
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.new-episode-badge {
    background-color: var(--accent-green);
    color: white;
    padding: 2px 8px;
    border-radius: var(--border-radius-pill);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    flex-shrink: 0;
}

.item-meta, .item-date {
    color: var(--text-soft-gray);
    font-size: 13px;
}

.item-actions {
    display: flex;
    gap: 10px;
}

.action-btn.delete-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.delete-btn:hover {
    background: #ef4444;
    color: white;
}

.clear-all-btn {
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.clear-all-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-soft-gray);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Latest Filter Styles */
.latest-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

        /* Favorite Button Styles */
        .favorite-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            background: rgba(0, 0, 0, 0.7);
            border: none;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            z-index: 10;
        }

        .favorite-btn:hover {
            background: rgba(0, 0, 0, 0.9);
            transform: scale(1.1);
        }

        .favorite-btn i {
            font-size: 16px;
            color: #fff;
            transition: all 0.3s ease;
        }

        .favorite-btn.favorited i {
            color: var(--accent-green);
        }

        .favorite-btn:hover i {
            color: #22c55e;
        }

        /* Time Ago Badge */
        .time-ago-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            z-index: 10;
        }

/* Live Search Suggestions Box - Enhanced Professional Look */
.suggestions-box {
    display: none;
    position: absolute;
    top: calc(100% + 8px); /* Increased gap for a cleaner look */
    left: 0;
    right: 0;
    background-color: rgba(26, 26, 26, 0.95); /* Darker, more solid background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: none;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg); /* Match container's roundness */
    z-index: 1001;
    max-height: 400px; /* Allow more items to be shown */
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--text-subtle-gray) transparent;
}

/* Show suggestions box when it has content */
.suggestions-box[style*="display: block"] {
    opacity: 1;
    transform: translateY(0);
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    color: var(--text-light-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item.active,
.suggestion-item {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.suggestion-item img {
    width: 45px;
    height: 65px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin-right: 15px;
    flex-shrink: 0;
}

.suggestion-item.active,
.suggestion-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.suggestion-item .suggestion-info {
    overflow: hidden; /* Prevent text from overflowing */
}

.suggestion-item.loading,
.suggestion-item.no-results {
    color: var(--text-subtle-gray);
    cursor: default;
    justify-content: center;
    padding: 20px;
    font-style: italic;
}

.suggestion-item.loading:hover,
.suggestion-item.no-results:hover {
    background-color: transparent;
    transform: none;
}

        /* Library Tab Styles */
        .library-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            justify-content: center;
        }

        .tab-btn {
            padding: 10px 20px;
            border: 2px solid var(--glass-border-color);
            background: transparent;
            color: var(--text-soft-gray);
            border-radius: var(--border-radius-pill);
            cursor: pointer;
            transition: all 0.3s;
        }

        .tab-btn.active {
            border-color: var(--accent-green);
            color: var(--accent-green);
            background: rgba(34, 197, 94, 0.1);
        }

        .tab-btn:hover {
            border-color: var(--accent-green);
            color: var(--accent-green);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }
