/* This file will contain all shared styles for header, sidebar, and footer */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

:root {
    --primary-color: #ba07f0;
    --primary-dark: #450086;
    --primary-light: #600097;
    --background-dark: #11101D;
    --text-light: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(29, 27, 49, 0.95);
    --glass-light: rgba(255, 255, 255, 0.1);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    cursor: url('https://img.icons8.com/?size=24&id=jLkEh2zFhThT&format=png&color=D167FF') 8 8, auto;
}

body {
    background-color: var(--background-dark);
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    padding-left: 1px; /* Match sidebar width */
    color: var(--text-light);
    line-height: 1.6;
}

/* Modern Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #11101dfa;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0 20px 0 100px; /* Added left padding to account for sidebar */
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 10px;
}

.logo i {
    font-size: 24px;
    color: #ba07f0;
}

.logo:hover {
    color: #ba07f0;
    transform: scale(1.02);
}

.search-bar-container {
    margin-left: 20px; /* Add space from logo */
    max-width: 500px;
    width: 100%;
    position: relative;
}

.search-input {
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0 15px;
    padding-right: 40px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ba07f0;
    box-shadow: 0 0 15px rgba(186, 7, 240, 0.2);
    outline: none;
}

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

.search-btn {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #ba07f0;
}

.search-btn i {
    font-size: 16px;
}

/* Enhanced Mobile Styles */
@media screen and (max-width: 768px) {
    header {
        height: 60px;
        padding: 0 15px;
    }

    .logo span {
        font-size: 18px;
    }

    .logo i {
        font-size: 22px;
    }

    .search-bar-container {
        margin: 0 10px;
        max-width: none;
    }

    .search-input {
        height: 36px;
        font-size: 14px;
        padding: 0 12px;
        padding-right: 36px;
    }

    .search-btn {
        width: 32px;
        height: 32px;
        right: 2px;
    }

    .search-btn i {
        font-size: 16px;
    }

    * {
        cursor: url('https://img.icons8.com/?size=20&id=jLkEh2zFhThT&format=png&color=D167FF') 6 6, auto;
    }

    a, button, .nav-link, /* and other interactive elements */ {
        cursor: url('https://img.icons8.com/?size=20&id=jLkEh2zFhThT&format=png&color=D167FF') 6 6, pointer !important;
    }

    /* Hover states on mobile */
    a:hover, button:hover /* and other hover states */ {
        cursor: url('https://img.icons8.com/?size=24&id=jLkEh2zFhThT&format=png&color=E5A4FF') 6 6, pointer !important;
    }
}

/* Small Mobile Optimization */
@media screen and (max-width: 480px) {
    header {
        padding: 0 10px;
        height: 55px;
    }

    .logo span {
        display: none; /* Hide text logo on very small screens */
    }

    .logo i {
        font-size: 24px; /* Make icon slightly larger as it's now alone */
    }

    .search-bar-container {
        margin: 0 8px;
    }

    .search-input {
        height: 34px;
        font-size: 13px;
        padding: 0 10px;
        padding-right: 34px;
    }

    .search-btn {
        width: 30px;
        height: 30px;
    }
}

/* Modern Header Styles - Desktop Optimization */
@media screen and (min-width: 1024px) {
    header {
        width: 100% !important;
        left: 0 !important;
        padding: 0 40px;
        display: grid;
        grid-template-columns: 200px 1fr 200px;
        align-items: center;
        justify-content: space-between;
    }

    .header-content {
        grid-column: 1;
    }

    .search-bar-container {
        grid-column: 2;
        justify-self: center;
        max-width: 600px;
        width: 100%;
        margin: 0 auto;
        padding: 0 20px;
    }

    /* Add an empty div for balance */
    header::after {
        content: '';
        grid-column: 3;
        width: 200px;
    }

    .logo {
        font-size: 24px;
        gap: 12px;
    }

    .logo i {
        font-size: 28px;
    }

    .search-input {
        height: 45px;
        font-size: 16px;
        padding: 0 20px;
        padding-right: 50px;
        width: 100%;
    }

    .search-btn {
        width: 45px;
        height: 45px;
        right: 20px;
    }

    .search-btn i {
        font-size: 20px;
    }
}

/* Ensure proper spacing with sidebar while keeping full-width header */
@media screen and (min-width: 1024px) {
    main {
        margin-left: 78px;
        width: calc(100% - 78px);
    }
}

/* When sidebar is collapsed */
@media screen and (max-width: 1024px) {
    .sidebar {
        display: none; /* Hide sidebar on mobile */
    }

    header {
        padding: 0 20px; /* Reset header padding */
    }

    main {
        margin-left: 0;
        width: 100%;
        padding-top: 70px;
    }

    body {
        padding-left: 0;
    }
}

/* Modern Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 78px; /* Reduced from 80px for better alignment */
    background: #11101dfa;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 14px;
    z-index: 1001; /* Above header */
    margin-top: 70px; /* Match header height */
}

.sidebar.open {
    width: 80px;
}

