@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #e50914;
    --primary-color-rgb: 229, 9, 20;
    --background-dark: #07070a;
    --background-light: #121218;
    --text-color: #f3f3f4;
    --text-light: #b7bac1;
    --card-background: #17171f;
    --border-color: #2a2d36;
    --skeleton-color: #242633;
}

body.light-mode {
    --primary-color: #e50914;
    --background-dark: #f8f8f8;
    --background-light: #ffffff;
    --text-color: #333;
    --text-light: #666;
    --card-background: #e8e8e8;
    --border-color: #ddd;
    --skeleton-color: #e0e0e0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(1000px 600px at 20% -10%, rgba(229, 9, 20, 0.08), transparent 60%),
                radial-gradient(1200px 800px at 100% 0%, rgba(95, 51, 255, 0.07), transparent 55%),
                linear-gradient(to bottom right, var(--background-dark), var(--background-light));
    color: var(--text-color);
    margin: 0;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

main {
    flex: 1;
}

/* <CHANGE> Enhanced navbar with refined styling and better hover states */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(18, 18, 24, 0.95);
    -webkit-backdrop-filter: saturate(120%) blur(12px);
    backdrop-filter: saturate(120%) blur(12px);
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.navbar-brand {
    flex-shrink: 0;
}

.navbar-brand a {
    color: var(--primary-color);
    font-size: 1.9rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.2s ease;
}

.navbar-brand a:hover {
    color: #d40812;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    flex-wrap: wrap;
}

.navbar-nav li {
    margin: 0;
}

.navbar-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    position: relative;
    outline: none;
    white-space: nowrap;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav a:hover::after,
.navbar-nav a:focus::after {
    width: 100%;
}

.navbar-nav a:hover,
.navbar-nav a:focus {
    color: var(--primary-color);
}

.navbar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* <CHANGE> Enhanced theme toggle with smoother transitions */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    margin: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.theme-switch label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-switch input:checked + label {
    background-color: var(--primary-color);
}

.theme-switch input:checked + label:before {
    transform: translateX(24px);
}

/* <CHANGE> Refined navbar buttons with enhanced hover effects */
.notification-button,
.developer-message-button,
.refresh-images-button,
.cleanup-button {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-button:hover,
.developer-message-button:hover,
.refresh-images-button:hover,
.cleanup-button:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--text-color);
    transform: translateY(-2px);
}

.refresh-images-button .refresh-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.cleanup-button:hover {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

/* --- Hamburger Menu --- */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hamburger-menu:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active {
    display: flex;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    text-align: center;
}

.mobile-nav-links li {
    margin-bottom: 2rem;
}

.mobile-nav-links a {
    color: var(--text-color);
    font-size: 2.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-links a:hover {
    color: var(--primary-color);
}

/* <CHANGE> Enhanced hero section with refined gradient and better search styling */
.hero-section {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: linear-gradient(180deg, rgba(7, 7, 10, 0.5), rgba(7, 7, 10, 0.9)), url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center/cover;
    padding: 0 2rem;
}

.hero-content {
    max-width: 800px;
    width: 100%;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-content .search-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    border-radius: 28px;
    overflow: hidden;
    background-color: var(--card-background);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-content .search-container:focus-within {
    box-shadow: 0 16px 48px rgba(var(--primary-color-rgb), 0.3);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

#search-input {
    padding: 0.9rem 1.3rem;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#search-input::placeholder {
    color: var(--text-light);
}

#search-button {
    padding: 0.9rem 1.2rem;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 28px 28px 0;
    min-width: 60px;
}

#search-button:hover {
    background-color: #cc0712;
    transform: scale(1.04);
}

#search-button:active {
    transform: scale(0.98);
}

/* <CHANGE> Enhanced movie sections with better typography and spacing */
.movies-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.movies-section h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-color);
}

/* --- Modal Actions (Watchlist) --- */
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* <CHANGE> Enhanced watchlist toggle with better state styling */
.watchlist-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    background-color: var(--card-background);
    color: var(--text-color);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.watchlist-toggle[aria-pressed="true"],
.watchlist-toggle.active {
    background-color: #ffb703;
    border-color: #ffb703;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 183, 3, 0.3);
}

.watchlist-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.watchlist-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* --- News Section --- */
.news-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.news-section h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-color);
}

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

/* <CHANGE> Enhanced news cards with refined hover effects and shadows */
.news-card {
    background-color: var(--card-background);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
    border-color: rgba(var(--primary-color-rgb), 0.3);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover img {
    transform: scale(1.06);
}

.news-card-body {
    padding: 1rem;
}

.news-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-card-source {
    font-size: 0.9rem;
    color: var(--text-light);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    justify-content: center;
    max-width: 100%;
    align-items: stretch;
}

#continue-watching-grid,
#watchlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

/* <CHANGE> Enhanced movie cards with refined shadows, borders, and hover effects */
.movie-card {
    background-color: var(--card-background);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    min-height: 0;
    max-width: 100%;
    height: 100%;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    border-color: rgba(var(--primary-color-rgb), 0.3);
}

.movie-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.movie-card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 0;
    pointer-events: none;
}

