/* CSS to match the Netflix-style dark UI */
:root {
    --dark-blue: #14171a;
    --main-background: #fff; /* A very dark grey/blue */
    /* --main-background: #141618; A very dark grey/blue */
    --text-color: #ff6c00;
    --accent-color: #ff6c00; /* Netflix red, but using a softer dark theme */
    --text-secondary: #999;
    --card-background: #333333;
}

body { 
    font-family: 'Inter', Arial, sans-serif; 
    background: var(--main-background); 
    margin: 0; 
    padding: 0; 
    /* color: var(--text-color); */
}


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

/* --- 1. Top Navigation Bar (Converted from Flexbox utility classes) --- */
.navbar-dark {
    background-color: #333333;
    padding: 5px 0;
    border-bottom: 3px solid #ff6c00;
    color: #fff;
}

.navbar-brand {
    margin-right: auto;
    text-decoration: none;
}
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}
.nav-item a {
    color: #fff;
    text-decoration: none;
    padding: 0 8px;
    display: block;
}

/* --- 2. News Header (Converted from Flexbox) --- */
.news-header {
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-header h1 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0;
    display: inline-block;          
}
.news-header .follow-btn {
    background-color: #007bff;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 15px;
}
.news-header p {
    margin-bottom: 0;
}

/* --- Hero Section (The main image/text area) --- */
.hero-container {
    position: relative;
    /* height: 80vh; Takes up most of the viewport height */
    overflow: hidden;
}

.hero-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    opacity: 0.3; /* Subtle background image */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(to top, var(--main-background) 10%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%); */
    background: linear-gradient(to top, #fff 10%, #fff 0%, rgba(0,0,0,0.1) 100%);
    z-index: 2;
}

.movie-info {
    margin-top: 100px;
    position: relative;
    bottom: 0;
    left: 0;
    /* padding: 0 50px 50px 50px; */
    width: 100%;
    box-sizing: border-box;
    z-index: 3;
    display: flex;
    justify-content: space-between;
}

.movie-details h1 {
    font-size: 64px;
    margin: 0 0 10px 0;
    font-weight: 800;
    text-shadow: darkgray -5px 5px 5px;
    display: initial;
    color: #FF5C00;
    background-color: inherit;
}

.metadata {
    color: var(--dark-blue);
    font-size: 14px;
    margin-bottom: 20px;
}

.metadata .rating {
    color: var(--text-color);
    font-weight: bold;
}

.metadata span {
    margin-right: 15px;
}

.overview {
    /* max-width: 600px; */
    margin-bottom: 30px;
    line-height: 1.6;
    /* color: var(--text-secondary); */
}

.overview a {
    color: var(--text-color);
    text-decoration: none;
}

.overview a:hover {
    text-decoration: underline;
}

.action-buttons button {
    padding: 12px 30px;
    margin-right: 15px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 700;
}

.play-button {
    background-color: white;
    color: black;
}

.trailer-button {
    background-color: rgba(150, 150, 150, 0.5);
    color: white;
}

/* --- Sidebar Content (Actors/Posters) --- */
.sidebar-content {
    width: 35%;
    padding-left: 30px;
}

.sidebar-content .poster-wrappter {
    display: flex;
    gap: 10px;
}

.sidebar-content .poster-wrapper .poster-image {
    width: 300px;
    border-radius: 4px;
}


.actor-list {
    display: flex;
    margin-top: 15px;
    max-width: 400px; /* Constrain the width for the actors row */
}
.actor-card {
    text-align: center;
    width: 60px; /* Small fixed width for actors' circles */
    margin-right: 15px;
    font-size: 12px;
}
.actor-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--text-secondary); /* Small border like the example */
    margin-bottom: 5px;
}
.actor-card small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- General Content Sections --- */
.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px 0;
}
.only-section {
    margin: 0;
}
.section { margin: 40px 0; }
.section h2 { 
    font-size: 28px; 
    margin-bottom: 20px; 
    border-left: 4px solid var(--accent-color); 
    padding-left: 10px;
    /* color: var(--text-color); */
}

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); /* Larger cards for similar movies */
    gap: 20px; 
}
.card { 
    background: var(--card-background); 
    padding: 0; 
    border-radius: 8px; 
    text-align: left; 
    overflow: hidden;
    transition: transform 0.2s;
    color: var(--text-color)
}
.card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.card a.actor-card-link {
    color: inherit;
    text-decoration: none;
}

