/* =========================================
   GLOBAL RESET
   ========================================= */
:root {
    --bg: #05070a;
    --surface: #111;
    --border: #222;
    --text-main: #fff;
    --text-muted: #aaa;
    --gap-side: 4vw;
}

html { font-size: 16px; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    margin: 0; padding: 0;
    overflow-x: hidden;
}

.movie-page-container {
    width: 100%;
    min-height: 100vh;
    padding-bottom: 5rem;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }

/* BACKDROP */
.backdrop-container {
    width: 100%;
    height: 70vh;
    position: absolute;
    top: 0; left: 0;
    z-index: 0;
}

#backdrop {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.35; 
    mask-image: linear-gradient(to bottom, black 10%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 10%, transparent 100%);
}

/* MAIN CONTENT */
.movie-content {
    position: relative;
    z-index: 10;
    width: 100%; 
    max-width: none;
    padding: 0 var(--gap-side);
    box-sizing: border-box;
    margin-top: 15vh;
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.main-poster {
    width: 22rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.info-section {
    flex: 1;
    padding-top: 2rem;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1rem;
    background: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}
.back-link:hover { background: #fff; color: #000; }

.movie-title-h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.meta-tags {
    display: flex; align-items: center; gap: 1.5rem;
    font-size: 1.1rem; color: #ccc; margin-bottom: 2rem;
}

#quality-badge {
    border: 1px solid #fff; padding: 2px 8px;
    border-radius: 4px; font-size: 0.8rem; font-weight: bold;
}

#overview {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 2.5rem;
    max-width: 900px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* CONTROLS */
.series-controls-container {
    display: none; gap: 1rem; margin-bottom: 2rem;
}

.custom-dropdown {
    width: 15rem; font-family: inherit; position: relative;
}

.dropdown-trigger {
    background: var(--surface); border: 1px solid var(--border);
    color: #fff; padding: 1rem; border-radius: 8px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
}

.dropdown-options {
    position: absolute; top: 110%; left: 0; width: 100%;
    background: #000; border: 1px solid var(--border);
    max-height: 300px; overflow-y: auto; z-index: 50; display: none;
}
.dropdown-options.show { display: block; }
.dropdown-item { padding: 1rem; cursor: pointer; border-bottom: 1px solid #222; color: #aaa; }
.dropdown-item:hover { background: #222; color: #fff; }

/* ACTIONS */
.action-buttons { display: flex; gap: 1rem; width: 100%; max-width: 500px; }
.btn { flex: 1; padding: 1.2rem; border-radius: 8px; font-weight: 700; text-align: center; font-size: 1rem; }
.btn-primary { background: #fff; color: #000; border: none; }
.btn-primary:hover { background: #ddd; }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.btn-secondary:hover { background: rgba(255,255,255,0.2); border-color: #fff; }

/* UTILS */
.section-title {
    padding: 0 var(--gap-side); margin: 4rem 0 1.5rem;
    font-size: 1.8rem; color: #fff; font-weight: 600;
}

.similar-grid {
    display: flex; gap: 1rem; overflow-x: auto;
    padding: 0 var(--gap-side) 2rem; width: 100%;
    box-sizing: border-box; scrollbar-width: none;
}
.similar-item {
    min-width: 11rem; aspect-ratio: 2/3;
    border-radius: 8px; background: #222; overflow: hidden; transition: 0.3s;
}
.similar-item:hover { transform: scale(1.05); margin: 0 5px; }
.similar-item img { width: 100%; height: 100%; object-fit: cover; }

.comment {
    margin: 0.5rem var(--gap-side); background: var(--surface); padding: 1.5rem;
    border-radius: 8px; border: 1px solid var(--border); max-width: 800px;
}

/* --- SEO BLOCK CSS --- */
#seo-block {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-width: 900px;
}

#seo-h2 {
    font-size: 1.3rem; color: #fff; margin-bottom: 1rem; font-weight: 600;
}

#seo-description {
    font-size: 1rem; line-height: 1.7; color: var(--text-muted);
    height: 3.4em; /* Only show 2 lines */
    overflow: hidden;
    transition: all 0.5s ease;
}
#seo-description.expanded { height: auto; }

#readBtn {
    background: none; border: none; color: #fff; cursor: pointer;
    font-weight: 700; margin-top: 1rem; font-size: 0.9rem;
    border-bottom: 1px solid #fff; padding-bottom: 2px;
}

/* MOBILE */
@media (max-width: 1024px) {
    .movie-content {
        flex-direction: column; margin-top: 10vh; align-items: center; text-align: center;
    }
    .main-poster { width: 16rem; margin-bottom: 1rem; }
    .info-section { padding-top: 0; width: 100%; }
    .movie-title-h1 { font-size: 2.5rem; }
    .meta-tags { justify-content: center; }
    #overview { margin: 0 auto 2rem; }
    .series-controls-container { justify-content: center; }
    .custom-dropdown { width: 100%; }
    .action-buttons { margin: 0 auto; width: 100%; max-width: 100%; flex-direction: column; }
    .back-link { display: none; }
    #seo-block { text-align: left; }
}