.movie-card-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100%;
    pointer-events: none;
}

.movie-card:hover .movie-card-image-container img {
    transform: scale(1.05);
}

.image-loading {
    opacity: 0.7;
    filter: grayscale(20%);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.image-loaded {
    opacity: 1;
    filter: none;
}

.image-error {
    opacity: 0.5;
    filter: grayscale(50%);
}

.image-fallback {
    opacity: 1;
    filter: none;
}

.movie-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.8rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0,0,0,0.4) 60%, transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.movie-card-title {
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    text-align: center;
}

.movie-card .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    font-size: 3rem;
    color: white;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.movie-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.95);
}

.movie-card-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0,0,0,0.15) 40%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.movie-card:hover .movie-card-image-container::after {
    opacity: 1;
}

/* <CHANGE> Enhanced badges with refined styling */
.movie-badge,
.resume-badge {
    position: absolute;
    top: 8px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #fff;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.movie-badge {
    left: 8px;
}

.movie-badge:hover {
    background: rgba(0, 0, 0, 0.8);
}

.resume-badge {
    right: 8px;
    background: rgba(229, 9, 20, 0.95);
    border-color: rgba(229, 9, 20, 0.4);
}

/* --- Skeleton Loader --- */
.skeleton-card {
    background-color: var(--skeleton-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.skeleton-img {
    width: 100%;
    height: 0;
    padding-top: 150%;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(255, 255, 255, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-body {
    padding: 1rem;
}

.skeleton-title {
    width: 80%;
    height: 20px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(255, 255, 255, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin: 0 auto;
}

/* <CHANGE> Enhanced season & episode selector styling */
#season-episode-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

#season-episode-selector label {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
}

#season-episode-selector select {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background-color: var(--card-background);
    color: var(--text-color);
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#season-episode-selector select:hover {
    border-color: var(--primary-color);
}

#season-episode-selector select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
}










/* <CHANGE> Enhanced video modal with modern backdrop and smooth entrance */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.92) 100%);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* <CHANGE> Modal content with enhanced depth and modern styling */
.modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: linear-gradient(135deg, var(--background-light) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 0 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    animation: slideInModal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    max-height: 95vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* <CHANGE> Enhanced close button with better interaction states */
.close-button {
    position: absolute;
    top: 25px;
    right: 30px;
    color: var(--text-color);
    font-size: 2.2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.close-button:hover {
    color: var(--primary-color);
    transform: scale(1.1) rotate(90deg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(var(--primary-color-rgb), 0.3);
}

.close-button:active {
    transform: scale(0.95);
}

/* <CHANGE> Source buttons container with better organization */
.source-buttons {
    margin-bottom: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--card-background) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* <CHANGE> Enhanced source buttons with dynamic hover and active states */
.source-button {
    padding: 1rem 1.8rem;
    background: linear-gradient(135deg, var(--card-background), rgba(255, 255, 255, 0.05));
    color: var(--text-color);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 130px;
    text-align: center;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.source-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.source-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 32px;
}

.source-button:hover::before {
    left: 100%;
}

.source-button:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 
        0 12px 32px rgba(var(--primary-color-rgb), 0.4),
        0 0 20px rgba(var(--primary-color-rgb), 0.2);
}

.source-button:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.3);
}

.source-button.active {
    background: linear-gradient(135deg, var(--primary-color), rgba(var(--primary-color-rgb), 0.8));
    border-color: var(--primary-color);
    color: white;
    box-shadow: 
        0 12px 32px rgba(var(--primary-color-rgb), 0.5),
        0 0 30px rgba(var(--primary-color-rgb), 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.source-button.is-available {
    border-color: rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
}

.source-button.is-available:hover {
    border-color: #10b981;
    box-shadow: 
        0 12px 32px rgba(16, 185, 129, 0.4),
        0 0 20px rgba(16, 185, 129, 0.2);
    transform: translateY(-4px);
}

.source-button.is-unavailable {
    border-color: rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03));
    opacity: 0.6;
    cursor: not-allowed;
}

.source-button.is-unavailable:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
    transform: none;
}

/* <CHANGE> Enhanced video player with better aspect ratio handling */
.video-player-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    margin-bottom: 2.5rem;
    aspect-ratio: 16/9;
    min-height: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
}

/* <CHANGE> Enhanced play overlay with better visual feedback */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 5;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.play-overlay:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.9));
}

