/* Bust Movies Theme - Modern Edition */

:root {
    /* Modern color palette */
    --primary-blue: #4361ee;
    --primary-blue-light: #4895ef;
    --primary-blue-dark: #3f37c9;
    --accent-pink: #f72585;
    --accent-purple: #7209b7;
    --accent-teal: #4cc9f0;
    --accent-yellow: #f8c630;
    --success: #06d6a0;
    --danger: #ef476f;
    --warning: #ffd166;

    /* Text and background colors */
    --dark-text: #0b0c10;
    --light-text: #ffffff;
    --muted-text: #6c757d;
    --bg-light: #f8f9fa;
    --bg-dark: #121420;
    --card-bg: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    --gradient-accent: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    --gradient-cool: linear-gradient(135deg, var(--accent-teal), var(--primary-blue));

    /* Dark mode colors */
    --dark-mode-bg: #121420;
    --dark-mode-card-bg: #1b1f3b;
    --dark-mode-text: #e0e0e0;
    --dark-mode-border: #2e3267;
    --dark-mode-hover: #2a2d5a;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
}

/* Main background and text */
body {
    background-color: var(--bg-light);
    color: var(--dark-text);
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding-top: 70px;
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
}

/* Ensure all text elements have proper contrast */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-text);
}

p, span, div, li {
    color: inherit;
}

/* Ensure labels and form text are visible */
label, .form-label {
    color: var(--dark-text);
    font-weight: 500;
}

/* Card text styling */
.card {
    color: var(--dark-text);
}

.card-title, .card-text {
    color: var(--dark-text);
}

/* Alert text styling with better contrast */
.alert {
    color: var(--dark-text);
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Modern Premium Navbar styling */
.navbar {
    background: linear-gradient(135deg, rgba(26, 32, 44, 0.98) 0%, rgba(45, 55, 72, 0.98) 100%) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        rgba(67, 97, 238, 0.1) 0%,
        rgba(76, 201, 240, 0.1) 50%,
        rgba(67, 97, 238, 0.1) 100%);
    opacity: 0.5;
    z-index: -1;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    padding: 0;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--accent-teal) !important;
    transform: scale(1.02);
}

.navbar-brand img {
    height: 45px;
    margin-right: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    border-radius: 8px;
}

.navbar-brand:hover img {
    transform: scale(1.1) rotate(2deg);
    filter: drop-shadow(0 6px 12px rgba(67, 97, 238, 0.4));
}

.nav-link {
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    margin: 0 0.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

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

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.2) 0%, rgba(76, 201, 240, 0.2) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-teal) 100%);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    border-radius: 2px;
}

/* Premium indicator dots */
.latest-indicator, .year-indicator, .tv-indicator, .live-indicator, .mobile-app-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
    position: relative;
    top: -2px;
    animation: pulse 2s infinite;
}

.latest-indicator {
    background: linear-gradient(45deg, #ff4757, #ff6b7a);
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.6);
}

.year-indicator {
    background: linear-gradient(45deg, #2ed573, #7bed9f);
    box-shadow: 0 0 8px rgba(46, 213, 115, 0.6);
}

.tv-indicator {
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-teal));
    box-shadow: 0 0 8px rgba(67, 97, 238, 0.6);
}

.live-indicator {
    background: linear-gradient(45deg, #ff6b35, #ffa726);
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.6);
}

.mobile-app-indicator {
    background: linear-gradient(45deg, var(--accent-teal), var(--primary-blue-light));
    box-shadow: 0 0 8px rgba(76, 201, 240, 0.6);
}

/* Modern Buttons */
.btn {
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Smaller buttons for cards */
.card .btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
}

.btn-success {
    background-color: var(--success);
    border: none;
}

.btn-danger {
    background-color: var(--danger);
    border: none;
}

