/* ==========================================
   1. CORE STYLES & VARIABLES
========================================== */
:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --accent-color: #ff385c;
    --accent-hover: #e02647;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --star-color: #f59e0b;
    --bar-bg: #e2e8f0;
    --border-color: #0e0f10;
    --max-width: 1200px;
    --navbar-bg: rgba(255, 255, 255, 0.85);

    /* NEW BRANDING VARIABLES */
    --nav-height: 84px;
    --color-accent: #FF3366;
    /* Signature Popcorn Pink */
    --text-brand-salty: #8E8E93;
    /* Premium Platinum Gray */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a {
    text-decoration: underline;
    text-underline-offset: 4px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    font-weight: 700;
    padding-left: 12px;
}

section {
    width: 100%;
}

/* ==========================================
   2. HERO HEADER SECTION
========================================== */
.hero-backdrop {
    position: relative;
    padding-top: 48px;
    margin-bottom: 12px;
}

.hero-container {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.poster-wrapper {
    flex-shrink: 0;
    width: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.15);
    background-color: #cbd5e1;
}

.poster-wrapper img {
    width: 100%;
    display: block;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.poster-fallback {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 20px;
    text-align: center;
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    color: #475569;
}

.fallback-icon {
    font-size: 2.2rem;
}

.fallback-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    word-break: break-word;
    max-width: 100%;
}

.hero-content {
    flex-grow: 1;
}

.movie-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    color: var(--text-main);
}

/* ==========================================
   3. METADATA & GENRE PILLS
========================================== */
.metadata-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 24px;
}

.meta-item:not(:last-of-type)::after {
    content: "•";
    margin-left: 16px;
    color: var(--border-color);
}

.genre-chicklet-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.genre-chicklet {
    font-size: 0.75rem;
    font-weight: 700;
    background-color: #e2e8f0;
    color: #334155;
    padding: 5px 10px;
    border-radius: 6px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    display: inline-block;
    line-height: 1.3;
}

.cta-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.synopsis {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 800px;
}

/* ==========================================
   4. STRUCTURE GRIDS & DATA CARDS
========================================== */
.data-row {
    display: grid;
    gap: 32px;
    width: 100%;
}

.data-row-split {
    grid-template-columns: 1fr 1fr;
}

.data-row-full {
    grid-template-columns: 1fr;
}

.data-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.box-office-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    gap: 24px;
}

.box-office-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.box-office-wrapper:has(.bo-group:only-child) {
    grid-template-columns: 1fr;
}

/* ==========================================
   5. RATINGS DISPLAY PANEL
========================================== */
.rating-overview {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.big-score {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.stars-container {
    color: var(--star-color);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.total-reviews {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.bar-label {
    width: 24px;
    color: var(--text-muted);
}

.bar-track {
    flex-grow: 1;
    height: 8px;
    background-color: var(--bar-bg);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background-color: var(--star-color);
    border-radius: 4px;
}

.bar-pct {
    width: 36px;
    text-align: right;
    color: var(--text-muted);
}

.star-btn {
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
    display: inline-block;
}

.star-btn:hover {
    transform: scale(1.25);
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.2));
}

/* Layout Alignment Overrides */
.stars-layout-container {
    max-width: 100% !important;
    /* Forces layout container to take full page width */
    width: 100% !important;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

.directors-layout-container {
    max-width: 100% !important;
    /* Forces layout container to take full page width */
    width: 100% !important;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

/* ==========================================
   6. BOX OFFICE DATA METRICS
========================================== */
.bo-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bo-group-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 2px solid var(--bar-bg);
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.bo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.bo-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bo-label {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 500;
}

.bo-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

.badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.badge-dom {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-uk {
    background-color: #fef2f2;
    color: #b91c1c;
}

.badge-int {
    background-color: #f0fdf4;
    color: #15803d;
}

.bo-featured-banner {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-left: 4px solid var(--accent-color);
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.featured-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #475569;
}

.featured-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
}

/* ==========================================
   7. MEDIA & CREATIVE CAROUSELS
========================================== */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
    background-color: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.crew-row {
    display: flex;
    gap: 40px;
    margin-bottom: 24px;
    background-color: var(--card-bg);
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.03);
}

.crew-item span {
    display: block;
}

.crew-label {
    color: var(--text-muted);
    font-size: 0.825rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.crew-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.cast-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.cast-carousel::-webkit-scrollbar {
    height: 6px;
}

.cast-carousel::-webkit-scrollbar-track {
    background: #e2e8f0;
}

.cast-carousel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.cast-card {
    flex: 0 0 120px;
    text-align: center;
}

.cast-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    background-color: #e2e8f0;
}

.cast-avatar-blank {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e2e8f0;
    border: 1px solid #cbd5e1;
    margin: 0 auto 12px;
    display: block;
}

.cast-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: normal;
    line-height: 1.2;
}

.cast-character {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* ==========================================
   8. SEQUELS & FRANCHISE TIMELINE
========================================== */
.timeline-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.timeline-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.03);
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08);
}