.play-overlay i {
    font-size: 4rem;
    color: white;
    opacity: 0.95;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.9), rgba(200, 0, 10, 0.95));
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 10px 35px rgba(229, 9, 20, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.play-overlay:hover i {
    opacity: 1;
    transform: scale(1.2);
    background: linear-gradient(135deg, rgba(229, 9, 20, 1), rgba(200, 0, 10, 1));
    box-shadow: 
        0 15px 45px rgba(229, 9, 20, 0.6),
        0 0 30px rgba(229, 9, 20, 0.4);
}

/* <CHANGE> Enhanced video details container with better layout */
.video-details-container {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--card-background) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* <CHANGE> Improved poster image styling */
#modal-movie-poster {
    width: 200px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

#modal-movie-poster:hover {
    transform: scale(1.02);
    box-shadow: 
        0 15px 45px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.video-details {
    flex: 1;
    min-width: 0;
}

/* <CHANGE> Enhanced heading with better typography */
.video-details h2 {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 1.2rem;
    color: var(--text-color);
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.video-details p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* <CHANGE> Enhanced availability status with better visual design */
#video-availability-status {
    background: linear-gradient(135deg, var(--card-background), rgba(255, 255, 255, 0.03));
    color: var(--text-color);
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

/* <CHANGE> Animation keyframes for smooth entrance effects */
@keyframes fadeInModal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* <CHANGE> Responsive design improvements */
@media (max-width: 768px) {
    .modal-content {
        padding: 25px;
        border-radius: 20px;
    }

    .close-button {
        width: 44px;
        height: 44px;
        top: 15px;
        right: 15px;
        font-size: 1.8rem;
    }

    .source-buttons {
        padding: 1.2rem;
        gap: 0.6rem;
    }

    .source-button {
        padding: 0.85rem 1.4rem;
        min-width: 110px;
        font-size: 0.85rem;
    }

    .video-details-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    #modal-movie-poster {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .video-details h2 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .video-player-container {
        min-height: 280px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 18px;
    }

    .video-details h2 {
        font-size: 1.5rem;
    }

    .video-details p {
        font-size: 0.95rem;
    }

    .play-overlay i {
        width: 70px;
        height: 70px;
        font-size: 3rem;
    }
}













/* <CHANGE> Enhanced keyframe animations with modern easing */
@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInModal {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* <CHANGE> Enhanced footer with better styling */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    background-color: rgba(18, 18, 24, 0.8);
    margin-top: 3rem;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    color: var(--text-light);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* <CHANGE> Enhanced load more button with refined hover effects */
.load-more-button {
    display: block;
    margin: 3rem auto 1rem auto;
    padding: 1.1rem 2.8rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 28px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 32px rgba(var(--primary-color-rgb), 0.4);
    position: relative;
    overflow: hidden;
}

.load-more-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.load-more-button:hover::before {
    left: 100%;
}

.load-more-button:hover {
    background-color: #cc0712;
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(var(--primary-color-rgb), 0.5);
}

.load-more-button:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(var(--primary-color-rgb), 0.4);
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .movies-section {
        padding: 3rem 1.5rem;
    }
   
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1rem;
        gap: 0.5rem;
    }
   
    .navbar-brand a {
        font-size: 1.6rem;
    }
   
    .navbar-nav {
        display: none;
    }
   
    .navbar-controls {
        gap: 0.5rem;
    }
   
    .notification-button,
    .developer-message-button,
    .refresh-images-button,
    .cleanup-button {
        font-size: 1rem;
        padding: 6px;
    }
   
    .refresh-images-button .refresh-text {
        display: none;
    }
   
    .hamburger-menu {
        display: block;
    }
   
    .hero-section {
        height: 50vh;
        min-height: 350px;
        padding: 0 1rem;
    }
   
    .hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }
   
    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
    }
   
    .hero-content .search-container {
        max-width: 100%;
        margin: 1rem 0;
    }
   
    .movies-section {
        padding: 2rem 1rem;
    }
   
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
   
    .movie-card-title {
        font-size: 1rem;
    }
   
    .modal-content {
        width: 95%;
        padding: 15px;
        margin: 10px;
    }
   
    .video-player-container {
        padding-bottom: 56.25%;
    }
   
    .source-buttons {
        gap: 0.5rem;
    }
   
    .source-button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
   
    .video-details-container {
        flex-direction: column;
        gap: 1rem;
    }
   
    #modal-movie-poster {
        width: 120px;
        margin: 0 auto;
    }
   
    .footer {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-wrap: wrap;
        justify-content: space-between;
    }
   
    .navbar-brand {
        order: 1;
        flex: 1;
        text-align: center;
    }
   
    .navbar-controls {
        order: 2;
        gap: 0.3rem;
    }
   
    .hamburger-menu {
        order: 3;
    }
   
    .hero-section {
        height: 45vh;
        min-height: 300px;
    }
   
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
   
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
   
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }
   
    .movie-card-title {
        font-size: 0.9rem;
    }
   
    .modal-content {
        width: 98%;
        padding: 10px;
        margin: 5px;
    }
   
    .source-buttons {
        flex-direction: column;
        align-items: center;
    }
   
    .source-button {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
   
    .video-details h2 {
        font-size: 1.4rem;
    }
   
    .video-details p {
        font-size: 0.9rem;
    }
   
    .load-more-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .navbar {
        padding: 0.8rem 0.5rem;
    }
   
    .navbar-brand a {
        font-size: 1.4rem;
    }
   
    .hero-section {
        height: 40vh;
        min-height: 250px;
    }
   
    .hero-title {
        font-size: 1.6rem;
    }
   
    .hero-subtitle {
        font-size: 0.9rem;
    }
   
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.6rem;
    }
   
    .movie-card-title {
        font-size: 0.8rem;
    }
}