.btn-outline-primary {
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary.active {
    background-color: var(--primary-blue);
    color: white;
}

/* Ripple effect for buttons */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Modern Cards and movies */
.movie-card, .series-card {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    background-color: var(--card-bg);
}

.movie-card:hover, .series-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.movie-poster-container, .series-poster-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.movie-poster, .series-poster {
    height: 260px;
    object-fit: cover;
    transition: transform 0.5s ease;
    width: 100%;
}

.movie-card:hover .movie-poster, .series-card:hover .series-poster {
    transform: scale(1.05);
}

.movie-card .card-body, .series-card .card-body {
    padding: 0.75rem;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--dark-text);
}

.movie-card .card-title, .series-card .card-title {
    color: var(--dark-text);
}

.movie-card .card-text, .series-card .card-text {
    color: var(--muted-text);
}

.movie-card:hover .card-body, .series-card:hover .card-body {
    background-color: rgba(67, 97, 238, 0.03);
}

.movie-poster-container::after, .series-poster-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
                rgba(0,0,0,0) 50%,
                rgba(0,0,0,0.8) 100%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.movie-card:hover .movie-poster-container::after,
.series-card:hover .series-poster-container::after {
    opacity: 1;
}

/* Modern badges */
.rating-badge {
    background-color: var(--accent-yellow) !important;
    color: var(--dark-text) !important;
    font-weight: 700;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.movie-card:hover .rating-badge, .series-card:hover .rating-badge {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.new-badge {
    background-color: var(--accent-pink);
    color: white;
    font-weight: 700;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.movie-card:hover .new-badge, .series-card:hover .new-badge {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.year-badge {
    background-color: rgba(0,0,0,0.7);
    color: white;
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-full);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-weight: 600;
    transition: all 0.3s ease;
}

.quality-badges {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    gap: 6px;
    transition: all 0.3s ease;
}

.movie-card:hover .quality-badges, .series-card:hover .quality-badges {
    transform: translateY(-3px);
}

.quality-badge {
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    background-color: var(--primary-blue) !important;
    transition: all 0.2s ease;
}

.quality-badge:hover {
    transform: scale(1.1);
}

.card-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modern Filter styles */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    background-color: rgba(67, 97, 238, 0.08);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-blue);
    border: 1px solid rgba(67, 97, 238, 0.2);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.filter-pill:hover {
    background-color: rgba(67, 97, 238, 0.12);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-pill .close {
    margin-left: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    color: var(--primary-blue);
    opacity: 0.7;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.filter-pill .close:hover {
    opacity: 1;
    background-color: rgba(67, 97, 238, 0.15);
}

.filter-item.active {
    border-left: 3px solid var(--primary-blue);
    background-color: rgba(67, 97, 238, 0.08);
    font-weight: 700;
}

.filter-collapse {
    margin-bottom: 2rem;
}

.filter-collapse .card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.filter-collapse .card-body {
    padding: 1.5rem;
}

.filter-section {
    margin-bottom: 1rem;
}

.filter-section .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--muted-text);
}

.form-select, .form-control {
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    box-shadow: none;
    transition: all 0.2s ease;
    background-color: white;
    color: #333;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: white;
    color: #333;
}

/* Ensure placeholder text is visible */
.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Hero search specific styling */
.hero-search .form-control {
    background-color: white;
    color: #333;
    border: none;
    font-weight: 500;
}

.hero-search .form-control::placeholder {
    color: #6c757d;
    opacity: 0.8;
}

/* Premium Navbar search styling */
.navbar .form-control {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.navbar .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.3);
    color: #ffffff;
}

.navbar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.navbar .form-select {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.navbar .form-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.3);
    color: #ffffff;
}

.navbar .btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-teal) 100%);
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.navbar .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.4);
}

.navbar .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.navbar .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

