/* --- 1. GLOBAL & HOMEPAGE (YOUR ORIGINAL CODE RE-ADDED) --- */
body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    font-family: 'Segoe UI', Roboto, sans-serif;
    color: #f8fafc;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('https://wallpapercave.com/wp/wp10117191.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    max-width: 900px; 
    width: 100%;
    text-align: center;
}

header {
    margin-bottom: 40px; 
}

h1 {
    font-size: 3.5rem; 
    font-weight: 800;
    margin: 0;
    padding-bottom: 15px; 
    letter-spacing: -2px; 
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

nav {
    margin-bottom: 40px; 
}

nav a {
    color: #38bdf8;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ffffff;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.card {
    background: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 24px;
    padding: 25px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
    overflow: hidden; 
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
    border-color: #38bdf8;
    box-shadow: 0 15px 40px rgba(56, 189, 248, 0.3);
}

/* YOUR BUTTONS ARE BACK HERE */
.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 24px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.btn:hover {
    background: #38bdf8;
    color: #0f172a;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.footer-pill {
    display: inline-block;
    margin-top: 40px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

/* --- 2. MOVIES PAGE ONLY (PROTECTED) --- */
.movie-page { 
    display: block; 
    text-align: center; 
}

.movie-page .movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 40px;
    text-align: left;
}

.movie-page .thumbnail-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    aspect-ratio: 16/9;
    background: #000;
}

.movie-page .thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-page .play-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s;
}

.movie-page .movie-card:hover .play-overlay { opacity: 1; }
.movie-page .movie-card:hover { transform: scale(1.03); }

.movie-page .modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.movie-page .modal-content {
    position: relative;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; max-width: 850px;
}

.movie-page #mainPlayer { width: 100%; border-radius: 10px; }

.movie-page .close-btn {
    position: absolute;
    top: -40px; right: 0;
    color: white; font-size: 30px; cursor: pointer;
}

/* Centering Fix for Movies Page */
.movie-page .container {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.movie-page h1 {
    width: 100%;
    text-align: center;
}

.movie-page .movie-grid {
    width: 100%; /* Keeps the grid spanning the container width */
}