.card img { 
    width:100%; 
    height: auto; 
    border-radius: 8px 8px 0 0; 
    display: block;
}
.card-body {
    padding: 10px;
}
.card-body p {
    margin: 5px 0;
    font-size: 14px;
}
.card-body a {
    display: inline-block;
    margin-top: 5px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

iframe {
    border-radius: 8px;
}

span.job_label {
    font-family: 'Matrix Type', sans-serif;
    font-size: 0.8em;
    color: var(--text-color);
    font-weight: bold;
}

.crew-list {
    display: flex;
    justify-content: space-around;
}

.crew-list p {
    line-height: 1.5;
    color: var(--card-background);
}

p.success {
    color: green;
    font-weight: bold;
}

p.warning {
    color: orange;
    font-weight: bold;
}

p.danger {
    color: red;
    font-weight: bold;
}

.metric {
    margin-bottom: 14px;
}

.label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 4px;
}

.bar {
    background: #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    height: 10px;
}

.fill {
    height: 100%;
    width: 0;
    animation: fillBar 1.2s ease-out forwards;
    background: #999;
}

/* Colors */
.fill.budget { background: #6c757d; }
.fill.revenue { background: var(--accent-color); }
.fill.roi { background: #0d6efd; }

.fill.roi.success { background:  #28a745; }
.fill.roi.warning { background:  #ffc107; }
.fill.roi.danger  { background:  #dc3545; }


@keyframes fillBar {
    to {
        width: var(--w, 0%);
    }
}

/* Verdict styles */
.verdict {
    margin-top: 10px;
    font-weight: 700;
}

.verdict.success { color: #28a745; }
.verdict.warning { color: #ffc107; }
.verdict.danger  { color: #dc3545; }

.bar {
    position: relative;
    background: #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    height: 26px;
    margin-bottom: 12px;
}

.fill {
    position: relative;
    height: 100%;
    width: 0;
    animation: fillBar 1.2s ease-out forwards;
    display: flex;
    align-items: center;
    padding-left: 10px;
    white-space: nowrap;
}

/* Text inside bar */
.fill span {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.analisys-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    flex-wrap: wrap;
}

.analisys-items {
    flex-grow: 1;
    flex: 1 1 300px; 
    overflow-wrap: break-word;
}

.analyzer-section {
    margin-bottom: 30px;
}

select#critic_type {
    height: 50px;
    padding: 5px;
    font-weight: bold;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 1.0rem;
    border-radius: 10px;
    border: 2px solid orange;
    background-color: #fff;
}

select#critic_type option {
    color: #333;
}

#analyzeBtn {
    width: auto;
}

p.analyze-verdict {
    font-weight: bold;
}

p.analyze-verdict .answer.yes::before {
    content: "👍";
}

p.analyze-verdict .answer.maybe::before {
    content: "🤔";
}

p.analyze-verdict .answer.no::before {
    content: "👎";
}

.pulse-red-element {
  background-color: #ff0000; /* Use 'red' or a hex value */
  /* Apply the animation */
  animation: pulse-red 1s infinite; /* 2s duration, repeats infinitely */
}

button#analyzeBtn {
    height: 50px;
    margin: 17px 15px 15px 5px;
    border: 2px solid orange;
}

/* Define the keyframes for the animation */
@keyframes pulse-red {
  0% {
    /* Start with a small, opaque shadow */
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 1);
    /* transform: scale(0.95); Optional: slight scale effect */
  }
  70% {
    /* At 70% of the animation, spread the shadow outwards and fade it */
    box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    /* transform: scale(1); Optional: return to original size */
  }
  100% {
    /* End back at the start state */
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    /* transform: scale(0.95); Optional: slight scale effect */
  }
}

@keyframes fillBar {
    to {
        width: var(--w, 0%);
    }
}


/* Hide adsense placeholders for the dark design */
.ads { display: none; } 

@media (max-width: 768px) {
    .movie-info {
        flex-direction: column-reverse;
        margin-top: 20px;
        text-align: center;
    }

    .movie-details {
        max-width: 100%;
        margin-top: 20px;
    }

    .movie-details h1 {
        font-size: 2rem;
    }

    .metadata {
        margin-top: 20px;
    }

    .sidebar-content {
        width: 100%;
        padding-left: 0;
        margin-top: 0;
    }

    .sidebar-content .poster-wrapper {
        justify-content: center;
    }

    .sidebar-content .poster-wrapper .poster-image {
        width: 25%;
        border-radius: 4px;
    }

    .card a.actor-card-link {
        display: flex;
        height: 100%;
    }

    .card a.actor-card-link img {
        width: 25%;
    }

    .crew-list {
        flex-direction: column;
    }

    .grid {
        grid-template-columns: auto auto;
    }

    select#critic_type {
        width: 100%;
    }

    button#analyzeBtn {
        width: 100%;
        margin: 15px 0 0;
    }
}