.sidebar .nav-list {
    margin-top: 20px;
    height: calc(100% - 90px);
    overflow-y: auto;
}

.sidebar .nav-list::-webkit-scrollbar {
    width: 5px;
}

.sidebar .nav-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.sidebar .nav-list::-webkit-scrollbar-thumb {
    background: rgba(186, 7, 240, 0.5);
    border-radius: 10px;
}

.sidebar li {
    position: relative;
    margin: 15px 0;
    list-style: none;
}

.sidebar li a {
    display: flex;
    height: 50px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar li a:hover {
    background: rgba(186, 7, 240, 0.15);
}

.sidebar li a i {
    min-width: 50px;
    line-height: 50px;
    height: 50px;
    border-radius: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    transition: all 0.3s ease;
}

.sidebar li a:hover i {
    color: #ba07f0;
    transform: scale(1.1);
}

.sidebar li a.active {
    background: rgba(186, 7, 240, 0.15);
}

.sidebar li a.active i {
    color: #ba07f0;
    transform: scale(1.1);
}

.sidebar li a.active {
    background: rgba(186, 7, 240, 0.15);
}

.sidebar li a.active i {
    color: #ba07f0;
    transform: scale(1.1);
}

.sidebar li .tooltip {
    display: none;
}

.sidebar li a .links_name {
    display: none;
}

/* Main content wrapper */
main {
    margin-left: 78px; /* Match sidebar width */
    padding-top: 90px; /* Header height + spacing */
    width: calc(100% - 78px);
    min-height: calc(100vh - 70px);
    transition: margin-left var(--transition-speed) ease;
}

.sidebar.open ~ main {
    margin-left: 78px;
    width: calc(100% - 78px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .search-bar-container {
        max-width: 400px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (forced-colors: active) {
    .search-btn,
    .sidebar li a:hover,
    .sidebar li a.active {
        border: 2px solid ButtonText;
    }
}

/* Footer styles */
footer {
    width: 100%;
    background: rgba(17, 16, 29, 0.95);
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    color: #9ca3af;
    font-size: 14px;
    line-height: 1.5;
}

.footer-content p:first-child {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .footer-content {
        padding: 0 15px;
    }

    .footer-content p {
        font-size: 12px;
    }
}

/* Header, sidebar, and footer styles from style.css will go here */

/* Mobile Navigation Styles */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #11101da4 !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom); /* For newer iOS devices */
}

.mobile-nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav li {
    flex: 1;
    text-align: center;
    padding: 0 5px;
}

/* Updated mobile nav link styles */
.mobile-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 8px 12px;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.mobile-nav .nav-link i {
    font-size: 24px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.mobile-nav .nav-link span {
    font-size: 12px;
    transition: all 0.3s ease;
}

/* Hover states */
.mobile-nav .nav-link:hover {
    background: rgba(186, 7, 240, 0.15);
}

.mobile-nav .nav-link:hover i {
    color: #ba07f0;
    transform: scale(1.1);
}

/* Active states - Important to override other styles */
.mobile-nav .nav-link.active {
    background: rgba(186, 7, 240, 0.15) !important;
    color: #ba07f0 !important;
}

.mobile-nav .nav-link.active i {
    color: #ba07f0 !important;
    transform: scale(1.1);
}

.mobile-nav .nav-link.active span {
    color: #ba07f0 !important;
}

/* Remove any conflicting styles */
.mobile-nav a,
.mobile-nav a.active,
.mobile-nav i,
.mobile-nav span {
    color: inherit;
}

/* Adjust main content to account for mobile nav */
@media screen and (max-width: 1024px) {
    body {
        margin-left: 0;
    }

    main {
        margin-left: 0 !important; /* Override any other margins */
        width: 100% !important; /* Take full width on mobile */
        padding-left: 0;
        padding-right: 0;
    }

    .sidebar {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    /* Remove any fixed widths that might affect centering */
    .container,
    .movie-details-container,
    .content-wrapper {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    /* Ensure content doesn't get hidden behind mobile nav */
    .scroll-container {
        margin-bottom: 20px;
    }

    /* Adjust footer to not conflict with mobile nav */
    .footer {
        margin-bottom: 50px;
    }
}

/* Additional fixes for smaller screens */
@media screen and (max-width: 768px) {
    main {
        padding-top: 70px; /* Adjust for smaller header */
    }
}

@media screen and (max-width: 480px) {
    main {
        padding-top: 60px; /* Further adjust for even smaller header */
    }
}

/* Desktop Optimization */
@media screen and (min-width: 1024px) {
    .sidebar {
        background: #11101dfa;
    }

    .sidebar li a {
        margin: 0 auto;
        width: 50px;
    }

    .sidebar li a:hover {
        background: rgba(186, 7, 240, 0.15);
        transform: translateY(-2px);
    }

    .sidebar li a.active {
        background: rgba(186, 7, 240, 0.15);
    }
}

/* Mobile Navigation Styles */
@media screen and (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(17, 16, 29, 0.95);
        backdrop-filter: blur(10px);
        z-index: 1000;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-nav ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 10px 0;
    }

    .mobile-nav .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #9ca3af;
        font-size: 12px;
        transition: all 0.3s ease;
    }

    .mobile-nav .nav-link i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    /* Active state styling */
    .mobile-nav .nav-link.active {
        color: rgba(186, 7, 240, 0.9);
        text-shadow: 0 0 10px rgba(186, 7, 240, 0.4);
    }

    .mobile-nav .nav-link.active i {
        color: rgba(186, 7, 240, 0.9);
        text-shadow: 0 0 10px rgba(186, 7, 240, 0.4);
        transform: scale(1.1);
    }
}

/* Even smaller for phones */
@media screen and (max-width: 480px) {
    .mobile-nav .nav-link i {
        font-size: 18px; /* Further reduced for smaller screens */
        margin-bottom: 2px;
    }

    .mobile-nav .nav-link span {
        font-size: 10px;
    }

    .mobile-nav .nav-link {
        padding: 5px 6px;
    }
}

/* Loader styles */
.loader {
    width: fit-content;
    font-weight: bold;
    font-family: "Poppins", sans-serif;
    font-size: clamp(20px, 3vw, 32px);
    letter-spacing: -1px;
    padding: 0 10px;
    background: linear-gradient(90deg, #ba07f0 50%, #450086);
    background-size: 200% 100%;
    background-position: right;
    animation: l24 2s infinite linear;
    position: relative;
    z-index: 1000;
}

.loader::before {
    content: "Cinematic Craze...";
    line-height: 1em;
    color: transparent;
    background: inherit;
    background-image: radial-gradient(circle closest-side, var(--primary-color) 94%, transparent);
    -webkit-background-clip: text;
    background-clip: text;
    font-family: "Poppins", sans-serif;
    letter-spacing: -1px;
}

/* Loader overlay container */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 16, 29, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* Responsive adjustments for loader */
@media screen and (max-width: 768px) {
    .loader {
        font-size: clamp(16px, 4vw, 24px);
        padding: 0 8px;
    }
}

@media screen and (max-width: 480px) {
    .loader {
        font-size: clamp(14px, 5vw, 20px);
        padding: 0 6px;
    }
}

/* Animation for loader */
@keyframes l24 {
    100% {
        background-position: left;
    }
}

/* Update/add these styles for sidebar active state */
.sidebar .nav-link.active {
    color: var(--primary-color);
    background: rgba(186, 7, 240, 0.15);
}

.sidebar .nav-link.active i {
    color: var(--primary-color);
    text-shadow: 0 0 0 5px rgba(186, 7, 240, 0.4);
}

/* Ensure content doesn't overlap with sidebar */
.container,
.movie-details-container,
.content-wrapper {
    width: calc(100% - 78px);
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Interactive elements cursor - expanded list */
a, 
button,
.nav-link,
.search-btn,
.filter-btn,
.dropdown-item,
.movie-card,
.series-card,
.close,
input[type="text"],
.season-button,
.episode-card,
.logo,
.header-content,
.search-input,
.dropdown-toggle,
.watch-now-button,
.nav .btn,
.slider .item,
.scroll-content img,
.cast-member,
.modal-close,
.play-button,
.like-button,
.share-button,
.episode-link,
.season-selector,
ion-icon,
.bx,
.mobile-nav-link,
[role="button"],
[type="submit"],
[type="button"],
select,
option,
.scroll-container,
#heroSection .content,
.filter-container button,
.dropdown-content button {
    cursor: url('https://img.icons8.com/?size=24&id=jLkEh2zFhThT&format=png&color=D167FF') 8 8, pointer !important;
}

/* Hover states for all interactive elements */
a:hover, 
button:hover,
.nav-link:hover,
.search-btn:hover,
.filter-btn:hover,
.dropdown-item:hover,
.movie-card:hover,
.series-card:hover,
.close:hover,
.season-button:hover,
.episode-card:hover,
.logo:hover,
.header-content:hover,
.dropdown-toggle:hover,
.watch-now-button:hover,
.nav .btn:hover,
.slider .item:hover,
.scroll-content img:hover,
.cast-member:hover,
.modal-close:hover,
.play-button:hover,
.like-button:hover,
.share-button:hover,
.episode-link:hover,
.season-selector:hover,
ion-icon:hover,
.bx:hover,
.mobile-nav-link:hover,
[role="button"]:hover,
[type="submit"]:hover,
[type="button"]:hover,
select:hover,
.scroll-container:hover,
#heroSection .content:hover,
.filter-container button:hover,
.dropdown-content button:hover {
    cursor: url('https://img.icons8.com/?size=28&id=jLkEh2zFhThT&format=png&color=E5A4FF') 8 8, pointer !important;
}

/* Text selection cursor */
text, p, h1, h2, h3, h4, h5, h6 {
    cursor: url('https://img.icons8.com/?size=24&id=jLkEh2zFhThT&format=png&color=D167FF') 8 8, text;
} 