:root {
    --primary-color: #032541;
    --secondary-color: #01b4e4;
    --dark-color: #1a1a1a;
    --light-color: #f0ededd3;
    --gray-color: #f5f5f5;
    --text-color: #333;
    --text-light: #777;
    --shadow: 0 4px 6px rgba(243, 137, 137, 0.525);
    --transition: all 0.3s ease;
}

.dark-mode {
    --primary-color: #032541;
    --secondary-color: #01b4e4;
    --dark-color: #ffffff;
    --light-color: #1a1a1a;
    --gray-color: #2d2d2d;
    --text-color: #f5f5f5;
    --text-light: #b0b0b0;
    --shadow: 0 4px 6px rgba(22, 118, 214, 0.251);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    transition: var(--transition);
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 98%;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.logo img {
    height: 40px;
    color: var(--secondary-color);
}

.logo h1 {
    font-size: 0rem;
    font-weight: 700;
}
.logo h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
}

.search-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin: 0 2rem;
    max-width: 500px;
}

#search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
}

#search-btn {
    padding: 0.8rem 1.2rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

#search-btn:hover {
    background-color: #00cc1f;
}

.dark-mode-toggle {
    cursor: pointer;
    font-size: 1.5rem;
    color:#f5f5f5;
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    color: var(--secondary-color);
}

main {
    max-width: 98%;
    margin: 2rem auto;
    padding: 0 2rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.slider-controls {
    display: flex;
    gap: 10px;
}

.slider-prev, .slider-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slider-prev:hover, .slider-next:hover {
    background-color: #0099cc;
    transform: scale(1.1);
}

.see-more-container {
    width: 100%;
    text-align: center;
    margin: 2rem 0 0;
}

.see-more {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.see-more:hover {
    background-color: #0099cc;
    transform: translateY(-2px);
}

#search-results .see-more-container {
    display: none;
}

.movies-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.movie-card {
    background-color: var(--gray-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.movie-poster {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.9rem;
}

#welcome-section {
    text-align: center;
    padding: 3rem 0;
}

#welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

#welcome-section p {
    font-size: 1.2rem;
    color: var(--text-light);
}

.hidden {
    display: none !important;
}

.trending-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.trending-container::-webkit-scrollbar {
    display: none;
}

.trending-movie {
    min-width: 250px;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
    flex-shrink: 0;
}

.trending-movie:hover {
    transform: scale(1.03);
}

.trending-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 1rem;
    color: white;
}

.language-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.language-buttons button {
    padding: 0.5rem 1rem;
    background-color: var(--gray-color);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.language-buttons button:hover {
    background-color: var(--secondary-color);
    color: white;
}

#language-results-container {
    margin-top: 1.5rem;
}

.language-see-more-container {
    width: 100%;
    text-align: center;
    margin: 1.5rem 0;
}

.language-see-more {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.language-see-more:hover {
    background-color: #0099cc;
    transform: translateY(-2px);
}

footer {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 3rem 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 98%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: #e9fffd;
    font-size: 2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Video Player Styles */
#video-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#player video {
    width: 100%;
    height: 100%;
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 10;
}

.video-container.paused .play-icon-overlay {
    opacity: 1;
}

#no-video-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: rgb(239, 17, 17);
    background-color: rgba(0, 0, 0, 0.7);
}

#no-video-message p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

#try-again-btn {
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

#try-again-btn:hover {
    background-color: #0099cc;
}

.video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

#movie-title {
    font-size: 2rem;
    color: var(--text-color);
    margin: 0;
}

.video-actions {
    display: flex;
    gap: 1rem;
}

#share-btn, #toggle-trailer-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

#share-btn:hover, #toggle-trailer-btn:hover {
    background-color: #0099cc;
}

.quality-controls {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.quality-controls button {
    padding: 0.5rem 1rem;
    background-color: var(--gray-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.quality-controls button:hover, 
.quality-controls button.active {
    background-color: var(--secondary-color);
    color: white;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.detail-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.cast-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.cast-card {
    background-color: var(--gray-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cast-card:hover {
    transform: translateY(-5px);
}

.cast-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.cast-info {
    padding: 1rem;
    text-align: center;
}

.cast-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.cast-character {
    font-size: 0.9rem;
    color: var(--text-light);
}

.floating-dark-mode {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgb(255, 255, 255);
    z-index: 99;
    font-size: 1.2rem;
    transition: var(--transition);
    display: none;
}

.floating-dark-mode:hover {
    transform: scale(1.1);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .movies-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .trending-movie {
        min-width: 220px;
        height: 350px;
    }
}

@media (max-width: 300px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    .logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}
    .search-container {
        width: 70%;
        margin: 1rem 0;
    }
    
    .movies-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .movie-poster {
        height: 250px;
    }
    
    .trending-movie {
        min-width: 200px;
        height: 300px;
    }
    
    .floating-dark-mode {
        display: flex;
    }
    
    .dark-mode-toggle {
        display: none;
    }
    
    .video-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .video-actions {
        width: 100%;
        flex-direction: column;
    }
    
    #share-btn, #toggle-trailer-btn {
        width: 100%;
        justify-content: center;
    }
    
    #movie-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .movies-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .movie-poster {
        min-width: 180px;
        height: 250px;
    }
    
    .movie-info {
        padding: 0.5rem;
    }
    
    .movie-title {
        font-size: 0.9rem;
    }
    
    .movie-meta {
        font-size: 0.8rem;
    }
    
    .trending-movie {
        min-width: 180px;
        height: 250px;
    }
    
    #welcome-section h2 {
        font-size: 2rem;
    }
    
    #movie-title {
        font-size: 1.5rem;
    }
    
    .cast-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .cast-photo {
        height: 150px;
    }
}