.timeline-card.active {
    border-color: var(--accent-color);
    background: linear-gradient(145deg, var(--card-bg) 0%, rgba(255, 56, 92, 0.03) 100%);
}

.timeline-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.timeline-card.active .timeline-tag {
    color: var(--accent-color);
}

.timeline-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.timeline-year {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================
   9. BRAND NEW NAVBAR & IDENTITY
========================================== */
.main-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 16px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.navbar-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-family: "Inter", -apple-system, sans-serif;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.25px;
}

.text-salty {
    color: var(--text-brand-salty);
    transition: color 0.2s ease;
}

.text-popcorn {
    color: var(--color-accent);
    margin-left: -2px;
}

.navbar-logo:hover .text-salty {
    color: var(--text-main);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 23, 42, 0.03);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid rgba(15, 23, 42, 0.02);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease-in-out;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.04);
}

.nav-link-active {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.page-spacing {
    padding-top: 40px;
}

/* ==========================================
   10. MOVIE CARDS & NOTIFICATION ALERTS
========================================== */
.movie-row-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04);
}

.movie-row-card h3 {
    margin: 0 0 6px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}

.movie-meta-text {
    margin: 0;
    color: var(--text-muted, #64748b);
    font-weight: 500;
    font-size: 0.9rem;
}

.back-btn-link {
    color: var(--accent-color, #00adb5);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 0.95rem;
}

.back-btn-link:hover {
    text-decoration: underline;
}

.error-alert-box {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    padding: 16px;
    border-radius: 6px;
}

/* ==========================================
   11. DATA CARD NEWS SYSTEM (100px SHIFT)
========================================== */
.data-card-news {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    line-height: 1.5em;
}

.data-card-news ul {
    margin-left: 5%;
    padding: 0 10px 20px 0;
    line-height: 3em;
}

.data-card-news ul li {
    display: inline-block;
    width: 100%;
    line-height: 1.4;
    vertical-align: top;
    position: relative;
}

.data-card-news ul li::before {
    content: "•";
    color: var(--accent-color, #ff385c);
    font-weight: bold;
    font-size: 1.25rem;
    position: absolute;
    left: -20px;
    top: -2px;
}

.data-card-news .col-flex {
    display: flex;
}

.data-card-news img {
    width: 100%;
}

.data-card-news .col-one {
    width: 66.66%;
}

.data-card-news .col-three {
    width: 33.33%;
}

.highlight-padding {
    font-size: 1.6rem;
    margin-bottom: 16px;
    font-weight: 700;
    border-left: 4px solid var(--accent-color);
    padding-left: 12px;
    background-color: #f8f8f8;
}

.data-card-news h2.highlight-padding {
    position: relative !important;
    padding-right: 180px !important;
    margin-top: 56px !important;
    margin-bottom: 20px !important;
    padding-top: 24px !important;
    border-top: 2px solid var(--bar-bg, #e2e8f0);
}

.data-card-news a:has(img.news-item-image) {
    position: absolute !important;
    right: 220px !important;
    display: block !important;
    z-index: 10 !important;
    margin-top: 110px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background-color: #cbd5e1 !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
    transform: perspective(800px) rotateY(0deg) translateY(0);
    transform-origin: right center;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

.data-card-news img.news-item-image {
    display: block !important;
    width: 150px !important;
    height: 225px !important;
    object-fit: contain !important;
    margin: 0 !important;
    transition: filter 0.4s ease;
}

.data-card-news a:has(img.news-item-image):hover {
    transform: perspective(800px) rotateY(-8deg) translateY(-4px) scale(1.02);
    box-shadow: -10px 20px 30px -10px rgba(15, 23, 42, 0.18), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

.data-card-news a:has(img.news-item-image):hover img.news-item-image {
    filter: brightness(1.05) contrast(1.02);
}

.data-card-news ul.news-item-font {
    padding-right: 180px !important;
    margin-bottom: 40px !important;
}

.news-info-box {
    border: 1px solid #f8f8f8;
    border-left: 7px solid #B70100;
    padding: 20px 50px;
    color: #000;
    margin: 40px auto;
    width: 80%;
}

.news-info-box ul {
    line-height: 2em;
    padding: 0;
}

/* ==========================================
   12. GLOW BADGES & ANALYTICS HUD
========================================== */
.dynamic-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    align-items: center;
}

.live-glow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 50px;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-size: 200% 200%;
    animation: dynamicGlow 4s ease infinite;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.badge-is-clickable {
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: dynamicGlow 4s ease infinite, clickPulse 2s infinite !important;
}

.badge-is-clickable:hover {
    transform: scale(1.08) translateY(-3px);
    filter: brightness(1.15);
}

.badge-theme-masterpiece {
    background-image: linear-gradient(45deg, #ff416c, #ff4b2b, #f59e0b);
    border: 1px solid #f59e0b;
}

.badge-theme-salty {
    background-image: linear-gradient(45deg, #7f1d1d, #ef4444, #b91c1c);
    border: 1px solid #ef4444;
}

.badge-theme-divisive {
    background-image: linear-gradient(45deg, #475569, #0f172a, #64748b);
    border: 1px solid #475569;
}

.badge-theme-buzz {
    background-image: linear-gradient(45deg, #ec4899, #8b5cf6, #d946ef);
    border: 1px solid #ec4899;
}

.badge-theme-intellectual {
    background-image: linear-gradient(45deg, #0ea5e9, #2563eb, #06b6d4);
    border: 1px solid #0ea5e9;
}

.badge-theme-action-fresh {
    background-image: linear-gradient(45deg, #10b981, #059669, #34d399);
    border: 2px solid #ffffff;
}

.badge-theme-action-high {
    background-image: linear-gradient(45deg, #f59e0b, #ec4899, #e11d48);
    border: 2px solid #ffffff;
}

.badge-theme-action-low {
    background-image: linear-gradient(45deg, #ea580c, #dc2626, #b91c1c);
    border: 2px solid #ffffff;
}

.analytics-hud-panel {
    margin-top: 28px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

.hud-grid-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.hud-stat-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.5);
    padding: 12px 14px;
    border: 1px solid rgba(241, 245, 249, 0.9);
}

.hud-header-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.hud-main-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 2px 0;
}

.hud-track-bg {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.hud-fill-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    animation: pulseRadar 2s infinite;
}

.countdown-badge {
    animation: pulseGlow 2s infinite ease-in-out;
}

/* ==========================================
   13. ANIMATIONS & REPEATING KEYFRAMES
========================================== */
@keyframes dynamicGlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes clickPulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(225, 29, 72, 0.4);
    }

    70% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(225, 29, 72, 0);
    }

    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(225, 29, 72, 0);
    }
}

@keyframes pulseRadar {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes mapPing {
    0% {
        transform: scale(0.3);
        opacity: 1;
    }

    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

.pulsating-ring {
    animation: mapPing 2.5s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
    transform-origin: center;
    transform-box: fill-box;
}

/* ==========================================
   14. SITE FOOTER LAYER
========================================== */
.site-footer {
    background-color: var(--card-bg);
    border-top: 1px solid #e2e8f0;
    padding: 48px 0 24px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 32px;
    border-bottom: 1px solid #e2e8f0;
}

.footer-brand {
    flex: 1 1 300px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 12px;
}

.footer-brand p {
    line-height: 1.6;
    max-width: 320px;
}

.footer-links-group {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* ==========================================
   15. RESPONSIVE MEDIA BREAKPOINTS (768px)
========================================== */
@media (max-width: 768px) {
    .hero-backdrop {
        padding-top: 24px;
    }

    .hero-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .poster-wrapper {
        width: 180px;
    }

    .movie-title {
        font-size: 1.8rem;
    }

    .data-row,
    .data-row-split,
    .box-office-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bo-featured-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .featured-value {
        font-size: 1.4rem;
    }

    .crew-row {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .timeline-container {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        padding-bottom: 12px;
    }

    .timeline-card {
        flex: 0 0 200px;
        min-height: 100px;
    }

    .main-navbar .navbar-container {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .main-navbar .navbar-links {
        width: 100% !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        white-space: nowrap !important;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links-group {
        gap: 40px;
        justify-content: space-between;
    }
}

.header-search-form {
    display: flex;
    align-items: center;
    position: relative;
    margin: 0 16px;
    flex: 1;
    max-width: 220px;
}

.header-search-input {
    width: 100%;
    padding: 8px 12px;
    padding-right: 36px;
    background-color: #fff;
    border: 1px solid #334155;
    border-radius: 20px;

    /* CHANGE THIS VALUE */
    color: #0f172a;
    /* Changed from #f8fafc to dark blue/black */

    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.header-search-input:focus {
    border-color: #FF3366;
    background-color: #F8FAFC;
    box-shadow: 0 0 0 2px rgba(255, 51, 102, 0.2);

    /* ADD OR ENSURE THIS LINE SAYS A DARK COLOR */
    color: #0f172a;
}

.header-search-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
    }

    .header-search-form {
        order: 3;
        margin: 8px 0 0 0;
        max-width: 100%;
        width: 100%;
    }
}

/* Container holding search and links side by side */
.navbar-links {
    transition: opacity 0.25s ease, max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
    opacity: 1;
    transform: scale(1);
    max-width: 700px;
    /* Standard upper-limit bounds */
}

/* State when search box is focused */
.main-navbar.search-stretching-active .navbar-links {
    opacity: 0;
    max-width: 0;
    transform: scale(0.95);
    padding: 0;
    margin: 0;
    border: none;
    pointer-events: none;
    /* Block clicking on invisible buttons */
}

/* Fluid expanding animation on the search form wrapper */
.header-search-form {
    flex: 1 1 auto;
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 220px;
    /* Default rest state width */
}

.main-navbar.search-stretching-active .header-search-form {
    max-width: 720px;
    /* Expanded maximum stretch bounds */
}

.genre-pill {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease-in-out;
}

.genre-pill:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.genre-icon {
    background: #f1f5f9;
    padding: 6px;
    border-radius: 8px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.timeline-layout-wrapper {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.filmography-flex-container {
    display: flex;
    gap: 48px;
    /* Adds clear separation space between columns */
    align-items: flex-start;
    margin-top: 32px;
    width: 100%;
}

.timeline-sidebar-menu {
    top: 20px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    width: 340px;
}

#movieCardsWrapper {
    flex-grow: 1;
    min-width: 0;
    /* Pushes your main movie rows smoothly into their own wide block layout */
}