/* ================================================================
   Release Timeline — css/pages/release-timeline.css
   Cinematic horizontal timeline of upcoming film releases
   ================================================================ */

.release-timeline-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0 4rem;
}

/* ── Region Selector ────────────────────────────────────────── */
.tl-region-selector {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tl-region-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--text-muted, #aaa);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tl-region-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tl-region-btn.active {
    background: var(--accent-primary, #00f0ff);
    border-color: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}


/* ── Wrapper ──────────────────────────────────────────────────── */

#release-timeline {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(3, 0, 8, 0.6) 100%);
    padding: 0 0 2rem;
    overflow: hidden;
}

#release-timeline-wrap {
    position: relative;
}

/* ── Spotlight ────────────────────────────────────────────────── */
.tl-spotlight {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2.5rem 2rem 2rem;
    min-height: 220px;
    overflow: hidden;
}

.tl-spotlight-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    filter: blur(2px) brightness(0.22);
    transform: scale(1.08);
    transition: background-image 0.6s ease;
    z-index: 0;
}

.tl-spotlight-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 100% at 50% 100%, rgba(3, 0, 8, 1) 0%, transparent 70%),
        linear-gradient(90deg, rgba(3, 0, 8, 0.85) 0%, transparent 60%);
}

.tl-spotlight-content {
    position: relative;
    z-index: 2;
    flex: 0 1 500px;
    text-align: center;
}

.tl-spotlight-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-primary, #00f0ff);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.tl-spotlight-title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 0.5rem;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
    transition: all 0.35s ease;
}

.tl-spotlight-date {
    font-size: 1.1rem;
    color: var(--text-muted, #aaa);
    margin-bottom: 1.5rem;
}

.tl-spotlight-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tl-pin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tl-pin-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.tl-pin-btn.is-pinned {
    background: var(--accent-primary, #00f0ff);
    border-color: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.tl-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 100px;
    color: var(--accent-primary, #00f0ff);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    letter-spacing: 0.03em;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.12);
    animation: tl-badge-glow 2.5s ease-in-out infinite;
}


@keyframes tl-badge-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.12); }
    50%       { box-shadow: 0 0 30px rgba(0, 240, 255, 0.28); }
}

/* Adapt badge colour to theme */
:root[data-theme="synthwave"] .tl-countdown-badge { border-color: rgba(255, 0, 127, 0.4); background: rgba(255, 0, 127, 0.1); box-shadow: none; }
:root[data-theme="crimson"]   .tl-countdown-badge { border-color: rgba(255, 30, 60, 0.4);  background: rgba(255, 30, 60, 0.1);  box-shadow: none; }
:root[data-theme="emerald"]   .tl-countdown-badge { border-color: rgba(0, 255, 102, 0.4);  background: rgba(0, 255, 102, 0.1);  box-shadow: none; }

.tl-spotlight-poster {
    position: relative;
    z-index: 2;
    width: clamp(90px, 10vw, 140px);
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.08);
    flex-shrink: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    filter: brightness(0.95);
}

.tl-spotlight-poster:hover {
    transform: scale(1.04) rotate(-1deg);
    filter: brightness(1.05);
}

/* ── Track Container ──────────────────────────────────────────── */
.tl-track-container {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}

.tl-nav-btn {
    position: absolute;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10, 6, 22, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
    top: 50%;
    transform: translateY(-50%);
}

