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

/* Apply Inter font family globally and make background full screen */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    /* New: Apply background gradient and min-height to body */
    min-height: 100vh;
    background-image: linear-gradient(to bottom right, #1a202c, #2d3748); /* Equivalent to from-gray-900 to-gray-800 */
}

/* Custom drop shadow for the title */
.drop_shadow-lg {
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Basic styling for the root element to ensure it takes full height */
/* Removed background and min-h-screen from here as it's now on body */
#root {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align content to the top */
    width: 100%; /* Ensure root takes full width */
}

/* Ensure images within cards are responsive */
.movie-card img {
    max-width: 100%;
    height: auto;
}

/* Style for the select dropdowns */
select {
    appearance: none; /* Remove default arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem; /* Make space for the custom arrow */
}

/* Focus styles for select */
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.5); /* Purple ring */
    border-color: #A855F7; /* Purple border */
}

/* Placeholder for no image found */
.movie-card img[src*="placehold.co"] {
    object-fit: contain; /* Ensure placeholder text is visible */
    background-color: #333333;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-align: center;
}

/* Streaming UI Enhancements */
/* Video player styles */
.plyr {
    --plyr-color-main: #a855f7;
}

.plyr__video-wrapper {
    background: #000000;
}

/* Navigation bar styling */
nav {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Movie card hover effects */
.movie-card {
    position: relative;
    overflow: hidden;
}

.movie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.movie-card:hover::before {
    opacity: 1;
}

/* Watchlist badge animation */
@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

.watchlist-badge {
    animation: pulse-badge 2s infinite;
}

/* Search input styling */
input[type="text"] {
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    background-color: rgba(55, 65, 81, 0.8);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* Button animations */
button {
    transition: all 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

/* Gradient button styling */
.gradient-btn {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Modal/Video Player Styles */
.video-modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Genre button hover effects */
.genre-button {
    position: relative;
    overflow: hidden;
}

.genre-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.genre-button:hover::after {
    width: 300px;
    height: 300px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a855f7 0%, #ec4899 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9333ea 0%, #db2777 100%);
}

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

.spinner {
    animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .genre-button::after {
        width: 200px;
        height: 200px;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
    }
}