/* Mobile search form styling */
.mobile-search-form .form-control,
.mobile-search-form .form-select {
    background-color: white !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Ensure Bootstrap doesn't override our form styling */
.form-control, .form-select {
    background-color: white !important;
    color: #333 !important;
}

.form-control:focus, .form-select:focus {
    background-color: white !important;
    color: #333 !important;
}

/* Ensure dropdown options are visible */
.form-select option {
    background-color: white;
    color: #333;
}

/* Fix any potential text-white overrides */
.text-white .form-control,
.text-white .form-select {
    color: #333 !important;
}

/* Section titles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* Empty results styling */
.empty-results {
    padding: 5rem 0;
    text-align: center;
    color: #333;
}

.empty-results i {
    font-size: 4rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.empty-results h2 {
    color: #333;
    font-weight: 700;
    margin-bottom: 1rem;
}

.empty-results p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Modern Pagination */
.pagination-container {
    margin: 2.5rem 0 1.5rem;
}

.pagination {
    gap: 0.5rem;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    color: var(--primary-blue);
    border: none;
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: rgba(67, 97, 238, 0.08);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.pagination .page-item.disabled .page-link {
    color: var(--muted-text);
    background-color: transparent;
}

/* Modern Movie detail page */
.movie-header, .series-header {
    position: relative;
    color: white;
    padding: 8rem 0 6rem;
    overflow: hidden;
}

.movie-header::before, .series-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
                rgba(0,0,0,0.2) 0%,
                rgba(0,0,0,0.65) 50%,
                rgba(0,0,0,0.85) 100%);
    z-index: 0;
}

.movie-header-content, .series-header-content {
    position: relative;
    z-index: 1;
}

.movie-poster, .series-poster {
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    transform: perspective(800px) rotateY(0deg);
    backface-visibility: hidden;
}

.movie-poster:hover, .series-poster:hover {
    transform: perspective(800px) rotateY(5deg) translateY(-10px);
    box-shadow: var(--shadow-lg), 0 15px 35px rgba(0, 0, 0, 0.5);
}

.movie-details, .series-details {
    padding-left: 2rem;
}

.movie-title, .series-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.movie-meta, .series-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.movie-meta-item, .series-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.movie-description, .series-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.movie-actions, .series-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.movie-meta-list, .series-meta-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.movie-meta-list li, .series-meta-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
}

.movie-meta-list li:last-child, .series-meta-list li:last-child {
    border-bottom: none;
}

.movie-meta-label, .series-meta-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* Modern Footer */
footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

footer h5 {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-cool);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

footer p {
    opacity: 0.8;
    line-height: 1.7;
}

footer a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: all 0.2s ease;
}

footer a:hover {
    color: var(--accent-teal);
    text-decoration: underline;
}