.tl-nav-btn:hover {
    background: var(--accent-primary, #00f0ff);
    border-color: var(--accent-primary, #00f0ff);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.tl-nav-prev { left: 0.75rem; }
.tl-nav-next { right: 0.75rem; }

/* ── Scrollable track ─────────────────────────────────────────── */
.tl-track-scroll {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 3.5rem;
    cursor: grab;
    user-select: none;
}

.tl-track-scroll:active {
    cursor: grabbing;
}


.tl-track-scroll::-webkit-scrollbar { display: none; }

.tl-track-line {
    position: absolute;
    top: calc(50%);
    left: 3.5rem;
    right: 3.5rem;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 5%,
        rgba(255, 255, 255, 0.15) 95%,
        transparent 100%);
    z-index: 1;
    transform: translateY(-50%);
}

/* ── Films row: alternating above/below the line ──────────────── */
.tl-films-row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 120px 1rem;
    position: relative;
    z-index: 2;
    min-width: max-content;
}

/* ── Each film node ───────────────────────────────────────────── */
.tl-film-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 130px;
    max-width: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* nodes above the line */
.tl-film-node.tl-pos-above {
    flex-direction: column-reverse;
}

/* nodes below the line */
.tl-film-node.tl-pos-below {
    flex-direction: column;
}

.tl-node-stem {
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.tl-film-node:hover .tl-node-stem,
.tl-film-node.tl-active .tl-node-stem {
    background: var(--accent-primary, #00f0ff);
}

.tl-node-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.tl-film-node:hover .tl-node-dot,
.tl-film-node.tl-active .tl-node-dot {
    background: var(--accent-primary, #00f0ff);
    border-color: var(--accent-primary, #00f0ff);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
    transform: scale(1.25);
}

.tl-film-node.tl-next .tl-node-dot {
    background: var(--accent-primary, #00f0ff);
    border-color: var(--accent-primary, #00f0ff);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.7);
}

/* Pulsing ring for the NEXT film */
.tl-dot-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary, #00f0ff);
    opacity: 0;
    animation: tl-pulse 2s ease-out infinite;
}

@keyframes tl-pulse {
    0%   { transform: scale(1);   opacity: 0.8; }
    100% { transform: scale(2.4); opacity: 0; }
}

.tl-node-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    flex-shrink: 0;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.tl-film-node:hover .tl-node-label,
.tl-film-node.tl-active .tl-node-label {
    color: var(--accent-primary, #00f0ff);
}

/* ── Film Card (poster + name above/below node) ───────────────── */
.tl-film-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    max-width: 130px;
}

.tl-film-node:hover .tl-film-card,
.tl-film-node.tl-active .tl-film-card {
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.tl-film-poster {
    width: 72px;
    aspect-ratio: 2 / 3;
    border-radius: 7px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
    filter: brightness(0.8);
    flex-shrink: 0;
}

.tl-film-node:hover .tl-film-poster,
.tl-film-node.tl-active .tl-film-poster {
    transform: scale(1.08) translateY(-2px);
    filter: brightness(1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--accent-primary, #00f0ff);
}

.tl-film-info {
    text-align: center;
}

.tl-film-title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.tl-film-node:hover .tl-film-title,
.tl-film-node.tl-active .tl-film-title {
    color: #fff;
}

.tl-film-date {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.15rem;
    transition: color 0.3s ease;
}

.tl-film-node:hover .tl-film-date,
.tl-film-node.tl-active .tl-film-date {
    color: rgba(255, 255, 255, 0.7);
}

/* Past films are dimmed */
.tl-film-node.tl-past .tl-film-poster {
    filter: brightness(0.4) grayscale(0.6);
}

.tl-film-node.tl-past .tl-film-title {
    color: rgba(255, 255, 255, 0.35);
}

.tl-film-node.tl-past .tl-node-dot {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.tl-film-node.tl-past .tl-node-label {
    color: rgba(255, 255, 255, 0.3);
}

/* ── Skeleton loaders ─────────────────────────────────────────── */
.tl-skeleton {
    padding: 1.5rem;
}

.tl-skel-spotlight {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.tl-skel-track {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 1rem 2rem;
    overflow: hidden;
}

.tl-skel-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tl-skel-block {
    border-radius: 8px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: tl-shimmer 1.5s infinite;
}

@keyframes tl-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.tl-skel-title  { width: 280px; height: 36px; border-radius: 6px; }
.tl-skel-date   { width: 180px; height: 18px; border-radius: 4px; }
.tl-skel-badge  { width: 140px; height: 32px; border-radius: 100px; }
.tl-skel-poster { width: 72px; height: 108px; border-radius: 7px; }

/* ── Standalone page content wrapper ─────────────────────────── */
#timeline-content {
    padding: 0 0 4rem;
    overflow: visible;
}

/* ── Section divider below timeline ──────────────────────────── */

.tl-section-divider {
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 240, 255, 0.3),
        transparent);
    margin: 3rem 0;
}

/* ── Pinned Watchlist Section ────────────────────────────────── */
.tl-pinned-section {
    max-width: 1200px;
    margin: 4rem auto 2rem;
    padding: 0 2rem;
}

.tl-pinned-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tl-pinned-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tl-pinned-title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 1.5rem;
    margin: 0;
    color: #fff;
}

.tl-pinned-note {
    font-size: 0.75rem;
    color: var(--text-muted, #aaa);
    margin: 0;
    opacity: 0.8;
}

.tl-pinned-count {
    font-size: 0.9rem;
    color: var(--text-muted, #aaa);
}

.tl-pinned-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.tl-pinned-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-muted, #aaa);
    font-style: italic;
}

.tl-pinned-card {
    display: flex;
    gap: 1.25rem;
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.tl-pinned-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.tl-p-poster-wrap {
    position: relative;
    flex-shrink: 0;
}

.tl-p-poster {
    width: 90px;
    height: 135px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.tl-p-days {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tl-p-urgent {
    background: #ff1e3c;
    border-color: #ff1e3c;
    box-shadow: 0 0 10px rgba(255, 30, 60, 0.4);
}

.tl-p-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tl-p-title {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.2;
}

.tl-p-date {
    font-size: 0.8rem;
    color: var(--accent-primary, #00f0ff);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.tl-p-overview {
    font-size: 0.8rem;
    color: var(--text-muted, #aaa);
    line-height: 1.4;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tl-p-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tl-p-imdb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f5c518; /* IMDb Yellow */
    text-decoration: none;
    transition: color 0.2s ease;
}

.tl-p-imdb:hover {
    color: #fff;
}

.tl-p-remove {
    background: none;
    border: none;
    color: #ff4757;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.tl-p-remove:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tl-spotlight {
        padding: 1.5rem 1rem 1rem;
        min-height: 160px;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .tl-spotlight-poster {
        width: 80px;
        opacity: 0.85;
    }

    .tl-spotlight-title {
        font-size: 1.5rem;
    }

    .tl-nav-btn {
        width: 32px;
        height: 32px;
    }

    .tl-film-node {
        min-width: 100px;
        max-width: 115px;
    }

    .tl-film-poster { width: 58px; }
    .tl-film-title  { font-size: 0.65rem; }
}


@media (max-width: 480px) {
    .tl-spotlight-poster { display: none; }
    .tl-films-row { padding: 100px 0.5rem; }
    .tl-film-node { min-width: 88px; max-width: 100px; }
    .tl-film-poster { width: 50px; }
}
