/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #0c0b10;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styling */
header {
    background: linear-gradient(135deg, #1d1b26 0%, #0c0b10 100%);
    padding: 80px 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    text-decoration: none;
    display: inline-block;
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

header p {
    font-size: 1.25rem;
    color: #b0afb8;
    margin-bottom: 40px;
    font-weight: 300;
}

/* Search Form */
.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    padding: 0 20px;
}

.search-form input {
    flex: 1;
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #e52e71;
    box-shadow: 0 0 15px rgba(229, 46, 113, 0.3);
}

.search-form button {
    padding: 15px 35px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(229, 46, 113, 0.4);
}

/* Main Section */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #fff;
}

.no-results {
    text-align: center;
    padding: 100px 0;
    color: #888;
    font-size: 1.2rem;
}

/* Movie Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

/* Movie Card */
.movie-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(229, 46, 113, 0.5);
}

.poster-wrapper {
    position: relative;
    width: 100%;
    padding-top: 150%; /* Aspect ratio for movie posters */
}

.poster-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2a2a35;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 1.2rem;
}

/* Overlay for rating */
.overlay {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 12px;
    border-bottom-left-radius: 12px;
    backdrop-filter: blur(5px);
}

.rating {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffca28;
}

/* Movie Info */
.movie-info {
    padding: 20px;
}

.movie-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.release-date {
    font-size: 0.9rem;
    color: #a0a0a8;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 40px 0;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Detail Page Styling */
.detail-page {
    background-color: #0c0b10;
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.3;
}

.backdrop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #0c0b10 100%);
}

.detail-header {
    background: transparent;
    padding: 30px 0;
    box-shadow: none;
    border-bottom: none;
}

.back-btn {
    color: #e52e71;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.back-btn:hover {
    opacity: 0.7;
}

.detail-wrapper {
    display: flex;
    gap: 50px;
    padding: 60px 0;
    align-items: flex-start;
}

.poster-section {
    flex-shrink: 0;
    width: 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.detail-poster {
    width: 100%;
    display: block;
}

.info-section {
    flex: 1;
}

.detail-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.3rem;
    color: #a0a0a8;
    font-style: italic;
    margin-bottom: 30px;
}

.meta-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #b0afb8;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.genre-tag {
    display: inline-block;
    padding: 8px 18px;
    margin: 0 10px 10px 0;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s ease;
}

.genre-tag:hover {
    background: rgba(229, 46, 113, 0.4);
    border-color: #e52e71;
}

.overview {
    margin-top: 50px;
}

.overview h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 20px;
}

.overview p {
    font-size: 1.1rem;
    color: #d0d0d8;
    line-height: 1.8;
}

/* Responsiveness */
@media (max-width: 900px) {
    .detail-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    
    .poster-section {
        width: 250px;
    }
    
    .detail-title {
        font-size: 2.5rem;
    }
    
    .meta-row {
        justify-content: center;
    }
}
