/* --- Global Styles & Variables (Mobile-First) --- */
:root {
    --bg-color: #0d1117; /* Slightly softer black */
    --surface-color: #161b22;
    --primary-color: #007BFF;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --border-color: #30363d;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    margin: 0;
    padding-top: 60px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* --- Header & Search Bar (Mobile) --- */
#main-header {
    background-color: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.search-container {
    flex-grow: 1;
    text-align: right;
}

#search-bar {
    width: 150px;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 0.9em;
    transition: all 0.2s ease-in-out;
}

#search-bar:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

/* --- Hero Section (Mobile) --- */
#hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 40px;
    color: #fff;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://i.postimg.cc/Nf3QTNXq/doraemon-movie-nobitas-sky-utopia-in-hindi.jpg');
    background-size: cover;
    background-position: center 30%;
    z-index: -1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(13,17,23,0) 50%, rgba(13,17,23,1) 95%);
}

.hero-content {
    padding: 0 5%;
    width: 100%;
}

#hero-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1em;
    margin-bottom: 20px;
    max-width: 90%;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-primary:active { /* Touch feedback for mobile */
    transform: scale(0.95);
}

/* --- Movie Gallery (Mobile) --- */
#movie-gallery {
    padding-top: 40px;
    padding-bottom: 40px;
}

.section-title {
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    display: inline-block;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
}

.movie-card {
    background-color: var(--surface-color);
    border-radius: 12px; /* Softer corners */
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.2s ease-in-out;
    position: relative;
    border: 1px solid var(--border-color);
}

.movie-card:active { /* Touch feedback for mobile */
    transform: scale(0.96);
}

.movie-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.movie-card img {
    width: 100%;
    height: 230px; /* Slightly taller */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.poster-container {
    position: relative;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.movie-card h3 {
    padding: 12px;
    margin: 0;
    font-size: 0.9em;
    font-weight: 500;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px; /* Ensure consistent height */
}

#no-results {
    color: var(--text-secondary);
    font-size: 1.2em;
    text-align: center;
    padding: 50px;
    grid-column: 1 / -1; /* Make it span full width */
}

.hidden {
    display: none;
}

/* --- Footer --- */
footer {
    background-color: #0a0a0a;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
}

footer p {
    margin: 8px 0;
    font-size: 0.9em;
}

footer .disclaimer {
    font-size: 0.7em;
    max-width: 90%;
    margin: 15px auto;
    opacity: 0.7;
}

/* --- AD CARD STYLES --- */
.ad-card {
    grid-column: 1 / -1; /* This makes the ad span across all columns on mobile */
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    min-height: 250px; /* Ad ki height ke barabar */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px; /* Ad ke liye thoda space */
}

/* Desktop styles for ad card */
@media (min-width: 768px) {
    .ad-card {
        min-height: 270px; /* Slightly more space on desktop */
        padding: 15px;
        grid-column: auto; /* Reset to default */
    }

    /* Movie grid updated for desktop to show 4 movies per row */
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
        gap: 25px; 
    }
}

/* --- DESKTOP STYLES --- */
@media (min-width: 768px) {
    body { padding-top: 70px; }
    .container { padding: 0 20px; }
    .logo { font-size: 1.8em; }
    #search-bar { width: 250px; }
    #hero { height: 60vh; align-items: center; }
    .hero-background::after { background: linear-gradient(90deg, rgba(13,17,23,1) 20%, rgba(13,17,23,0.4) 60%, rgba(13,17,23,0) 100%); }
    .hero-content { padding: 0 5%; max-width: 50%; }
    #hero-title { font-size: 3em; }
    .hero-content p { font-size: 1.1em; }
    .btn-primary:hover { background-color: #0062cc; transform: translateY(-2px); }
    .movie-card:hover { transform: translateY(-8px); box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2); }
    .movie-card img { height: 300px; }
    .movie-card h3 { font-size: 1em; }
    .play-icon svg { width: 40px; height: 40px; }
}

/* ===== COMING SOON STYLING ===== */
.movie-card a.coming-soon {
    cursor: not-allowed; /* Click disable jaisa feel dega */
}
.poster-container .coming-soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    font-size: 0.8em;
    font-weight: 600;
    border-radius: 5px;
    z-index: 5;
}
.movie-card a.coming-soon .poster-container img {
    filter: grayscale(80%); /* Movie ko black & white dikhayega */
}