/* Modern Loading spinner */
.loading-spinner {
    border: 3px solid rgba(67, 97, 238, 0.1);
    border-top: 3px solid var(--primary-blue);
    border-right: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin: 15px auto;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern Page transition animations */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Modern Skeleton loading for content */
.skeleton-text {
    height: 1em;
    background: linear-gradient(90deg,
                rgba(67, 97, 238, 0.05) 8%,
                rgba(67, 97, 238, 0.1) 18%,
                rgba(67, 97, 238, 0.05) 33%);
    background-size: 800px 104px;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: var(--radius-md);
    margin-bottom: 0.75em;
}

.skeleton-text.skeleton-title {
    width: 70%;
    height: 1.5em;
}

.skeleton-text.skeleton-subtitle {
    width: 50%;
}

@keyframes skeleton-loading {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* Modern Pulse animation for interactive elements */
.pulse-on-hover {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pulse-on-hover:hover {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Mobile-specific styles */
.touch-device .movie-card:hover,
.touch-device .series-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.touch-device .movie-card.touch-active,
.touch-device .series-card.touch-active {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.touch-device .movie-card.touch-active .movie-poster,
.touch-device .series-card.touch-active .series-poster {
    transform: scale(1.05);
}

.touch-device .movie-card.touch-active .card-body,
.touch-device .series-card.touch-active .card-body {
    background-color: rgba(67, 97, 238, 0.03);
}

.touch-device .movie-card.touch-active .movie-poster-container::after,
.touch-device .series-card.touch-active .series-poster-container::after {
    opacity: 1;
}

.touch-device .movie-card.touch-active .rating-badge,
.touch-device .series-card.touch-active .rating-badge,
.touch-device .movie-card.touch-active .new-badge,
.touch-device .series-card.touch-active .new-badge {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.touch-device .movie-card.touch-active .quality-badges,
.touch-device .series-card.touch-active .quality-badges {
    transform: translateY(-3px);
}

/* Footer mobile styles */
.footer-toggle {
    color: var(--accent-teal);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(76, 201, 240, 0.1);
    border: none;
}

.footer-toggle:hover, .footer-toggle:focus {
    background-color: rgba(76, 201, 240, 0.2);
    color: var(--accent-teal);
}

.footer-section {
    margin-bottom: 1rem;
}

/* Mobile search button */
.mobile-search-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.mobile-search-toggle:active {
    transform: scale(0.95);
}

/* Modern Responsive tweaks */
@media (max-width: 992px) {
    .movie-header, .series-header {
        padding: 6rem 0 4rem;
    }

    .movie-details, .series-details {
        padding-left: 0;
        margin-top: 2rem;
    }

    .movie-title, .series-title {
        font-size: 2rem;
    }

    /* Adjust card sizes for tablets */
    .movie-card, .series-card {
        margin-bottom: 1rem;
    }

    .movie-poster, .series-poster {
        height: 280px;
    }

    /* Adjust footer spacing */
    footer {
        margin-top: 3rem;
        padding: 2rem 0 1.5rem;
    }

    /* Adjust card carousel for tablets */
    .card-carousel-item {
        width: 160px;
    }

    /* Better card body padding for tablets */
    .movie-card .card-body, .series-card .card-body {
        padding: 1rem;
    }

    /* Improve button sizes for touch */
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-brand img {
        height: 32px;
    }

    .movie-header, .series-header {
        padding: 4rem 0 3rem;
    }

    .filter-pills {
        gap: 0.5rem;
    }

    .filter-pill {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Better card sizes for small tablets */
    .movie-poster, .series-poster {
        height: 240px;
    }

    /* Adjust navigation */
    .nav-text {
        font-size: 0.9rem;
    }

    /* Adjust filter section */
    .filter-section {
        padding: 1rem;
    }

    /* Adjust player controls */
    .player-controls {
        padding: 0.75rem;
    }

    /* Adjust card carousel for small tablets */
    .card-carousel-item {
        width: 140px;
    }

    /* Adjust floating action button */
    .floating-action-btn {
        width: 48px;
        height: 48px;
        right: 1.5rem;
        bottom: 1.5rem;
    }

    /* Better card body spacing */
    .movie-card .card-body, .series-card .card-body {
        padding: 0.75rem;
    }

    /* Improve touch targets */
    .btn {
        min-height: 44px;
        padding: 0.6rem 1rem;
    }

    /* Better hero section for tablets */
    .hero-section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    /* Improve section spacing */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 60px;
    }

    /* Adjust content spacing */
    .content-wrapper {
        padding-bottom: 2rem;
    }

    /* Adjust movie details page */
    .movie-poster, .series-poster {
        max-width: 200px;
        margin: 0 auto;
        display: block;
        height: auto;
    }

    .movie-title, .series-title {
        font-size: 1.75rem;
        text-align: center;
        margin-top: 1rem;
        line-height: 1.2;
    }

    .movie-meta, .series-meta {
        justify-content: center;
        font-size: 0.95rem;
        gap: 1.5rem;
    }

    .movie-actions, .series-actions {
        justify-content: center;
        gap: 0.75rem;
    }

    .movie-description, .series-description {
        font-size: 1.05rem;
        text-align: center;
        line-height: 1.6;
    }

    /* Better mobile card grid - single column for very small screens */
    .row-cols-1 > * {
        flex: 0 0 auto;
        width: 100%;
    }

    /* Better card sizing for mobile */
    .movie-card .card-body, .series-card .card-body {
        padding: 0.75rem;
    }

    .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .movie-poster, .series-poster {
        height: 220px;
    }

    .rating-badge, .new-badge {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .year-badge {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .quality-badge {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }

    /* Better mobile navigation */
    .navbar {
        padding: 0.75rem 0;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Improve mobile search */
    .mobile-search-form {
        padding: 1rem;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .mobile-search-form .form-control {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .mobile-search-form .btn {
        padding: 0.75rem 1rem;
    }

    /* Better hero section for mobile */
    .hero-section {
        padding: 2.5rem 0;
        margin-bottom: 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Adjust filter section */
    .filter-section {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .filter-collapse .card-body {
        padding: 1rem;
    }

    /* Better pagination for mobile */
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Adjust card carousel for mobile */
    .card-carousel-item {
        width: 140px;
    }

    .card-carousel-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    /* Adjust floating action button */
    .floating-action-btn {
        width: 48px;
        height: 48px;
        right: 1rem;
        bottom: 1rem;
    }

    .floating-action-btn i {
        font-size: 1.25rem;
    }

    /* Better footer for mobile */
    footer {
        padding: 2rem 0 1rem;
        margin-top: 2rem;
    }

    footer h5 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    /* Improve form elements */
    .form-control, .form-select {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px;
    }

    /* Better button sizing */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        min-height: 38px;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    /* Single column layout for very small screens */
    .row-cols-1 > * {
        width: 100%;
    }

    /* Better poster sizing */
    .movie-poster, .series-poster {
        height: 240px;
    }

    /* Improve typography for small screens */
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .card-title {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Better spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Adjust player */
    .player-loading, .player-error {
        width: 90%;
    }

    /* Better button sizing for small screens */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Improve navigation for small screens */
    .navbar-brand {
        font-size: 1rem;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* Premium animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar {
    animation: slideInFromTop 0.6s ease-out;
}

/* We're using light theme only, so dark mode styles are removed */

/* Smooth transitions for UI elements */
body, .card, .form-control, .navbar, .modal-content, .table, .btn, .pagination .page-link {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modern Custom player styling */
.video-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    background-color: #000;
    margin-bottom: 2rem;
}

.player-wrapper {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .player-controls {
    opacity: 1;
}

.server-selector {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.server-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    min-width: 140px;
}

.server-btn:hover {
    background-color: rgba(67, 97, 238, 0.2);
    transform: translateY(-2px);
}

.server-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.server-btn.error {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.server-button-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.server-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.ad-level-indicator {
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.ad-level-low {
    color: #28a745;
}

.ad-level-medium {
    color: #ffc107;
}

.ad-level-high {
    color: #dc3545;
}

.server-status-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.server-status-indicator.working {
    background-color: #28a745;
}

.server-status-indicator.failing {
    background-color: #dc3545;
}

.server-status-indicator.unknown {
    background-color: #6c757d;
}

/* Modern Card Carousel */
.card-carousel {
    position: relative;
    padding: 1rem 0;
}

.card-carousel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-carousel-title .see-all {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.card-carousel-title .see-all:hover {
    transform: translateX(3px);
}

.card-carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    gap: 1rem;
    padding: 0.5rem 0;
    margin: 0 -0.5rem;
    padding: 0.5rem;
}

.card-carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.card-carousel-item {
    flex: 0 0 auto;
    width: 180px;
    transition: all 0.3s ease;
}

.card-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.card-carousel-nav:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.card-carousel-nav.prev {
    left: -15px;
}

.card-carousel-nav.next {
    right: -15px;
}

/* Card carousel navigation styling */

/* Modern Floating Action Button */
.floating-action-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-action-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
}

.floating-action-btn i {
    font-size: 1.5rem;
}

/* Modern Toast Notifications */
.toast {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: none;
    overflow: hidden;
}

.toast-body {
    padding: 1rem;
    font-weight: 500;
}

.toast-container {
    padding: 1rem;
    z-index: 1060;
}

/* Modern Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
    color: white;
    overflow: hidden;
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
}

/* Additional glass card styling */

/* Mobile Typography Improvements */
@media (max-width: 768px) {
    /* Better base typography for mobile */
    body {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Improve heading hierarchy */
    h1 {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.875rem;
    }

    h3 {
        font-size: 1.25rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    h4 {
        font-size: 1.1rem;
        line-height: 1.4;
        margin-bottom: 0.625rem;
    }

    h5 {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    /* Better paragraph spacing */
    p {
        margin-bottom: 1rem;
        line-height: 1.6;
    }

    /* Improve card text readability */
    .card-text {
        font-size: 0.9rem;
        line-height: 1.5;
        color: var(--muted-text);
    }

    /* Better list spacing */
    ul, ol {
        margin-bottom: 1rem;
    }

    li {
        margin-bottom: 0.25rem;
        line-height: 1.5;
    }

    /* Improve link readability */
    a {
        text-decoration: none;
        transition: all 0.2s ease;
    }

    a:hover {
        text-decoration: underline;
    }
}

/* Mobile-specific text improvements */
@media (max-width: 576px) {
    /* Optimize for mobile reading */
    body {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* Better mobile headings */
    h1 {
        font-size: 1.6rem;
        line-height: 1.25;
    }

    h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.2rem;
        line-height: 1.35;
    }

    /* Improve mobile paragraph readability */
    p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.25rem;
    }

    /* Better mobile card text */
    .card-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Improve mobile button text */
    .btn {
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: 0.025em;
    }

    /* Better mobile form labels */
    .form-label {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    /* Improve mobile navigation text */
    .nav-link {
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: 0.025em;
    }

    /* Fix oversized elements on mobile */
    .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
    }

    /* Fix large icons */
    i[style*="font-size: 2rem"], i[style*="font-size: 3rem"], i[style*="font-size: 4rem"] {
        font-size: 1.5rem !important;
    }

    /* Fix large badges and labels */
    .badge {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.6rem !important;
    }

    /* Fix large section titles */
    .section-title, .page-title {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }

    /* Fix large movie/series titles */
    .movie-title, .series-title {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
    }

    /* Fix large hero titles */
    .hero-title, .jumbotron h1 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }

    /* Fix large subtitles */
    .hero-subtitle, .lead {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
}

/* Mobile UI Component Improvements */
@media (max-width: 768px) {
    /* Better mobile buttons */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: var(--radius-md);
        transition: all 0.2s ease;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .btn-sm {
        min-height: 38px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        min-height: 52px;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    /* Better mobile forms */
    .form-control, .form-select {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: var(--radius-md);
        border: 2px solid rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        touch-action: manipulation;
    }

    .form-control:focus, .form-select:focus {
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
        outline: none;
    }

    /* Better mobile input groups */
    .input-group .form-control,
    .input-group .form-select {
        border-radius: 0;
    }

    .input-group .form-control:first-child,
    .input-group .form-select:first-child {
        border-top-left-radius: var(--radius-md);
        border-bottom-left-radius: var(--radius-md);
    }

    .input-group .btn:last-child {
        border-top-right-radius: var(--radius-md);
        border-bottom-right-radius: var(--radius-md);
    }

    /* Better mobile cards */
    .card {
        border-radius: var(--radius-lg);
        border: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        touch-action: manipulation;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .card-footer {
        padding: 0.75rem 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
}

@media (max-width: 576px) {
    /* Optimize buttons for small mobile screens */
    .btn {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        width: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    /* Full-width buttons where appropriate */
    .btn-block, .d-grid .btn {
        width: 100%;
    }

    /* Better mobile form controls */
    .form-control, .form-select {
        min-height: 48px;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border-radius: var(--radius-lg);
    }

    /* Better mobile checkboxes and radios */
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-top: 0.125rem;
    }

    .form-check-label {
        font-size: 1rem;
        line-height: 1.5;
        padding-left: 0.5rem;
    }

    /* Better mobile switches */
    .form-switch .form-check-input {
        width: 2.5rem;
        height: 1.25rem;
    }

    /* Improve mobile card interactions */
    .movie-card, .series-card {
        border-radius: var(--radius-lg);
        transition: all 0.3s ease;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .movie-card:active, .series-card:active {
        transform: scale(0.98);
    }

    /* Better mobile badges */
    .badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        font-weight: 600;
        border-radius: var(--radius-full);
    }

    /* Improve mobile alerts */
    .alert {
        padding: 1rem;
        border-radius: var(--radius-lg);
        border: none;
        font-size: 0.95rem;
        line-height: 1.5;
    }

    /* Better mobile modals */
    .modal-dialog {
        margin: 1rem;
    }

    .modal-content {
        border-radius: var(--radius-lg);
        border: none;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }

    .modal-header, .modal-footer {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* Mobile-First Responsive Improvements */

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Container improvements */
    .container, .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Better spacing system */
    .mb-1 { margin-bottom: 0.5rem !important; }
    .mb-2 { margin-bottom: 0.75rem !important; }
    .mb-3 { margin-bottom: 1rem !important; }
    .mb-4 { margin-bottom: 1.5rem !important; }
    .mb-5 { margin-bottom: 2rem !important; }

    .mt-1 { margin-top: 0.5rem !important; }
    .mt-2 { margin-top: 0.75rem !important; }
    .mt-3 { margin-top: 1rem !important; }
    .mt-4 { margin-top: 1.5rem !important; }
    .mt-5 { margin-top: 2rem !important; }

    /* Better padding system */
    .p-1 { padding: 0.5rem !important; }
    .p-2 { padding: 0.75rem !important; }
    .p-3 { padding: 1rem !important; }
    .p-4 { padding: 1.5rem !important; }
    .p-5 { padding: 2rem !important; }

    /* Improve mobile grid gaps */
    .g-1 { gap: 0.5rem !important; }
    .g-2 { gap: 0.75rem !important; }
    .g-3 { gap: 1rem !important; }
    .g-4 { gap: 1.5rem !important; }
    .g-5 { gap: 2rem !important; }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Better card grid for landscape phones */
    .row-cols-sm-2 > * {
        flex: 0 0 auto;
        width: 50%;
    }

    /* Improve poster sizing */
    .movie-poster, .series-poster {
        height: 260px;
    }

    /* Better navigation spacing */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Better tablet layout */
    .row-cols-md-3 > * {
        flex: 0 0 auto;
        width: 33.333333%;
    }

    /* Improve poster sizing for tablets */
    .movie-poster, .series-poster {
        height: 280px;
    }

    /* Better tablet navigation */
    .navbar-nav .nav-link {
        padding: 0.75rem 1.25rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Better desktop layout */
    .row-cols-lg-4 > * {
        flex: 0 0 auto;
        width: 25%;
    }

    /* Standard poster sizing */
    .movie-poster, .series-poster {
        height: 300px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Optimal desktop layout */
    .row-cols-xl-5 > * {
        flex: 0 0 auto;
        width: 20%;
    }

    /* Larger posters for big screens */
    .movie-poster, .series-poster {
        height: 320px;
    }

    /* Better spacing for large screens */
    .container {
        max-width: 1200px;
    }
}

/* Mobile-specific performance improvements */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .movie-card:hover, .series-card:hover {
        transform: none;
    }

    /* Use touch-friendly hover states */
    .movie-card:active, .series-card:active {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

    /* Optimize images for mobile */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    /* Better scroll behavior */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Improve touch scrolling */
    .card-carousel-container {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .card-carousel-item {
        scroll-snap-align: start;
    }
}