/* =========================================
   BINEMAFLIX - Army/Action Theme CSS
========================================= */

:root {
    --bg-color: #080c08; /* Very dark green/black */
    --nav-bg: #111a11;
    --primary-color: #4b5320; /* Army green */
    --accent-glow: #85c13b; /* Glowing bright green */
    --text-main: #ffffff;
    --text-muted: #a3b19b;
    
    --font-heading: 'Black Ops One', cursive;
    --font-subheading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ================= Navbar ================= */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.4s ease;
    background: linear-gradient(to bottom, rgba(8, 12, 8, 0.9) 0%, rgba(8, 12, 8, 0) 100%);
}

#navbar.scrolled {
    background-color: var(--nav-bg);
    box-shadow: 0 2px 15px rgba(0,0,0,0.7);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    height: 35px;
    object-fit: contain;
    mix-blend-mode: screen; /* Makes black background transparent */
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-main);
    font-size: 1.2rem;
}

.nav-right i {
    cursor: pointer;
    transition: color 0.3s;
}

.nav-right i:hover {
    color: var(--accent-glow);
}

.profile-icon img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
}

/* ================= Hero Section ================= */
.hero {
    position: relative;
    height: 85vh;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 4%;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0; /* Hide image if video is present */
    transition: opacity 1s;
}

#hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

iframe#hero-video-container {
    width: 100vw !important;
    height: 56.25vw !important; /* 16:9 Aspect Ratio */
    min-height: 100vh !important;
    min-width: 177.77vh !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
    z-index: 0;
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--bg-color) 0%, rgba(8,12,8,0.4) 50%, rgba(8,12,8,0) 100%),
                linear-gradient(0deg, var(--bg-color) 0%, rgba(8,12,8,0) 30%);
}

.hero-content {
    max-width: 600px;
    z-index: 10;
    animation: fadeIn 1.5s ease;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(133, 193, 59, 0.5); /* Glowing text effect */
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    color: #e2e8f0;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-play {
    background-color: var(--text-main);
    color: #000;
}

.btn-play:hover {
    background-color: rgba(255,255,255,0.75);
}

.btn-info {
    background-color: rgba(75, 83, 32, 0.7); /* Army green transparent */
    color: var(--text-main);
    backdrop-filter: blur(5px);
}

.btn-info:hover {
    background-color: rgba(75, 83, 32, 0.9);
    box-shadow: 0 0 15px rgba(133, 193, 59, 0.4);
}

/* ================= Movie Rows ================= */
.main-content {
    padding: 20px 0;
    margin-top: -100px;
    position: relative;
    z-index: 20;
}

.movie-row {
    margin-bottom: 40px;
    padding-left: 4%;
}

.row-title {
    font-family: var(--font-subheading);
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    border-left: 4px solid var(--accent-glow);
    padding-left: 10px;
}

.row-posters {
    display: flex;
    overflow-y: hidden;
    overflow-x: scroll;
    padding: 20px 0;
    scroll-behavior: smooth;
    gap: 15px;
}

.row-posters.grid-mode {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: flex-start;
}

/* Hide scrollbar */
.row-posters::-webkit-scrollbar {
    display: none;
}
.row-posters {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.movie-card {
    min-width: 200px;
    width: 200px;
    height: 300px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
    position: relative;
    background-color: #1a221a;
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

/* Hover Effects for Movie Card */
.movie-card:hover {
    transform: scale(1.15) translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.8), 0 0 15px rgba(133, 193, 59, 0.3);
    z-index: 10;
}

.movie-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    transform: translateY(10px);
}

.movie-card:hover .movie-info {
    opacity: 1;
    transform: translateY(0);
}

.movie-info h4 {
    font-family: var(--font-subheading);
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--accent-glow);
}

.movie-meta {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #ccc;
    align-items: center;
}

.match-score {
    color: #46d369; /* Netflix style green, adjusting to our theme */
    font-weight: bold;
}

.age-rating {
    border: 1px solid #ccc;
    padding: 0 4px;
}

/* ================= Footer ================= */
footer {
    background-color: var(--nav-bg);
    padding: 50px 4%;
    margin-top: 50px;
    color: var(--text-muted);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    margin-top: 30px;
    font-size: 0.8rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media Queries */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-description {
        font-size: 1rem;
    }
    .movie-card {
        min-width: 140px;
        width: 140px;
        height: 210px;
    }
}

/* Netflix-style Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #181818;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(24, 24, 24, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: background 0.3s;
}

.modal-close:hover {
    background: #fff;
    color: #000;
}

.modal-hero {
    position: relative;
    width: 100%;
    height: 400px;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-hero .modal-vignette {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, #181818, transparent);
}

.modal-info {
    padding: 30px;
}

.modal-title-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 0 10px rgba(133, 193, 59, 0.5);
}

.modal-meta {
    display: flex;
    gap: 15px;
    color: #999;
    font-weight: bold;
    margin-bottom: 20px;
}

.modal-meta .match { color: #46d369; }
.modal-meta .age { border: 1px solid #999; padding: 2px 6px; border-radius: 3px; font-size: 0.8rem; }

.modal-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 25px;
}
