/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #1f1f1f;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Variables */
:root {
    --imdb-gold: #ff8800;
    --imdb-dark-bg: #1f1f1f;
    --imdb-light-text: #ffffff;
    --imdb-secondary-text: #b3b3b3;
    --imdb-blue: #5799ef;
    --hover-bg: #333333;
}

/* Navbar */
.navbar {
    background-color: #121212;
    padding: 0 1rem;
    height: 60px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo-text {
    background-color: var(--imdb-gold);
    color: #000;
    font-weight: 900;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.nav-btn {
    background: none;
    border: none;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-btn:hover {
    background-color: #222;
}

.search-bar {
    flex-grow: 1;
    display: flex;
    max-width: 600px;
}

.search-bar input {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-bar button {
    background-color: #fff;
    /* IMDb style typically has a grey/white search icon bg */
    border: none;
    padding: 0 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    color: #555;
}

.nav-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    font-weight: 700;
}

.divider {
    width: 1px;
    background-color: #333;
    height: 24px;
}

/* Main Content Wrapper */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    background-color: #1f1f1f;
}

/* Hero Section */
.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.hero-title-group h1 {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 0.2rem;
}

.title-metadata {
    display: flex;
    gap: 1rem;
    color: var(--imdb-secondary-text);
    font-size: 0.9rem;
}

.title-metadata li:not(:last-child)::after {
    content: "•";
    margin-left: 1rem;
}

.hero-rating {
    display: flex;
    gap: 2rem;
}

.rating-box {
    text-align: center;
}

.rating-label {
    font-size: 0.75rem;
    color: var(--imdb-secondary-text);
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.rating-score {
    font-size: 1.25rem;
    font-weight: 700;
}

.text-warning {
    color: var(--imdb-gold);
}

.text-primary {
    color: var(--imdb-blue);
}

.rating-count {
    font-size: 0.75rem;
    color: var(--imdb-secondary-text);
}

/* Hero Media Grid */
.hero-media-grid {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.poster-container {
    position: relative;
}

.poster-img {
    width: 100%;
    display: block;
    height: 100%;
    object-fit: cover;
}

.add-bookmark {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    width: 30px;
    height: 40px;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.trailer-container {
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.play-button-overlay {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s;
}

.play-button-overlay:hover {
    transform: scale(1.1);
    color: var(--imdb-gold);
}

.play-button-overlay i {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

/* Details Section */
.details-section {
    max-width: 800px;
    margin-top: 1rem;
}

.genres {
    margin-bottom: 1rem;
}

.genre-tag {
    border: 1px solid var(--imdb-secondary-text);
    padding: 0.2rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    transition: background 0.2s;
}

.genre-tag:hover {
    background-color: #333;
}

.plot-summary {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #ddd;
}

.credit-row {
    border-top: 1px solid #333;
    padding: 0.8rem 0;
    display: flex;
    align-items: center;
}

.credit-label {
    font-weight: 700;
    margin-right: 1rem;
    min-width: 80px;
}

.credit-link {
    color: var(--imdb-blue);
    margin-right: 0.5rem;
}

.credit-link:hover {
    text-decoration: underline;
}

/* Cast Section */
.cast-section {
    margin-top: 3rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--imdb-gold);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--imdb-gold);
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.cast-card {
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cast-img-container {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.cast-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cast-info {
    padding: 0.8rem;
}

.actor-name {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.character-name {
    color: var(--imdb-secondary-text);
    font-size: 0.9rem;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #333;
    color: var(--imdb-secondary-text);
}

.social-links {
    margin-bottom: 1rem;
}

.social-links i {
    font-size: 1.2rem;
    margin: 0 1rem;
    cursor: pointer;
    transition: color 0.2s;
}

.social-links i:hover {
    color: var(--imdb-gold);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-media-grid {
        grid-template-columns: 1fr;
    }

    .poster-container {
        display: none;
        /* Often hidden or moved on mobile for imdb style narrow view */
    }

    .hero-title-group h1 {
        font-size: 2rem;
    }

    .search-bar {
        display: none;
        /* Simple mobile adaptation */
    }
}

/* =========================================
   New Section Styles
   ========================================= */

.content-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
}

.see-all {
    font-size: 0.9rem;
    color: var(--imdb-blue);
    margin-left: 0.5rem;
    font-weight: 700;
    cursor: pointer;
}

.see-all:hover {
    text-decoration: underline;
}

/* Scrolling Wrapper (Videos/Photos) */
.scrolling-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
}

.scrolling-wrapper::-webkit-scrollbar {
    height: 8px;
}

.scrolling-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.scrolling-wrapper::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

/* Video Card */
.video-card {
    min-width: 250px;
    cursor: pointer;
}

.video-card:hover .video-title {
    text-decoration: underline;
}

.video-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.video-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.video-card:hover img {
    opacity: 1;
}

.play-icon {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 4px;
    font-size: 0.8rem;
    border-radius: 2px;
}

.video-title {
    font-size: 0.95rem;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.video-sub {
    font-size: 0.85rem;
    color: var(--imdb-secondary-text);
}

/* Photos */
.photos-wrapper {
    align-items: center;
}

.gallery-photo {
    height: 200px;
    width: auto;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gallery-photo:hover {
    opacity: 0.8;
}

/* Storyline */
.storyline-content {
    background-color: #1f1f1f;
    /* Consistent background */
}

.plot-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.meta-row {
    display: flex;
    border-top: 1px solid #333;
    padding: 0.8rem 0;
    align-items: baseline;
}

.meta-label {
    font-weight: 700;
    margin-right: 1rem;
    min-width: 100px;
    color: #fff;
}

.meta-value {
    color: var(--imdb-blue);
}

.meta-value a {
    color: var(--imdb-blue);
}

.meta-value a:hover {
    text-decoration: underline;
}

.meta-value span {
    color: var(--imdb-secondary-text);
    /* Non-link text */
}

/* Reviews */
.review-card {
    background-color: #1a1a1a;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-rating {
    font-weight: 700;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.review-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.review-meta {
    font-size: 0.85rem;
    color: var(--imdb-secondary-text);
    margin-bottom: 1rem;
}

.review-author {
    color: #fff;
    font-weight: 600;
}

.review-body {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    /* Truncate after 5 lines */
    -webkit-box-orient: vertical;
}

.review-actions {
    display: flex;
    gap: 1rem;
}

.helpful-btn {
    font-size: 0.85rem;
    color: var(--imdb-secondary-text);
    cursor: pointer;
    border: 1px solid #444;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.helpful-btn:hover {
    background-color: #333;
}

/* Details & Tech Specs Lists */
.details-list {
    display: flex;
    flex-direction: column;
}

.detail-item {
    display: flex;
    border-top: 1px solid #333;
    padding: 0.8rem 0;
    align-items: baseline;
}

.detail-label {
    font-weight: 700;
    margin-right: 1rem;
    min-width: 150px;
    /* Fixed width for labels alignment */
}

.detail-value {
    color: var(--imdb-blue);
}

.detail-value a {
    color: var(--imdb-blue);
    margin-right: 0.3rem;
}