/* ============================================================
   CineBot — modern dark cinema UI
   Foundation: cool near-black, borders over shadows, one amber
   accent used only for meaning (primary action, status, badges).
   Layout: idle state lives in normal document flow (no overlap
   possible); connected video docks to a fixed corner PiP.
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Surfaces */
    --bg: #0b0d10;
    --surface: #14171d;
    --surface-2: #1a1e26;

    /* Lines */
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    /* Text: four-level hierarchy */
    --text: #f2f4f8;
    --text-secondary: #a8b0bd;
    --text-muted: #7a828f;
    --text-faint: rgba(255, 255, 255, 0.35);

    /* Accent + semantics */
    --accent: #e3b25b;
    --accent-strong: #edc172;
    --accent-ink: #221703;
    --danger: #e5484d;
    --ok: #3fb950;

    /* Shape & motion */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --ease: cubic-bezier(0.25, 1, 0.5, 1);

    --header-h: 57px;
}

html {
    color-scheme: dark;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(227, 178, 91, 0.3);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.app-container {
    width: 100%;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* Thin scrollbars for carousels */
.cast-carousel::-webkit-scrollbar,
.movies-carousel::-webkit-scrollbar,
.trending-carousel::-webkit-scrollbar,
.filmography-carousel::-webkit-scrollbar {
    height: 8px;
}

.cast-carousel::-webkit-scrollbar-thumb,
.movies-carousel::-webkit-scrollbar-thumb,
.trending-carousel::-webkit-scrollbar-thumb,
.filmography-carousel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.cast-carousel::-webkit-scrollbar-track,
.movies-carousel::-webkit-scrollbar-track,
.trending-carousel::-webkit-scrollbar-track,
.filmography-carousel::-webkit-scrollbar-track {
    background: transparent;
}

/* ============ HEADER ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 20px;
    background: rgba(11, 13, 16, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    color: var(--accent);
    flex-shrink: 0;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.brand-tagline {
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 12px;
    border-left: 1px solid var(--border);
    white-space: nowrap;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 150ms var(--ease);
}

.github-link:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
}

/* ============ HERO (idle layout, normal flow) ============ */
.hero {
    min-height: calc(100dvh - var(--header-h));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 24px 20px;
}

/* When the video docks to the corner, the hero collapses and the
   controls float at the bottom of the viewport instead. */
.hero:has(.agent-container.corner) {
    min-height: 0;
    padding: 0;
}

.hero:has(.agent-container.corner) .connection-controls-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
}

/* ============ AGENT VIDEO ============ */
.agent-container.centered {
    /* Width is clamped by viewport height so the card always fits
       between header and controls, at any window size. */
    width: max(240px, min(88vw, 680px, calc((100dvh - 300px) * 1.5)));
}

.agent-container.corner {
    position: fixed;
    right: 16px;
    bottom: 84px;
    width: 224px;
    z-index: 300;
    animation: pip-in 250ms var(--ease);
}

@keyframes pip-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
        var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.agent-container.corner .video-container {
    box-shadow:
        0 0 0 0.5px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Idle placeholder, removed automatically once a video attaches */
.video-container:not(:has(video))::after {
    content: 'Ready when you are';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-faint);
    letter-spacing: 0.02em;
}

.video-container video {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

/* ============ CONNECTION CONTROLS ============ */
.connection-controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.control-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 150ms var(--ease);
}

.connect-btn {
    background: var(--accent);
    color: var(--accent-ink);
}

.connect-btn:hover:not(:disabled) {
    background: var(--accent-strong);
}

.connect-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.hangup-btn {
    background: rgba(229, 72, 77, 0.1);
    border-color: rgba(229, 72, 77, 0.35);
    color: #ff8b8f;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hangup-btn:hover {
    background: rgba(229, 72, 77, 0.18);
    border-color: rgba(229, 72, 77, 0.5);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 12px;
    background: rgba(20, 23, 29, 0.85);
    border: 1px solid var(--border);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.status-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.status-pulse.connecting {
    background: var(--accent);
}

.status-pulse.error {
    background: var(--danger);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============ SHARED BADGES (JS-created) ============ */
.position-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    background: rgba(11, 13, 16, 0.8);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.media-type-badge,
.in-theaters-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    padding: 3px 8px;
    background: rgba(11, 13, 16, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.date-info {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ MOVIE / TV DETAILS ============ */
.movie-display {
    width: 100%;
    min-height: calc(100vh - var(--header-h));
    position: relative;
    animation: fadeIn 250ms var(--ease);
}

.movie-backdrop-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.movie-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.backdrop-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(11, 13, 16, 0.4) 0%,
        rgba(11, 13, 16, 0.75) 55%,
        var(--bg) 100%
    );
}

.movie-content {
    position: relative;
    z-index: 10;
    padding: 48px 5% 220px;
    max-width: 1400px;
    margin: 0 auto;
}

.movie-primary {
    display: flex;
    gap: 48px;
    margin-bottom: 64px;
}

.movie-poster {
    width: 300px;
    aspect-ratio: 2 / 3;
    height: auto;
    align-self: flex-start;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    flex-shrink: 0;
}

.movie-info {
    flex: 1;
    min-width: 0;
}

.movie-title {
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin-bottom: 8px;
}

.movie-logo {
    max-width: 100%;
    max-height: 110px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.movie-tagline {
    font-size: 15px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 20px;
}

.movie-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.star-icon {
    width: 15px;
    height: 15px;
    fill: var(--accent);
    flex-shrink: 0;
}

.movie-rating {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.movie-rating .rating-number {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

/* Content Rating Badge (G, PG, PG-13, R, NC-17) — monochrome; the
   rating text carries the meaning, color isn't needed */
.content-rating {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.movie-genres {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.genre-tag {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.movie-overview {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 65ch;
}

.movie-actions-info {
    margin-bottom: 28px;
}

.action-hint {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: var(--radius);
}

/* Watch Providers */
.watch-providers {
    display: inline-block;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.watch-providers h3 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.providers-heading {
    display: none;
}

.providers-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.provider-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    overflow: hidden;
    display: inline-block;
    border: 1px solid var(--border);
    transition: transform 150ms var(--ease);
}

.provider-logo:hover {
    transform: translateY(-2px);
}

.provider-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.provider-type {
    display: none;
}

/* ============ SECTION HEADINGS ============ */
.cast-section h2,
.similar-section h2,
.seasons-section h2,
.filmography-section h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.cast-section,
.similar-section {
    margin-bottom: 48px;
}

/* ============ CAST ============ */
.cast-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.cast-member {
    width: 132px;
    flex-shrink: 0;
}

.cast-photo {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 8px;
    display: block;
}

.cast-name {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 2px;
}

.cast-character {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* ============ CARDS (grid + carousels) ============ */
.movies-carousel,
.trending-carousel,
.filmography-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.movie-card {
    position: relative;
}

.movies-carousel .movie-card,
.trending-carousel .movie-card,
.filmography-carousel .movie-card {
    width: 160px;
    flex-shrink: 0;
}

.movie-card-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.movie-card-title {
    padding: 8px 2px 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.movie-card-year {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 1px;
}

/* ============ SEARCH RESULTS / TRENDING ============ */
.search-results,
.trending-section {
    padding: 40px 5% 220px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 250ms var(--ease);
}

.results-title,
.trending-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 28px 16px;
}

/* ============ PERSON ============ */
.person-display {
    min-height: calc(100vh - var(--header-h));
    position: relative;
    animation: fadeIn 250ms var(--ease);
}

.person-backdrop {
    display: none;
}

.person-content {
    position: relative;
    z-index: 10;
    padding: 48px 5% 220px;
    display: flex;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}

.person-photo {
    width: 220px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    flex-shrink: 0;
}

.person-info {
    flex: 1;
    min-width: 0;
}

.person-name {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 6px;
}

.person-department {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.person-birthday {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.person-biography {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 70ch;
    max-height: 190px;
    overflow-y: auto;
}

/* Person header block injected into the results title by JS */
.person-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.person-header-photo {
    width: 140px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.person-header-info {
    flex: 1;
    min-width: 0;
}

.person-header-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.person-header-dept {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.person-header-dates,
.person-header-count {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.person-header-bio {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
    max-height: 150px;
    overflow-y: auto;
    margin-top: 8px;
}

.person-known-for {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 3px;
}

/* ============ SEASONS ============ */
.seasons-section {
    margin-top: 40px;
}

.seasons-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
}

.season-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 108px;
    transition: border-color 150ms var(--ease);
}

.season-card:hover {
    border-color: var(--border-strong);
}

.season-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.season-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.season-episodes {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.season-year {
    font-size: 12px;
    color: var(--text-faint);
}

/* ============ EPISODES ============ */
.episode-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.episode-card {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: border-color 150ms var(--ease);
}

.episode-card:hover {
    border-color: var(--border-strong);
}

.episode-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    padding: 3px 8px;
    background: rgba(11, 13, 16, 0.8);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.episode-thumbnail {
    width: 240px;
    object-fit: cover;
    flex-shrink: 0;
}

.episode-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.episode-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.episode-air-date,
.episode-runtime {
    font-size: 12px;
    color: var(--text-muted);
}

.episode-overview {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-rating {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin-top: auto;
    padding-top: 6px;
}

.no-data-message {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ============ TRAILER MODAL ============ */
.trailer-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 9, 11, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 150ms var(--ease);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
}

.close-btn {
    position: absolute;
    top: -44px;
    right: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 150ms var(--ease);
}

.close-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
}

.trailer-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: #000;
}

.trailer-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============ LOADING ============ */
.loading-state {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1100;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .movie-primary {
        flex-direction: column;
        gap: 28px;
    }

    .movie-poster {
        width: 220px;
    }

    .person-content {
        flex-direction: column;
        gap: 24px;
    }

    .person-photo {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .brand-tagline {
        display: none;
    }

    .github-link span {
        display: none;
    }

    .github-link {
        width: 32px;
        padding: 0;
        justify-content: center;
    }

    .movie-content,
    .search-results,
    .trending-section,
    .person-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
        gap: 20px 12px;
    }

    .agent-container.corner {
        width: 148px;
        bottom: 76px;
        right: 12px;
    }

    .episode-card {
        flex-direction: column;
    }

    .episode-thumbnail {
        width: 100%;
        height: 180px;
    }

    .person-header {
        flex-direction: column;
    }

    .person-header-photo {
        width: 110px;
    }
}

@media (max-width: 480px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 16px 10px;
    }

    .movies-carousel .movie-card,
    .trending-carousel .movie-card,
    .filmography-carousel .movie-card {
        width: 124px;
    }

    .cast-member {
        width: 108px;
    }

    .movie-poster {
        width: 170px;
    }
}
