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

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

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Enhanced Notification System */
.notifications-container {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.notification {
    background: linear-gradient(135deg, #ff6b35 0%, #ee5a24 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(238, 90, 36, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    pointer-events: all;
    transform: translateX(-100%);
    opacity: 0;
    animation: slideIn 0.4s ease forwards, glow 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

.notification.success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.notification.error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.notification.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.notification.info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    box-shadow: 0 10px 30px rgba(33, 150, 243, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.notification-message {
    font-size: 0.95rem;
    opacity: 0.95;
    line-height: 1.4;
}

.notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.notification.removing {
    animation: slideOut 0.4s ease forwards;
}

/* Animation Keyframes */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(238, 90, 36, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 10px 40px rgba(238, 90, 36, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

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

/* Mobile Responsive Notifications */
@media (max-width: 768px) {
    .notifications-container {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .notification {
        padding: 1rem;
        margin-bottom: 0.5rem;
        max-width: none;
    }

    .notification-title {
        font-size: 1rem;
    }

    .notification-message {
        font-size: 0.9rem;
    }

    .notification-icon {
        font-size: 1.2rem;
    }
}

/* Success Notification Specific Animation */
.notification.success {
    animation: slideIn 0.4s ease forwards, successGlow 2s ease-in-out infinite;
}

@keyframes successGlow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 10px 40px rgba(76, 175, 80, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2);
    }
}

/* Improved Mobile Experience */
html {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* Mobile Viewport Scaling */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* Prevent browser zoom and improve mobile input */
input, select, textarea {
    font-size: 16px !important;
    -webkit-appearance: none;
    appearance: none;
}

/* Prevent double-tap zoom and improve touch */
a, button, .btn, .movie-card, .episode-item {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* Enhanced Responsive Design - Unified Approach */

/* Base Mobile Styles (480px and below) */
@media (max-width: 480px) {
    /* Viewport and Base Setup */
    html {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        font-size: 16px; /* Prevent zoom on input focus */
    }

    body {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-size: 16px;
        line-height: 1.5;
    }

    * {
        box-sizing: border-box;
    }

    /* Header - Optimized for Small Screens */
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100vw;
        max-width: 100vw;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }

    .header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem;
        gap: 0.5rem;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        flex-wrap: nowrap;
    }

    .logo-container {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
        order: 1;
    }

    .logo-circle {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .site-name {
        font-size: 1.1rem;
        font-weight: 700;
        white-space: nowrap;
        color: #fff;
    }

    /* Search - Compact and Functional */
    .search-bar {
        flex: 1;
        max-width: 180px;
        margin: 0 0.5rem;
        order: 2;
    }

    .search-bar form {
        display: flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        padding: 0.3rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .search-bar input {
        flex: 1;
        padding: 0.5rem 0.8rem;
        border: none;
        background: transparent;
        color: #fff;
        font-size: 0.85rem;
        border-radius: 15px;
    }

    .search-btn {
        background: #ee5a24;
        border: none;
        color: white;
        padding: 0.4rem;
        border-radius: 50%;
        cursor: pointer;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
    }

    /* Navigation Actions */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        order: 3;
        flex-shrink: 0;
    }

    .profile-pic {
        width: 30px;
        height: 30px;
    }

    /* Hamburger Menu */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 25px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .hamburger-menu span {
        width: 18px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        margin: 1px 0;
        transition: all 0.3s ease;
    }

    /* Main Content Area */
    .main-content {
        margin-top: 70px;
        padding: 1rem 0.5rem;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* Movie Grid - Optimized for Small Screens */
    .movies-grid,
    .series-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        padding: 0 0.25rem;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        justify-items: center;
    }

    .movie-card {
        width: 100%;
        max-width: 160px;
        aspect-ratio: 2/3;
        border-radius: 10px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.05);
        transition: all 0.3s ease;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .movie-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
    }

    .movie-card img {
        width: 100%;
        height: 75%;
        object-fit: cover;
        object-position: center;
    }

    .movie-info {
        padding: 0.6rem;
        background: rgba(26, 26, 46, 0.9);
        height: 25%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .movie-info h3 {
        font-size: 0.75rem;
        line-height: 1.1;
        margin: 0;
        color: #fff;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-weight: 600;
        text-align: center;
    }

    .movie-info p {
        font-size: 0.65rem;
        color: rgba(255, 255, 255, 0.7);
        margin: 0.2rem 0 0 0;
        text-align: center;
    }

    /* Sections */
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    /* Forms - Enhanced Mobile Experience */
    .form-input {
        width: 100%;
        padding: 1rem;
        border: 2px solid rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        font-size: 16px !important; /* Prevent iOS zoom */
        transition: all 0.3s ease;
        box-sizing: border-box;
        letter-spacing: normal !important;
        font-family: 'Cairo', sans-serif !important;
        line-height: 1.4 !important;
    }

    .auth-container {
        width: 95%;
        max-width: 350px;
        margin: 2rem auto;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    /* Buttons - Touch Optimized */
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 25px;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        border: none;
        box-sizing: border-box;
    }

    /* Watch Page */
    .watch-container {
        padding: 0.5rem;
        max-width: 100vw;
        margin: 0 auto;
    }

    .video-container iframe {
        width: 100%;
        height: 180px;
        border-radius: 12px;
        aspect-ratio: 16/9;
    }

    /* Comments and Ratings */
    .comments-section,
    .ratings-section {
        padding: 1rem;
        margin-top: 1rem;
    }

    /* Mobile Navigation Menu */
    .mobile-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        padding: 1.5rem 1rem;
        box-sizing: border-box;
    }

    .mobile-nav.active {
        right: 0;
    }

    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hide desktop elements on mobile */
    .header-actions .btn:not(.profile-pic):not(.hamburger-menu) {
        display: none !important;
    }
}

/* Large Mobile and Small Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .header-container {
        padding: 1rem;
        gap: 1rem;
    }

    .logo-circle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .site-name {
        font-size: 1.3rem;
    }

    .search-bar {
        max-width: 250px;
    }

    .search-bar input {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 0 1rem;
    }

    .movie-card {
        max-width: 180px;
    }

    .movie-info h3 {
        font-size: 0.8rem;
    }

    .movie-info p {
        font-size: 0.7rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

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

    .video-container iframe {
        height: 220px;
    }
}

/* Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 1rem 2rem;
    }

    .logo-circle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .site-name {
        font-size: 1.5rem;
    }

    .search-bar {
        max-width: 350px;
    }

    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        padding: 0 2rem;
    }

    .movie-card {
        max-width: 200px;
    }

    .movie-card img {
        height: 70%;
    }

    .movie-info {
        height: 30%;
        padding: 0.8rem;
    }

    .movie-info h3 {
        font-size: 0.9rem;
    }

    .movie-info p {
        font-size: 0.8rem;
    }

    .main-content {
        padding: 2rem;
    }

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

    .video-container iframe {
        height: 280px;
    }

    /* Show more desktop elements */
    .hamburger-menu {
        display: none !important;
    }

    .header-actions .btn:not(.profile-pic) {
        display: inline-flex !important;
    }
}

/* Desktop and Large Screens (1025px and above) */
@media (min-width: 1025px) {
    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
        padding: 0;
    }

    .movie-card {
        max-width: none;
        width: 100%;
    }

    .movie-card img {
        height: 350px;
    }

    .movie-info {
        height: auto;
        padding: 1rem;
    }

    .movie-info h3 {
        font-size: 1.1rem;
        line-height: 1.3;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .movie-info p {
        font-size: 0.9rem;
        text-align: left;
    }

    /* Hide mobile elements on desktop */
    .mobile-nav,
    .mobile-nav-overlay {
        display: none !important;
    }

    .hamburger-menu {
        display: none !important;
    }
}

/* Ultra-wide Screens (1440px and above) */
@media (min-width: 1440px) {
    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2.5rem;
    }

    .movie-card img {
        height: 400px;
    }

    .main-content {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Additional Responsive Enhancements */

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .header-container {
        padding: 0.5rem 1rem;
    }

    .main-content {
        margin-top: 60px;
    }

    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }

    .movie-card {
        max-width: 140px;
    }
}

/* Medium Size Tablets (iPad mini, etc.) */
@media (min-width: 768px) and (max-width: 810px) {
    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }
}

/* Small Screens Optimization */
@media (max-width: 320px) {
    .site-name {
        font-size: 1rem;
    }

    .search-bar {
        max-width: 120px;
    }

    .search-bar input {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .movie-card {
        max-width: 140px;
    }

    .movie-info h3 {
        font-size: 0.7rem;
    }

    .movie-info p {
        font-size: 0.6rem;
    }
}

/* Large Phones (Phablets) */
@media (min-width: 411px) and (max-width: 480px) {
    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.9rem;
    }

    .movie-card {
        max-width: 170px;
    }
}

/* iPhone X and Similar (Notch phones) */
@media (min-width: 375px) and (max-width: 410px) {
    .header {
        padding-top: env(safe-area-inset-top, 0);
    }

    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Foldable Phones Support */
@media (min-width: 280px) and (max-width: 360px) {
    .header-container {
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .logo-circle {
        width: 30px !important;
        height: 30px !important;
        font-size: 1rem !important;
    }

    .site-name {
        font-size: 0.9rem;
    }

    .search-bar {
        max-width: 100px;
    }

    .movies-grid,
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0 0.25rem;
    }

    .movie-card {
        max-width: 130px;
    }
}

/* Pixel Density Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-circle img,
    .movie-card img,
    .profile-pic {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Enhancement for OLED Screens */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(10, 10, 20, 0.99) !important;
    }

    .mobile-nav {
        background: rgba(10, 10, 20, 0.98) !important;
    }

    body {
        background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%) !important;
    }
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    .movie-card,
    .btn,
    .profile-pic,
    .hamburger-menu span {
        transition: none !important;
        animation: none !important;
    }

    .movie-card:hover {
        transform: none !important;
    }
}