/* --- Notification Button --- */
.notification-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
    transition: color 0.2s ease;
}

.notification-button:hover {
    color: var(--primary-color);
}

.developer-message-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
    transition: color 0.2s ease;
}

.developer-message-button:hover {
    color: var(--primary-color);
}

.refresh-images-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.refresh-images-button:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.refresh-images-button .fa-spin {
    animation: spin 1s linear infinite;
}

.refresh-images-button .refresh-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.cleanup-button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cleanup-button:hover {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Unresponsive state styling */
body.unresponsive {
    pointer-events: none;
    opacity: 0.7;
}

body.unresponsive::after {
    content: 'Site is unresponsive - performing cleanup...';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(229, 9, 20, 0.9);
    color: white;
    padding: 20px;
    border-radius: 8px;
    z-index: 10000;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.image-status-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* --- Notification Modal --- */
.notification-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-modal .modal-content {
    background-color: var(--background-light);
    margin: auto;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    width: 90%;
    max-width: 700px;
    position: relative;
    animation: slideInModal 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-modal .close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--text-color);
    font-size: 2.8rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-modal .close-button:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.notification-modal .notification-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.notification-modal .notification-subtitle {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.notification-modal p {
    margin-bottom: 10px;
    color: var(--text-light);
}

.notification-modal ul {
    list-style: disc inside;
    margin-bottom: 10px;
    padding-left: 20px;
}

.notification-modal li {
    margin-bottom: 5px;
    color: var(--text-light);
}

.notification-modal strong {
    color: var(--text-color);
}

/* --- Remove Button --- */
.remove-button {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    color: var(--background-color, #17171f);
    background-color: var(--text-color, #fff);
    border: 2px solid var(--text-color, #fff);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    line-height: 20px;
    text-align: center;
    font-size: 14px;
    padding: 0;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-card:hover .remove-button {
    opacity: 1;
    background-color: var(--error-color, #dc3545);
    color: #fff;
    border-color: var(--error-color, #dc3545);
    transform: scale(1.1);
}

.resume-badge {
    z-index: 5;
}

/* --- Actor Links --- */
.actor-link {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.actor-link:hover, 
.actor-link:focus {
    color: var(--secondary-color, #ffc107);
    text-decoration: underline;
}

.actor-list-container {
    display: inline;
}

/* --- Recommendations Section --- */
.recommendations-section {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.recommendations-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

#recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.recommendations-section .movie-card {
    width: 100%;
}

/* Responsive adjustments for movie cards */
@media (max-width: 1400px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }
   
    #continue-watching-grid,
    #watchlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }
   
    .movie-card {
        min-height: 300px;
    }
}

@media (max-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }
   
    #continue-watching-grid,
    #watchlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }
   
    .movie-card {
        min-height: 280px;
    }
}

@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
   
    #continue-watching-grid,
    #watchlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
   
    .movie-card {
        min-height: 260px;
    }
   
    .movie-card-title {
        font-size: 0.9rem;
    }
   
    .movie-card-body {
        padding: 0.5rem 0.7rem;
    }
}

@media (max-width: 480px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
   
    #continue-watching-grid,
    #watchlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
   
    .movie-card {
        min-height: 240px;
    }
   
    .movie-card-title {
        font-size: 0.85rem;
    }
   
    .movie-card-body {
        padding: 0.4rem 0.6rem;
    }
   
    .movie-card .play-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 360px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
   
    #continue-watching-grid,
    #watchlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
   
    .movie-card {
        min-height: 220px;
    }
   
    .movie-card-title {
        font-size: 0.8rem;
    }
}

/* --- Home Page Layout Improvements --- */
#continue-watching-section,
#watchlist-section {
    display: none;
}

body.home-page #continue-watching-section,
body.home-page #watchlist-section {
    display: block;
}