/* Enhanced Touch Targets for Mobile */
@media (pointer: coarse) {
    .btn {
        min-height: 48px;
        min-width: 48px;
        padding: 12px 24px;
    }

    .profile-pic {
        width: 44px;
        height: 44px;
    }

    .movie-card {
        margin: 4px;
    }

    .search-bar input {
        min-height: 44px;
        padding: 10px 15px;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
    .logo-circle img,
    .profile-pic {
        image-rendering: -webkit-optimize-contrast;
        filter: contrast(1.1) brightness(1.05);
    }
}

/* Battery Saving Mode Optimizations */
@media (prefers-reduced-data) {
    .movie-card img {
        content-visibility: auto;
    }

    * {
        background-attachment: scroll !important;
    }
}

/* Header Styles */
.header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
    transition: transform 0.3s ease;
}

.logo-circle:hover {
    transform: scale(1.1) rotate(5deg);
}

.site-name {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-bar form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.search-bar form:focus-within {
    border-color: #ee5a24;
    background: rgba(255, 255, 255, 0.1);
}

.search-bar input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.search-btn:hover {
    color: #ee5a24;
    background: rgba(238, 90, 36, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}


.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(238, 90, 36, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 2px solid #ee5a24;
}

.profile-pic:hover {
    transform: scale(1.1);
}

/* Profile Dropdown */
.profile-container {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.dropdown-header .username {
    display: block;
    font-weight: 700;
    color: #ee5a24;
    font-size: 1.1rem;
}

.dropdown-header .email {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.dropdown-item:hover {
    background: rgba(238, 90, 36, 0.2);
    color: #fff;
}

.dropdown-item.logout {
    color: #ff6b6b;
}

.dropdown-item.logout:hover {
    background: rgba(255, 107, 107, 0.2);
}

.dropdown-item .icon {
    font-size: 1.2rem;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Desktop Only Styles (769px and above) */
@media (min-width: 769px) {
    .header-actions .hamburger-menu {
        display: none !important;
    }

    .header-actions .btn:not(.profile-pic) {
        display: inline-flex !important;
    }

    .mobile-nav,
    .mobile-nav-overlay {
        display: none !important;
    }
}

.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(238, 90, 36, 0.1) 0%, rgba(255, 107, 107, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Movies Grid */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #ee5a24 0%, transparent 100%);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.movie-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(238, 90, 36, 0.3);
}

.movie-cover {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: center;
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
    aspect-ratio: 2/3;
}

.movie-info {
    padding: 1.5rem;
}

.movie-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.release-year {
    color: #aaa;
    font-weight: 500;
}

.duration {
    color: #888;
    font-weight: 500;
    font-size: 0.75rem;
}

.episode-count {
    color: #ee5a24;
    font-weight: 600;
    background: rgba(238, 90, 36, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.star {
    color: #ffd700;
    font-size: 1.2rem;
}

.rating-value {
    font-weight: 600;
}


.movie-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(238, 90, 36, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-overlay::after {
    content: '▶';
    color: #fff;
    font-size: 1.5rem;
    margin-left: 3px;
}

.movie-card:hover .play-overlay {
    opacity: 1;
}

.watch-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: #ee5a24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(238, 90, 36, 0.5);
}

.watch-button:hover {
    background: #ff6b35;
    transform: scale(1.1);
}

.watch-button::after {
    content: '▶';
    color: #fff;
    font-size: 1rem;
    margin-left: 2px;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-consent.hidden {
    display: none;
}

.cookie-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

/* Login/Register Forms */
.auth-container {
    max-width: 450px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Input Styles */
.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.form-input:focus {
    border-color: #ee5a24;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(238, 90, 36, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Auth Form Styles */
.auth-form {
    width: 100%;
}

.auth-form .form-input {
    text-align: center;
    font-weight: bold;
    letter-spacing: 0.3em;
    font-size: 1.5rem;
}

.auth-form .form-input:focus {
    letter-spacing: 0.5em;
}

/* 2FA Code Input Special Styling */
input[name="verification_code"] {
    font-family: 'Courier New', monospace !important;
    letter-spacing: 0.5em !important;
    text-align: center !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
}

/* Security Buttons */
.btn-security-success {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-security-success:hover {
    background: linear-gradient(135deg, #45a049, #388e3c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn-security-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-security-danger:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

/* Inline Form */
.inline-form {
    display: inline-block;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    color: #4caf50;
}

.alert-danger {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    color: #ff9800;
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid #2196f3;
    color: #2196f3;
}

.auth-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ee5a24;
    background: rgba(255, 255, 255, 0.1);
}

.btn-full {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.auth-links a {
    color: #ee5a24;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Admin Panel */
.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.admin-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.admin-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ee5a24;
    margin-bottom: 1rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #ee5a24;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ee5a24;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

.admin-table {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table th {
    background: rgba(238, 90, 36, 0.2);
    font-weight: 700;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Footer */
.footer {
    background: rgba(26, 26, 46, 0.95);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: right;
}

.footer-section h4 {
    color: #ee5a24;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #ee5a24;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    overflow: hidden;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-links a img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.social-links a span {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.8);
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.social-links a:hover img {
    transform: scale(1.1);
}

.social-links a:hover span {
    color: #fff;
}
    transform: translateY(-3px);
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        position: relative;
        padding: 0.5rem 0;
    }

    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
        justify-content: space-between;
        align-items: center;
    }

    .logo-container {
        order: 1;
        flex-shrink: 0;
    }

    .site-name {
        font-size: 1.3rem;
    }

    .search-bar {
        order: 3;
        width: 100%;
        margin: 0.5rem 0;
        flex-basis: 100%;
    }

    .header-actions {
        order: 2;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .profile-pic {
        width: 35px;
        height: 35px;
    }

    .main-content {
        margin-top: 80px;
        padding: 1rem;
    }

    .hero-section {
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

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

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }

    .movie-card {
        border-radius: 10px;
    }

    .movie-cover {
        height: 180px;
    }

    .movie-info {
        padding: 0.8rem;
    }

    .movie-title {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .movie-rating {
        margin-bottom: 0.3rem;
    }

    .star {
        font-size: 1rem;
    }

    .movie-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .watch-button {
        width: 30px;
        height: 30px;
        bottom: 5px;
        right: 5px;
    }

    .watch-button::after {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Watch page mobile adjustments */
    .watch-page .hero-section > div {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .watch-page .hero-section img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }

    .watch-page h1 {
        font-size: 1.8rem;
        text-align: center;
    }

    .watch-page .movie-rating {
        justify-content: center;
    }

    .episode-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .episode-item .watch-button {
        position: static;
        margin: 0 auto;
    }

    /* Comments mobile */
    #comments {
        margin-top: 2rem;
    }

    #comments h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .comment-form textarea {
        font-size: 0.9rem;
    }

    .comment-item {
        padding: 1rem;
    }

    /* Admin panel mobile */
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 1rem 0;
    }

    .admin-main {
        margin-right: 0;
        padding: 1rem;
    }

    .admin-sidebar h3 {
        text-align: center;
        padding: 0 1rem;
        margin-bottom: 1rem;
    }

    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        list-style: none;
        padding: 0;
    }

    .sidebar-menu li {
        margin: 0.25rem;
    }

    .sidebar-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .form-container {
        margin: 0;
        padding: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .cookie-consent {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
}

/* Medium screens - Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 0 1rem;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .movie-cover {
        height: 280px;
    }

  
    .watch-page .hero-section > div {
        padding: 0 1.5rem;
    }
}

/* Desktop and large screens */
@media (min-width: 1025px) {
    .movies-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        overflow-x: visible;
        scroll-snap-type: none;
    }

    .movie-card {
        width: 100%;
    }

    .movie-cover {
        height: 300px;
    }

    }

/* Small tablets and mobile */
@media (min-width: 481px) and (max-width: 768px) {
    .header-container {
        padding: 1rem;
    }

    .movies-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        overflow-x: visible;
    }

    .movie-card {
        width: 100%;
    }

    .movie-cover {
        height: 220px;
    }

    .search-bar {
        max-width: 150px;
    }
}

/* Small phones vertical scroll */
@media (max-width: 480px) {
    /* Keep the horizontal design */
}

/* Mobile phones - Fixed design similar to desktop */
@media (max-width: 480px) {
    .header {
        position: fixed;
        padding: 0.5rem 0;
    }

    .header-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem;
        flex-wrap: wrap;
    }

    .logo-container {
        order: 1;
        flex-shrink: 0;
    }

    .site-name {
        font-size: 1.2rem;
    }

    .logo-circle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .search-bar {
        order: 2;
        width: 100%;
        max-width: 200px;
        margin: 0 1rem;
        flex-shrink: 1;
    }

    .header-actions {
        order: 3;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        white-space: nowrap;
    }

    .profile-pic {
        width: 35px;
        height: 35px;
    }

    .main-content {
        margin-top: 70px;
        padding: 1rem;
    }

    /* Movies grid - horizontal layout like desktop */
    .movies-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.8rem;
        padding: 1rem 0;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #ee5a24 transparent;
    }

    .movies-grid::-webkit-scrollbar {
        height: 6px;
    }

    .movies-grid::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }

    .movies-grid::-webkit-scrollbar-thumb {
        background: #ee5a24;
        border-radius: 3px;
    }

    .movie-card {
        flex-shrink: 0;
        width: 140px;
        margin-bottom: 0;
        scroll-snap-align: start;
        border-radius: 10px;
    }

    .movie-cover {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 8px 8px 0 0;
    }

    .movie-info {
        padding: 0.5rem;
        text-align: center;
    }

    .movie-title {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
        height: 1.6rem;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .movie-rating {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
        justify-content: center;
    }

    .star {
        font-size: 0.8rem;
    }

    .movie-description {
        display: none; /* Hide description on mobile to save space */
    }

    .watch-button {
        width: 30px;
        height: 30px;
        bottom: 5px;
        right: 5px;
    }

    .hero-section {
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .section-title::after {
        content: '';
        flex: 1;
        height: 2px;
        background: linear-gradient(90deg, #ee5a24 0%, transparent 100%);
        border-radius: 1px;
    }

    /* Watch page mobile */
    .watch-page .hero-section > div {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .watch-page img {
        width: 100%;
        max-width: 280px;
        height: auto;
        margin: 0 auto;
    }

    .watch-page h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    /* Comments mobile */
    .comment-item {
        padding: 1rem;
    }

    .profile-dropdown {
        right: -120px;
        min-width: 180px;
    }

    /* Pagination mobile */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Improved Responsive Design */
@media (max-width: 768px) {
    /* Increase overall size on mobile */
    body {
        font-size: 18px; /* Larger font on mobile */
    }

  
    /* Header Responsive */
    .header {
        padding: 1rem 0;
    }

    .header-container {
        padding: 0 1.5rem;
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .logo-container {
        gap: 1.5rem;
        order: 1;
    }

    .site-name {
        font-size: 2rem;
    }

    .search-bar {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
        margin: 1.5rem 0 0 0;
    }

    .search-bar input {
        font-size: 18px !important;
        padding: 1.2rem;
        height: 50px;
    }

    .header-actions {
        order: 2;
        gap: 1rem;
    }

    .header-actions .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1.1rem;
        min-height: 50px;
    }

    /* Movies Grid */
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .movie-cover {
        height: 240px;
        width: 100%;
        object-fit: cover;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }

    .movie-card {
        padding: 1rem;
        border-radius: 15px;
    }

    .movie-title {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .movie-meta {
        font-size: 0.8rem;
    }

    /* Episodes Section */
    .episode-card {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .episode-card img {
        width: 100px;
        height: 100px;
        border-radius: 12px;
        object-fit: cover;
    }

    .episode-card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .episode-card p {
        font-size: 0.9rem;
    }

    /* Watch Page */
    .hero-section.watch-page {
        padding: 1rem 0;
    }

    .hero-section.watch-page > div {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1rem;
    }

    .hero-section.watch-page img {
        width: 100%;
        max-width: 300px;
        height: 450px;
        object-fit: cover;
        border-radius: 15px;
        margin: 0 auto;
    }

    .hero-section.watch-page h1 {
        font-size: 1.8rem;
        text-align: center;
    }

    /* Video Section */
    #videoContainer {
        padding-bottom: 56.25%;
        position: relative;
        height: 0;
        overflow: hidden;
        border-radius: 15px;
    }

    #episodeVideo {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 15px;
    }

    #fullscreenBtn {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 10;
        background: rgba(238, 90, 36, 0.9);
        color: white;
        border: none;
        padding: 12px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 18px;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Rating and Comments Section */
    .main-content > div > div {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 1rem;
        border-radius: 10px;
        font-size: 16px;
    }

    /* Buttons */
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        border-radius: 10px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Footer */
    .footer-sections {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    .social-links {
        justify-content: center;
    }

    .social-links a {
        width: 45px;
        height: 45px;
    }

    .profile-dropdown {
        right: -50px;
        min-width: 200px;
    }
}

/* Medium Screens (Tablets) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
    }

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

    .movie-cover {
        height: 300px;
    }

    .hero-section.watch-page img {
        width: 250px;
        height: 375px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .movies-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .movie-cover {
        height: 200px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        display: block;
    }

    .movie-card {
        max-width: 280px;
        margin: 0 auto;
    }

    .header-actions {
        gap: 0.25rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Image Quality Enhancement */
.movie-cover,
.episode-card img,
.hero-section img,
video {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    filter: contrast(1.1) brightness(1.05);
}

.movie-cover:hover,
.episode-card img:hover {
    filter: contrast(1.2) brightness(1.1);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Episode Cover Enhancement */
.episode-card img {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(238, 90, 36, 0.2);
    transition: all 0.3s ease;
}

.episode-card img:hover {
    border-color: rgba(238, 90, 36, 0.5);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.3);
}

/* Video Poster Enhancement */
video[poster] {
    object-fit: cover;
    background: #000;
}

/* Enhanced Large Screens & Ultra-wide Monitors */
@media (min-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }

    .movie-cover {
        height: 420px;
    }

    .hero-section.watch-page img {
        width: 400px;
        height: 600px;
    }

    .episode-card img {
        width: 130px;
        height: 130px;
    }

    .main-content {
        max-width: 1400px;
    }
}

/* Ultra-wide Screens (4K and above) */
@media (min-width: 1920px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 2.5rem;
    }

    .movie-cover {
        height: 480px;
    }

    .hero-section.watch-page img {
        width: 450px;
        height: 675px;
    }

    .episode-card img {
        width: 150px;
        height: 150px;
    }

    .main-content {
        max-width: 1800px;
        padding: 2rem;
    }

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

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

/* Improved Tablet Landscape (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .movies-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
    }

    .movie-cover {
        height: 330px;
    }

    .hero-section.watch-page img {
        width: 280px;
        height: 420px;
    }

    .header-container {
        padding: 0 2rem;
    }
}

/* Tablet Portrait Adjustments */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }

    .movie-cover {
        height: 280px;
    }

    .hero-section.watch-page img {
        width: 320px;
        height: 480px;
    }
}

/* Small Tablet Optimization (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .movie-cover {
        height: 260px;
    }

    .hero-section.watch-page img {
        width: 300px;
        height: 450px;
    }

    .header-container {
        padding: 0 1rem;
    }
}

/* Large Phone Enhancement (480px - 599px) */
@media (min-width: 480px) and (max-width: 599px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
    }

    .movie-cover {
        height: 220px;
    }

    .movie-info h3 {
        font-size: 0.85rem;
    }

    .hero-section.watch-page img {
        width: 280px;
        height: 420px;
    }
}

/* Small Phone Optimization (max-width: 479px) */
@media (max-width: 479px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }

    .movie-cover {
        height: 180px;
    }

    .movie-info {
        padding: 0.6rem;
    }

    .movie-info h3 {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }

    .hero-section.watch-page img {
        width: 240px;
        height: 360px;
    }

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

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

/* Foldable Phones Support */
@media (min-width: 280px) and (max-width: 400px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .movie-cover {
        height: 160px;
    }

    .movie-info {
        padding: 0.5rem;
    }

    .movie-info h3 {
        font-size: 0.7rem;
        -webkit-line-clamp: 1;
    }

    .site-name {
        font-size: 1rem;
    }

    .logo-circle {
        width: 30px !important;
        height: 30px !important;
        font-size: 1rem !important;
    }

    .search-bar input {
        font-size: 0.85rem !important;
        padding: 0.5rem !important;
    }

    .btn {
        font-size: 0.8rem !important;
        padding: 0.6rem 1rem !important;
    }
}

/* High Quality Images */
.movie-cover,
img,
video {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
    image-rendering: high-quality;
    -ms-interpolation-mode: bicubic;
}

/* Load Images with Higher Quality */
@supports (image-rendering: -webkit-optimize-contrast) {
    .movie-cover,
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Retina Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .movie-cover,
    .episode-card img,
    .hero-section img {
        image-rendering: -webkit-optimize-contrast;
        filter: contrast(1.15) brightness(1.08);
    }
}