/* ==============================================
   IMDb Pixel-Perfect Clone — Complete Override
   Exact colors from IMDb.com as of 2024/2025
   ============================================== */

/* ---- Override CSS Variables ---- */
:root {
    --bg: #000000;
    --bg-alt: #121212;
    --bg-card: #1a1a1a;
    --bg-elev: #2c2c2c;
    --bg-hover: #333333;
    --border: #2a2a2a;
    --border-light: #3a3a3a;
    --border-gold: #f5c518;
    --gold: #f5c518;
    --gold-bright: #f5c518;
    --gold-dim: #deb522;
    --amber: #f5c518;
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.7);
    --text-dim: #999999;
    --text-gold: #f5c518;
    --font-display: Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-none: 4px;
    --radius-sm: 4px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --shadow-gold: none;
}

/* ---- Kill film-grain overlay ---- */
body::before { display:none !important; }

/* ---- Font loaded via <link> in header.php for non-blocking fetch ---- */

/* ======================
   iOS Safari Reset
   iOS applies its own heavy native styling (gradient backgrounds,
   3D borders, pill shapes) to buttons, inputs, selects, and textareas.
   Without this reset, all custom CSS for these elements is ignored.
   ====================== */
button,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="submit"],
input[type="reset"],
input[type="button"],
textarea,
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* Prevent iOS Safari from zooming into inputs with font-size < 16px */
@supports (-webkit-touch-callout: none) {
    input, textarea, select {
        font-size: max(16px, 1em);
    }
}

/* Fix iOS button text clipping and tap highlight */
button {
    -webkit-tap-highlight-color: transparent;
}

a {
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow-x: hidden;
    /* Prevent double-tap zoom on iOS */
    touch-action: manipulation;
}

body {
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif !important;
    background: #000 !important;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* ======================
   HEADER — #121212
   ====================== */
.site-header {
    background: #121212 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    padding: 0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header.scrolled {
    background: #121212 !important;
    border-bottom: none !important;
}

.site-header .container {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo — No background */
.logo {
    background: none !important;
    color: #ffffff !important;
    font-family: Impact, "Arial Black", sans-serif !important;
    font-weight: 900 !important;
    font-size: 1.3rem !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    letter-spacing: -0.03em;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
}

.logo:hover {
    background: none !important;
    color: #f5c518 !important;
}

/* Nav links */
.main-nav a {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #fff !important;
    padding: 0.5rem 0.75rem !important;
}
.main-nav a::after { display:none !important; }
.main-nav a:hover { color: #f5c518 !important; }

/* ======================
   HERO / FEATURED TRAILER
   ====================== */
.hero-section { display:none !important; }

.imdb-featured-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 20px 0;
}

.imdb-showcase {
    display: flex;
    gap: 2px;
    height: 480px;
    border-radius: 8px;
    overflow: hidden;
}

.imdb-main-trailer {
    flex: 2.5;
    background: #000;
    position: relative;
    overflow: hidden;
}

.video-wrapper {
    width: 100%;
    height: 100%;
}
.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.main-trailer-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    gap: 16px;
    pointer-events: none;
}

.poster-thumbnail {
    width: 100px;
    height: 148px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.poster-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trailer-info {
    flex: 1;
    padding-bottom: 4px;
}

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    margin-bottom: 8px;
    pointer-events: auto;
    cursor: pointer;
    font-size: 1.2rem;
    color: #fff;
    transition: background 0.2s;
}
.play-icon:hover { background: rgba(255,255,255,0.35); }

.trailer-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    pointer-events: auto;
    display: block;
    line-height: 1.2;
    margin-bottom: 4px;
}
.trailer-title:hover {
    text-decoration: underline;
}

.trailer-desc {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Up Next sidebar */
.imdb-up-next {
    flex: 1;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.up-next-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 8px;
}
.up-next-title {
    color: #f5c518;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}
.up-next-browse {
    color: #5799ef;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
}
.up-next-browse:hover { text-decoration: underline; }

.up-next-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.up-next-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    transition: background 0.15s;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.up-next-item:hover {
    background: rgba(255,255,255,0.05);
}

.up-next-poster {
    width: 70px;
    height: 104px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #333;
}
.up-next-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.up-next-details { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.up-next-play {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 4px;
}
.up-next-play-icon {
    font-size: 0.85rem;
    color: #fff;
}

.up-next-name {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    line-height: 1.3;
}

.up-next-meta {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ======================
   SEARCH — White pill bar
   ====================== */
.search-filter-section {
    background: transparent !important;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
    padding: 16px 0 !important;
    margin: 0 !important;
}

.search-filter-section::before { display:none !important; }

.imdb-search-capsule {
    display: flex;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    height: 40px;
    width: 100%;
    max-width: 720px;
}

.imdb-search-category {
    background: #fff;
    color: #000;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-right: 1px solid #ccc;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.imdb-search-capsule input {
    flex: 1;
    border: none !important;
    padding: 0 12px !important;
    color: #000 !important;
    background: #fff !important;
    outline: none !important;
    font-size: 1rem !important;
    box-shadow: none !important;
    font-family: Roboto, sans-serif;
}
.imdb-search-capsule input::placeholder {
    color: #888 !important;
    font-style: normal !important;
}

.imdb-search-capsule button {
    background: #fff;
    border: none;
    padding: 0 16px;
    color: #666;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}
.imdb-search-capsule button:hover { color: #000; }

.filter-row {
    gap: 10px !important;
}

.filter-row .form-control,
.filter-row .filter-select {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
}

/* ======================
   SECTION TITLES — Yellow bar
   ====================== */
.section-title {
    color: #fff !important;
    font-family: Roboto, sans-serif !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    font-style: normal !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px !important;
    padding-left: 0 !important;
    border-left: none !important;
}

.section-title::before {
    content: "" !important;
    display: block !important;
    width: 4px !important;
    height: 28px !important;
    background: #f5c518 !important;
    border-radius: 4px !important;
    flex-shrink: 0;
}

.section-title::after { display:none !important; }

/* ======================
   MOVIE CARDS GRID
   ====================== */
.store-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)) !important;
    gap: 24px 16px !important;
    margin-top: 12px;
}

.imdb-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    border: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.imdb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* Poster wrap */
.imdb-card-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 148%;
    background: #111;
    overflow: hidden;
}

.imdb-card-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.imdb-card:hover .imdb-card-img {
    transform: scale(1.03);
}

.imdb-card-noimg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    opacity: 0.15;
    background: #111;
}

/* Bookmark ribbon */
.imdb-ribbon {
    position: absolute;
    top: 0;
    left: 8px;
    width: 26px;
    height: 36px;
    background: rgba(18,18,18,0.85);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 6px;
    font-size: 1.1rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
}
.imdb-ribbon:hover {
    background: rgba(245,197,24,0.9);
    color: #000;
}

/* Card content */
.imdb-card-content {
    padding: 8px 10px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
}

/* Rating row */
.imdb-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.imdb-star {
    color: #f5c518;
    font-size: 0.9rem;
    line-height: 1;
}

.imdb-rating-val {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Title */
.imdb-card-title {
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    margin: 0 0 auto !important;
    font-family: Roboto, sans-serif !important;
}
.imdb-card-title a {
    color: #fff !important;
    text-decoration: none !important;
    background: none !important;
}
.imdb-card-title a:hover {
    text-decoration: underline !important;
}

/* Watchlist button */
.imdb-btn-watchlist {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 0;
    background: rgba(255,255,255,0.08);
    color: #5799ef;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 4px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 8px;
}
.imdb-btn-watchlist:hover {
    background: rgba(255,255,255,0.15);
    color: #5799ef;
    text-decoration: none;
}

/* Trailer button */
.imdb-btn-trailer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 6px 0;
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 4px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.imdb-btn-trailer:hover {
    background: rgba(255,255,255,0.08);
    text-decoration: none;
}

/* Hide old featured section */
.featured-section { display:none !important; }

/* ======================
   BUTTONS — IMDb style
   ====================== */
.btn-primary {
    background: #f5c518 !important;
    color: #000 !important;
    border-color: #f5c518 !important;
    border-radius: 4px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}
.btn-primary:hover {
    background: #e2b616 !important;
    border-color: #e2b616 !important;
    box-shadow: none !important;
    transform: none !important;
}

.btn-secondary {
    border-color: #3a3a3a !important;
    border-radius: 4px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.85rem !important;
}

/* ======================
   DETAIL PAGE — store.php
   ====================== */
.store-detail {
    background: #1a1a1a !important;
    border: none !important;
    border-radius: 8px;
    overflow: hidden;
}

.store-name {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    font-family: Roboto, sans-serif !important;
    letter-spacing: -0.02em !important;
}

.store-description {
    color: rgba(255,255,255,0.8) !important;
    font-size: 1.05rem;
    line-height: 1.7;
}

.back-link {
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.9rem !important;
}
.back-link:hover { color: #f5c518 !important; }

/* Comment section styling */
.comment-form {
    background: #1a1a1a !important;
    border: 1px solid #2a2a2a !important;
    border-radius: 8px !important;
}

.comment-item {
    border-color: #2a2a2a !important;
}

/* Star ratings */
.star.filled { color: #f5c518 !important; text-shadow: none !important; }
.star.empty { color: #3a3a3a !important; }

/* ======================
   FOOTER
   ====================== */
.site-footer {
    background: #000 !important;
    border-top: 1px solid #1a1a1a !important;
    color: rgba(255,255,255,0.5) !important;
}

/* ======================
   PAGINATION
   ====================== */
.pagination .btn {
    border-radius: 4px !important;
}

/* ======================
   RESPONSIVE
   ====================== */
@media (max-width: 900px) {
    .imdb-showcase {
        flex-direction: column;
        height: auto;
    }
    .imdb-main-trailer {
        height: auto;
    }
    .imdb-up-next {
        height: auto;
        max-height: 22rem;
    }
    .store-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px 8px !important;
    }
}

/* ==============================================
   2026 Homepage Refresh
   ============================================== */
.home-shell {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.showcase-heading,
.section-header,
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
}

.showcase-heading {
    margin-bottom: 1.25rem;
}

.showcase-title {
    font-size: clamp(1.8rem, 3vw, 2.75rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 800;
    margin-top: 0.55rem;
}

.showcase-copy,
.section-copy,
.results-copy,
.discover-copy {
    color: rgba(255,255,255,0.72);
    line-height: 1.7;
}

.showcase-copy,
.section-copy {
    max-width: 30rem;
}

.imdb-featured-container {
    padding-top: 1.5rem;
}

.imdb-showcase {
    gap: 1.1rem;
    height: auto;
}

.imdb-main-trailer,
.imdb-up-next,
.search-command-center,
.spotlight-card,
.imdb-card,
.empty-state {
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.imdb-main-trailer {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    border-radius: 1rem;
    background: #111;
}

.main-trailer-stage {
    position: relative;
    overflow: hidden;
    background: #000;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    background: #000;
    overflow: hidden;
}

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

/* Lite-YouTube Facade — avoids loading ~500KB of YT scripts until click */
.video-facade {
    cursor: pointer;
}

.facade-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
    pointer-events: none;
}

.video-facade:hover .facade-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
}

.main-trailer-fallback {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    overflow: hidden;
}

.main-trailer-fallback img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-trailer-overlay {
    position: relative;
    inset: auto;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.15rem 1.5rem 1.25rem;
    background: linear-gradient(180deg, #161616 0%, #111 100%);
    border-top: 1px solid rgba(255,255,255,0.06);
    pointer-events: auto;
}

.content-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(245,197,24,0.12);
    border: 1px solid rgba(245,197,24,0.18);
    color: #f5c518;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
    width: fit-content;
}

.poster-thumbnail {
    width: 5.5rem;
    height: 8rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.trailer-info {
    flex: 1;
    min-width: 0;
    padding-bottom: 0;
}

.trailer-title {
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0.3rem;
}

.trailer-meta {
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
    line-height: 1.4;
}

.trailer-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    max-width: 40rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    pointer-events: auto;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.84rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.hero-btn-primary {
    background: #f5c518;
    color: #000;
}

.hero-btn-primary:hover {
    background: #ffd24a;
    color: #000;
}

.hero-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.16);
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.imdb-up-next {
    background:
        radial-gradient(circle at top left, rgba(87,153,239,0.18), transparent 28%),
        linear-gradient(180deg, #1b1b1b 0%, #101010 100%);
    border-radius: 1.4rem;
    overflow: hidden;
}

.up-next-header {
    padding: 1.25rem 1.3rem 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.up-next-title {
    color: #fff;
}

.up-next-browse {
    color: #ffe07a;
}

.up-next-list {
    padding: 0.25rem;
    gap: 0.2rem;
}

.up-next-item {
    margin: 0.2rem;
    border-radius: 1rem;
    border: 1px solid transparent;
}

.up-next-item:hover {
    border-color: rgba(255,255,255,0.1);
}

.up-next-play {
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.up-next-name {
    margin-bottom: 0.4rem;
}

.search-command-center {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
    gap: 1.4rem;
    padding: 1.8rem;
    margin: 2.25rem 0 2.6rem;
    border-radius: 1.5rem;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(245,197,24,0.12), transparent 28%),
        linear-gradient(145deg, #171717 0%, #0c0c0c 100%);
}

.discover-title {
    font-size: clamp(2.1rem, 4vw, 3.35rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-weight: 800;
    margin: 0.7rem 0 0.9rem;
}

.discover-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.4rem;
}

.discover-stat {
    min-width: 7rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.discover-stat strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.discover-stat span {
    color: rgba(255,255,255,0.68);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.search-form-modern {
    gap: 1rem !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.imdb-search-shell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 4.4rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.45rem;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 24px 45px rgba(0,0,0,0.3);
}

.imdb-search-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    max-width: 100%;
    padding: 0 1rem;
    min-height: 3.3rem;
    border-radius: 999px;
    background: #111;
    color: #f5c518;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.imdb-search-shell input {
    flex: 1;
    min-width: 0;
    width: auto;
    min-height: 3.3rem;
    background: transparent !important;
    color: #111 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 1.1rem !important;
    font-size: 1rem !important;
}

.imdb-search-shell input::placeholder {
    color: #777 !important;
}

.imdb-search-shell button {
    flex: 0 0 auto;
    min-width: 8.8rem;
    max-width: 100%;
    min-height: 3.3rem;
    border-radius: 999px;
    background: #f5c518;
    color: #000;
    font-size: 0.95rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.imdb-search-shell button:hover {
    background: #ffd24a;
    color: #000;
}

.quick-filter-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 0.65rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.82);
    font-size: 0.86rem;
    font-weight: 700;
}

.filter-chip:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.18);
}

.filter-chip.active {
    background: #f5c518;
    color: #000;
    border-color: #f5c518;
}

.filter-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 0.9rem;
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.55rem;
}

.filter-field span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.7);
    font-weight: 700;
}

.filter-field .form-control {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 3rem;
    border-radius: 0.95rem !important;
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-actions .btn {
    min-width: 0;
    max-width: 100%;
}

.spotlight-section {
    margin-bottom: 2.8rem;
}

.section-header {
    margin-bottom: 1.15rem;
}

.section-title-plain {
    margin-bottom: 0 !important;
}

.section-title-plain::before {
    display: none !important;
}

.spotlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.spotlight-card {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 0;
    overflow: hidden;
    border-radius: 1.3rem;
    background: linear-gradient(180deg, #171717 0%, #101010 100%);
}

.spotlight-media {
    position: relative;
    min-height: 100%;
    background: #111;
}

.spotlight-media img,
.poster-fallback-medium {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spotlight-body {
    padding: 1rem 1rem 1rem 1.05rem;
}

.spotlight-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    font-size: 0.9rem;
}

.spotlight-body h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.spotlight-body h3 a:hover {
    color: #f5c518;
}

.spotlight-meta,
.imdb-card-meta,
.imdb-card-credits {
    color: rgba(255,255,255,0.6);
}

.spotlight-meta {
    font-size: 0.8rem;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.spotlight-copy {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.72);
}

.results-header {
    margin-bottom: 1.3rem;
}

.results-copy {
    max-width: 44rem;
    margin-top: 0.8rem;
}

.active-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.82);
    font-size: 0.82rem;
    font-weight: 700;
}

.store-grid {
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)) !important;
    gap: 1.25rem !important;
}

.imdb-card {
    border-radius: 1.4rem;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(245,197,24,0.08), transparent 28%),
        linear-gradient(180deg, #161616 0%, #0d0d0d 100%);
}

.imdb-card:hover {
    transform: translateY(-0.45rem);
    box-shadow: 0 26px 60px rgba(0,0,0,0.38);
}

.imdb-card-image-wrap {
    padding-top: 146%;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.imdb-card-noimg,
.poster-fallback-large,
.poster-fallback-medium,
.poster-fallback-small,
.store-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(245,197,24,0.24), transparent 24%),
        radial-gradient(circle at 75% 18%, rgba(87,153,239,0.18), transparent 20%),
        linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    color: rgba(255,255,255,0.7);
    font-weight: 800;
}

.imdb-card-noimg {
    position: absolute;
    inset: 0;
    font-size: 4rem;
    opacity: 1;
}

.poster-fallback-large {
    width: 100%;
    height: 100%;
    font-size: 5rem;
}

.poster-fallback-medium {
    font-size: 2.4rem;
}

.poster-fallback-small {
    width: 100%;
    height: 100%;
    font-size: 1.6rem;
}

.imdb-ribbon {
    top: 0.9rem;
    left: 0.9rem;
    width: auto;
    height: auto;
    padding: 0.45rem 0.72rem;
    clip-path: none;
    border-radius: 999px;
    background: rgba(0,0,0,0.78);
    border: 1px solid rgba(255,255,255,0.14);
    font-size: 0.76rem;
    font-weight: 800;
}

.card-badges-inline {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 5;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.card-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.8rem;
    padding: 0 0.6rem;
    border-radius: 999px;
    background: rgba(245,197,24,0.18);
    border: 1px solid rgba(245,197,24,0.24);
    color: #ffe07a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card-inline-badge.alt {
    background: rgba(87,153,239,0.16);
    border-color: rgba(87,153,239,0.24);
    color: #9ec6ff;
}

.imdb-card-content {
    padding: 1rem 1rem 1.1rem;
    gap: 0.55rem;
}

.imdb-card-rating {
    margin-bottom: 0;
}

.imdb-star {
    font-size: 1rem;
}

.imdb-rating-val {
    font-size: 1rem;
    font-weight: 800;
}

.imdb-rating-count {
    color: rgba(255,255,255,0.48);
    font-size: 0.82rem;
}

.imdb-card-meta {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.imdb-card-title {
    min-height: 2.65em;
    font-size: 1.08rem !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
}

.imdb-card-summary {
    min-height: 5em;
    font-size: 0.92rem;
    line-height: 1.58;
    color: rgba(255,255,255,0.76);
}

.imdb-card-credits {
    font-size: 0.8rem;
    line-height: 1.5;
}

.imdb-card-actions {
    display: grid;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.imdb-btn-watchlist,
.imdb-btn-trailer {
    min-height: 2.75rem;
    border-radius: 999px;
    margin-top: 0;
    font-size: 0.88rem;
}

.imdb-btn-watchlist {
    background: #f5c518;
    color: #000;
}

.imdb-btn-watchlist:hover {
    background: #ffd24a;
    color: #000;
}

.imdb-btn-trailer {
    border: 1px solid rgba(255,255,255,0.12);
}

.pagination {
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.pagination-status {
    margin-left: 0.35rem;
    color: rgba(255,255,255,0.62);
    font-size: 0.88rem;
}

.empty-state {
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(245,197,24,0.12), transparent 26%),
        linear-gradient(180deg, #171717 0%, #0d0d0d 100%);
}

.empty-state-icon {
    color: #f5c518;
}

.detail-page {
    padding-top: 1.5rem;
    padding-bottom: 4rem;
}

.store-detail {
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 1.5rem;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(245,197,24,0.08), transparent 28%),
        linear-gradient(180deg, #141414 0%, #0b0b0b 100%);
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(14rem, 19rem) minmax(0, 1.75fr) minmax(15rem, 0.8fr);
    gap: 1.1rem;
    padding: 1.1rem 1.25rem 1.25rem;
}

.detail-poster-card,
.detail-sidebar-card,
.detail-panel,
.detail-score-card,
.detail-fact-card {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.detail-poster-column {
    display: flex;
    height: 100%;
}

.detail-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.2rem;
    width: 100%;
    height: 100%;
    min-height: 26rem;
    display: flex;
}

.store-image-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
    display: block;
    flex: 1;
}

.detail-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    background: rgba(245,197,24,0.88);
    color: #000;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-badge.alt {
    background: rgba(87,153,239,0.9);
    color: #fff;
}

.detail-main-column {
    padding: 0.2rem 0.2rem 0.2rem 0;
}

.store-name {
    font-size: clamp(2rem, 3.6vw, 3.4rem) !important;
    line-height: 1;
    margin: 0.35rem 0 0.7rem;
}

.detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.detail-meta-line span {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.78);
    font-size: 0.85rem;
    font-weight: 700;
}

.detail-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.detail-score-card {
    padding: 0.7rem 0.85rem;
    border-radius: 0.85rem;
}

.detail-score-card strong {
    display: block;
    margin: 0.3rem 0 0.2rem;
    font-size: 1.35rem;
    line-height: 1;
    color: #fff;
}

.detail-score-card small,
.detail-score-label {
    display: block;
    color: rgba(255,255,255,0.62);
}

.detail-score-label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.detail-description {
    margin-bottom: 0.9rem;
    max-width: none;
    line-height: 1.6;
    color: rgba(255,255,255,0.82);
}

.detail-credits {
    display: grid;
    gap: 0;
}

.detail-credit-row {
    display: grid;
    grid-template-columns: 6rem 1fr;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.detail-credit-row:first-child {
    border-top: none;
}

.detail-credit-row strong {
    color: #f5c518;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.detail-credit-row span {
    color: rgba(255,255,255,0.82);
    line-height: 1.7;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.detail-side-column {
    display: grid;
    gap: 1rem;
}

.detail-sidebar-card {
    padding: 0.85rem 0.95rem;
    border-radius: 0.9rem;
}

.detail-sidebar-kicker {
    display: block;
    margin-bottom: 0.6rem;
    color: #f5c518;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.detail-sidebar-list {
    display: grid;
    gap: 0;
}

.detail-sidebar-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.detail-sidebar-list li:first-child {
    border-top: none;
    padding-top: 0;
}

.detail-sidebar-list li:last-child {
    padding-bottom: 0;
}

.detail-sidebar-list strong {
    color: rgba(255,255,255,0.62);
    font-size: 0.82rem;
    font-weight: 700;
}

.detail-sidebar-list span {
    color: #fff;
    text-align: right;
}

.social-share-compact {
    gap: 0.6rem;
}

.social-share-compact .social-btn {
    width: 100%;
    justify-content: flex-start;
    border-radius: 999px;
    font-size: 0.78rem;
    padding: 0.75rem 0.9rem;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 0.85fr);
    gap: 1rem;
    padding: 0 1.25rem 1.25rem;
}

.detail-panel {
    border-radius: 1rem;
    padding: 0.95rem 1rem;
}

.detail-panel-header {
    margin-bottom: 0.75rem;
}

.detail-panel-header .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
}

.detail-panel-header .section-title-plain {
    margin: 0.15rem 0 0;
    font-size: 1.2rem;
}

.detail-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 1rem;
    background: #000;
}

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

.detail-video-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 0;
    overflow: hidden;
    border-radius: inherit;
}

.detail-video-fallback::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--poster, linear-gradient(135deg, #141414, #0a0a0a));
    background-size: cover;
    background-position: center;
    filter: blur(14px) brightness(0.45) saturate(1.1);
    transform: scale(1.1);
    z-index: 0;
}

.detail-video-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.75) 70%);
    z-index: 1;
}

.detail-video-fallback-inner {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    gap: 0.85rem;
    padding: 1.5rem;
    text-align: center;
    max-width: 26rem;
}

.detail-video-fallback-icon {
    display: grid;
    place-items: center;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.55));
    animation: trailer-pulse 2.4s ease-in-out infinite;
}

@keyframes trailer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.detail-video-fallback-status {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.92) !important;
    margin: 0 !important;
    line-height: 1.45;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

.detail-video-fallback-btn {
    margin-top: 0.35rem;
}

.detail-video-fallback-legacy {
    display: grid;
    place-items: center;
    gap: 0.9rem;
    min-height: 18rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
    text-align: center;
    color: rgba(255,255,255,0.72);
}

.detail-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.detail-fact-card {
    padding: 1rem;
    border-radius: 1rem;
}

.detail-fact-card strong {
    display: block;
    margin-bottom: 0.55rem;
    color: rgba(255,255,255,0.62);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.detail-fact-card span {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
}

.store-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 26rem;
    flex: 1;
    font-size: 6rem;
}

@media (max-width: 1100px) {
    .detail-hero,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .detail-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-score-grid {
        grid-template-columns: 1fr;
    }

    .search-command-center,
    .imdb-showcase,
    .results-header {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .active-filter-list {
        justify-content: flex-start;
    }

    .spotlight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .detail-side-column {
        grid-template-columns: 1fr;
    }

    .detail-fact-grid {
        grid-template-columns: 1fr;
    }

    .imdb-main-trailer {
        height: auto;
        min-height: 0;
    }

    .main-trailer-overlay {
        flex-wrap: wrap;
    }

    .poster-thumbnail {
        width: 4.5rem;
        height: 6.5rem;
    }

    .filter-panel-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .filter-actions .btn {
        width: 100%;
    }

    .spotlight-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .detail-hero,
    .detail-content-grid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .store-image-large {
        min-height: 24rem;
    }

    .detail-credit-row {
        grid-template-columns: 1fr;
    }

    .imdb-search-shell {
        flex-direction: column;
        align-items: stretch;
        padding: 0.65rem;
        border-radius: 1.25rem;
    }

    .imdb-search-badge {
        width: fit-content;
        margin-bottom: 0.35rem;
    }

    .imdb-search-shell button {
        width: 100%;
        min-width: 0;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions .hero-btn {
        width: 100%;
    }

    .search-command-center {
        padding: 1.25rem;
        border-radius: 1.25rem;
    }

    .showcase-heading,
    .section-header {
        align-items: flex-start;
    }

    .main-trailer-overlay {
        padding: 1rem 1.15rem;
        gap: 1rem;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-btn {
        flex: 1;
    }

    .store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .video-wrapper,
    .main-trailer-fallback {
        min-height: 0;
    }

    .detail-hero {
        gap: 1rem;
        padding-top: 1rem;
    }

    .detail-panel,
    .detail-sidebar-card {
        padding: 1rem;
    }

    .imdb-search-shell {
        flex-direction: column;
        align-items: stretch;
        padding: 0.7rem;
        border-radius: 1.3rem;
    }

    .imdb-search-badge {
        width: fit-content;
        min-height: 2.4rem;
        margin-bottom: 0.55rem;
    }

    .imdb-search-shell button {
        width: 100%;
        margin-top: 0.4rem;
    }

    .store-grid {
        grid-template-columns: 1fr !important;
    }

    .spotlight-card {
        grid-template-columns: 6rem 1fr;
    }

    .store-image-placeholder {
        min-height: 20rem;
        font-size: 4rem;
    }
}

body.nav-open {
    overflow: hidden;
}

.quick-comments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* ==================
   Detail page refinements (store.php)
   ================== */
.detail-score-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-score-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.62);
}

.detail-panel-header-inline .section-title-plain {
    font-size: 1.1rem;
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.detail-trailer-section {
    padding: 0 1.25rem 1.25rem;
}

.detail-trailer-section .detail-panel-trailer {
    padding: 0.9rem 1rem 1rem;
}

.hero-btn svg {
    margin-right: 0.45rem;
    flex-shrink: 0;
}

/* Comment form polish */
.honeypot-hidden {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.comment-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.comment-form-row .form-group {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .comment-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.quick-comment-chip {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(245,197,24,0.25);
    background: rgba(245,197,24,0.06);
    color: rgba(255,255,255,0.88);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.quick-comment-chip:hover {
    background: rgba(245,197,24,0.16);
    border-color: rgba(245,197,24,0.65);
    color: #f5c518;
    transform: translateY(-1px);
}

.quick-comment-chip:active {
    transform: translateY(0);
}

.comment-textarea {
    min-height: 7rem;
    background: var(--bg-elev) !important;
    color: var(--text) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 0.6rem !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    cursor: pointer;
    resize: vertical;
    transition: border-color 0.18s ease;
}

.comment-textarea:focus {
    outline: none;
    border-color: rgba(245,197,24,0.55) !important;
    box-shadow: 0 0 0 3px rgba(245,197,24,0.12) !important;
}

.comment-textarea::placeholder {
    color: rgba(255,255,255,0.42);
}

@media (max-width: 768px) {
    html,
    body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        padding: 0 0.85rem;
        max-width: 100vw;
        overflow: hidden;
    }

    *,
    *::before,
    *::after {
        max-width: 100vw;
    }

    .main-content,
    .home-shell,
    .detail-page,
    .imdb-featured-container,
    .search-command-center,
    .imdb-main-trailer,
    .imdb-up-next,
    .detail-hero,
    .detail-content-grid,
    .store-detail,
    .detail-trailer-section,
    .comments-section,
    .spotlight-section,
    .results-header,
    article {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .showcase-heading,
    .showcase-heading > *,
    .section-header,
    .section-header > *,
    .results-header,
    .results-header > *,
    .search-command-copy,
    .discover-stats,
    .main-trailer-overlay,
    .trailer-info,
    .up-next-header,
    .up-next-details {
        min-width: 0;
        max-width: 100%;
    }

    .showcase-title,
    .discover-title,
    .trailer-title {
        text-wrap: balance;
    }

    .site-header {
        padding: 0.85rem 0;
    }

    .site-header .container {
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .logo {
        max-width: 100%;
        padding: 0.2rem 0.55rem;
        font-size: 1.15rem;
        line-height: 1.1;
    }

    .logo img {
        max-height: 32px !important;
        width: auto;
    }

    .nav-toggle {
        display: none !important;
    }

    .main-nav {
        display: flex !important;
        position: static;
        width: 100%;
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        gap: 0.45rem;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        order: 3;
    }

    .main-nav.open {
        display: flex !important;
    }

    .main-nav a {
        min-height: 2.25rem;
        padding: 0.45rem 0.7rem !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        border-radius: 999px;
        background: rgba(255,255,255,0.04);
        color: #fff !important;
        font-size: 0.76rem !important;
        letter-spacing: 0 !important;
    }

    .main-nav a:hover,
    .main-nav a:focus-visible {
        background: rgba(255,255,255,0.06);
        color: #f5c518 !important;
    }

    .home-shell {
        padding-top: 1.25rem;
        padding-bottom: 2.8rem;
    }

    .imdb-featured-container {
        padding-top: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .showcase-heading,
    .section-header,
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .showcase-copy,
    .section-copy,
    .results-copy,
    .discover-copy {
        max-width: none;
        font-size: 0.88rem;
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    .imdb-showcase {
        gap: 0.9rem;
    }

    .imdb-main-trailer {
        height: auto;
        min-height: 0;
        border-radius: 0.75rem;
    }

    .main-trailer-overlay {
        padding: 0.85rem 1rem;
        gap: 0.85rem;
        flex-direction: row;
        align-items: center;
    }

    .poster-thumbnail {
        width: 3.5rem;
        height: 5.2rem;
        border-radius: 0.4rem;
    }

    .content-kicker {
        margin-bottom: 0.15rem;
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }

    .trailer-title {
        font-size: clamp(1rem, 4vw, 1.25rem);
        overflow-wrap: anywhere;
    }

    .trailer-meta {
        margin-bottom: 0.15rem;
        font-size: 0.75rem;
    }

    .trailer-desc {
        font-size: 0.8rem;
        line-height: 1.45;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .hero-actions {
        gap: 0.4rem;
        margin-top: 0.35rem;
    }

    .hero-btn {
        min-height: 2.1rem;
        padding: 0.35rem 0.85rem;
        font-size: 0.76rem;
    }

    .imdb-up-next {
        width: 100%;
        height: auto;
        overflow: hidden;
    }

    .up-next-header {
        padding: 0.95rem 0.95rem 0.75rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .up-next-list {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(calc(100vw - 2.25rem), calc(100vw - 2.25rem));
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0.95rem 0.95rem;
        gap: 0.65rem;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .up-next-list::-webkit-scrollbar {
        display: none;
    }

    .up-next-item {
        margin: 0;
        min-height: 100%;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.03);
        scroll-snap-align: start;
        overflow: hidden;
        padding: 0.95rem;
    }

    .up-next-poster {
        width: 4.65rem;
        height: 6.85rem;
        border-radius: 0.8rem;
    }

    .up-next-browse {
        flex-basis: 100%;
        max-width: 100%;
        overflow-wrap: anywhere;
        font-size: 0.76rem;
    }

    .up-next-item {
        gap: 0.8rem;
    }

    .up-next-play,
    .up-next-name,
    .up-next-meta {
        overflow: hidden;
    }

    .up-next-play {
        font-size: 1rem;
    }

    .up-next-name {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .search-command-center {
        margin: 1.5rem 0 2rem;
        gap: 1.1rem;
        padding: 1.15rem;
        border-radius: 1.2rem;
        overflow: hidden;
        grid-template-columns: 1fr;
    }

    .search-form-modern {
        max-width: 100%;
        overflow: hidden;
    }

    .filter-panel-grid {
        grid-template-columns: 1fr;
    }

    .detail-trailer-section {
        padding: 0 0.85rem 1rem;
    }

    .detail-trailer-section .detail-panel-trailer {
        padding: 0.85rem;
    }

    .discover-title {
        font-size: clamp(1.55rem, 6.8vw, 2.05rem);
        overflow-wrap: anywhere;
    }

    .discover-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 0.55rem;
    }

    .discover-stat {
        min-width: 0;
        width: 100%;
        padding: 0.75rem 0.8rem;
        border-radius: 0.9rem;
    }

    .discover-stat strong {
        font-size: 1.05rem;
    }

    .discover-stat span {
        font-size: 0.72rem;
        letter-spacing: 0.08em;
    }

    .discover-stat:last-child {
        grid-column: 1 / -1;
    }

    .imdb-search-shell {
        min-height: 0;
        gap: 0.45rem;
        border-radius: 1.15rem;
    }

    .imdb-search-shell input {
        min-height: 3rem;
        padding: 0 0.9rem !important;
    }

    .imdb-search-shell button {
        min-width: 0;
        min-height: 3rem;
    }

    .quick-filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: none;
    }

    .quick-filter-row::-webkit-scrollbar {
        display: none;
    }

    .filter-chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .spotlight-grid {
        gap: 0.85rem;
    }

    .spotlight-card {
        grid-template-columns: 6.3rem 1fr;
        min-width: 0;
    }

    .spotlight-body {
        padding: 0.85rem 0.85rem 0.9rem;
    }

    .store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.9rem !important;
    }

    .imdb-card {
        min-width: 0;
    }

    .imdb-card-content {
        padding: 0.85rem 0.85rem 1rem;
        min-width: 0;
    }

    .imdb-card-title {
        min-height: auto;
        font-size: 1rem !important;
    }

    .imdb-card-summary {
        min-height: 4.5em;
        font-size: 0.88rem;
    }

    .imdb-card-actions {
        gap: 0.45rem;
    }

    .imdb-btn-watchlist,
    .imdb-btn-trailer {
        min-height: 2.55rem;
        font-size: 0.82rem;
    }

    .detail-page {
        padding-top: 1rem;
        padding-bottom: 2.75rem;
    }

    .back-link {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        margin-bottom: 1rem;
        padding: 0.68rem 0.95rem;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.03);
    }

    .store-detail {
        border-radius: 1.2rem;
    }

    .detail-hero {
        padding: 1rem;
        gap: 1rem;
    }

    .detail-main-column {
        order: 1;
        padding: 0;
    }

    .detail-poster-column {
        order: 2;
    }

    .detail-side-column {
        order: 3;
    }

    .detail-poster-card {
        max-width: 15rem;
        margin: 0 auto;
        border-radius: 1rem;
    }

    .store-image-large {
        min-height: 20rem;
    }

    .store-name {
        font-size: clamp(1.9rem, 8vw, 2.75rem) !important;
        line-height: 1.02;
    }

    .detail-meta-line {
        gap: 0.5rem;
        margin-bottom: 0.9rem;
    }

    .detail-meta-line span {
        min-height: 1.85rem;
        padding: 0 0.65rem;
        font-size: 0.76rem;
    }

    .detail-score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-score-card {
        padding: 0.9rem;
    }

    .detail-score-card strong {
        font-size: 1.35rem;
    }

    .detail-description {
        font-size: 0.95rem;
        line-height: 1.72;
    }

    .detail-credit-row {
        gap: 0.4rem;
        padding: 0.7rem 0;
    }

    .detail-credit-row strong {
        font-size: 0.72rem;
    }

    .detail-sidebar-card,
    .detail-panel {
        padding: 0.95rem;
    }

    .detail-sidebar-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .detail-sidebar-list span {
        text-align: left;
    }

    .social-share-compact {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .social-share-compact .social-btn {
        justify-content: center;
        padding: 0.8rem 0.6rem;
    }

    .detail-content-grid {
        padding: 0 1rem 1rem;
        gap: 1rem;
        overflow: hidden;
    }

    .comments-section {
        margin-top: 0.5rem;
    }

    .comment-form {
        padding: 1rem !important;
        border-left-width: 1px !important;
        border-radius: 1rem !important;
    }

    .quick-comments {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem !important;
    }

    .quick-comment-chip,
    .quick-comment-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.72rem !important;
        letter-spacing: 0.08em !important;
        padding: 0.7rem 0.55rem !important;
    }

    .star-rating-input {
        flex-wrap: wrap;
        gap: 2px;
    }

    .star-rating-input label {
        font-size: 1.55rem;
    }

    .comment-content {
        font-size: 0.92rem;
        line-height: 1.75;
    }

    .empty-state {
        padding: 3rem 1rem;
        border-radius: 1.2rem;
    }
}

@media (max-width: 560px) {
    .site-header .container {
        gap: 0.55rem;
    }

    .logo {
        max-width: 100%;
        font-size: 1rem;
    }

    .main-nav {
        width: 100%;
        left: auto;
        right: auto;
    }

    .showcase-heading {
        padding: 0;
    }

    .showcase-title {
        font-size: clamp(1.35rem, 7vw, 1.8rem);
    }

    .main-trailer-overlay {
        padding: 0.75rem 0.85rem;
        gap: 0.7rem;
        flex-direction: column;
    }

    .poster-thumbnail {
        width: 3rem;
        height: 4.5rem;
    }

    .trailer-title {
        font-size: 1rem;
    }

    .trailer-desc {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .hero-btn {
        min-height: 2rem;
        padding: 0.3rem 0.75rem;
        font-size: 0.72rem;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-btn {
        flex: 1;
        text-align: center;
    }

    .up-next-list {
        grid-auto-columns: minmax(calc(100vw - 1.7rem), calc(100vw - 1.7rem));
        padding: 0 0.85rem 0.9rem;
    }

    .search-command-center {
        padding: 0.85rem;
        border-radius: 1.15rem;
        margin: 1rem 0 1.5rem;
    }

    .discover-title {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
    }

    .discover-copy {
        font-size: 0.82rem;
    }

    .imdb-search-shell {
        padding: 0.55rem;
        flex-direction: column;
        border-radius: 1.2rem;
    }

    .imdb-search-badge {
        width: fit-content;
        min-height: 2.2rem;
        font-size: 0.72rem;
    }

    .imdb-search-shell input {
        min-height: 2.8rem;
    }

    .imdb-search-shell button {
        width: 100%;
        min-width: 0;
        min-height: 2.8rem;
    }

    .spotlight-card {
        grid-template-columns: 5.4rem 1fr;
    }

    .spotlight-body h3 {
        font-size: 1rem;
    }

    .detail-poster-card {
        max-width: 12rem;
    }

    .store-image-large {
        min-height: 17rem;
    }

    .detail-score-grid,
    .quick-comments {
        grid-template-columns: 1fr;
    }

    .social-share-compact {
        gap: 0.5rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .social-share-compact .social-btn {
        min-height: 3rem;
        padding: 0.7rem 0.35rem;
    }

    .comment-form,
    .detail-panel,
    .detail-sidebar-card {
        padding: 0.9rem !important;
    }

    .empty-state {
        padding: 2.5rem 0.9rem;
    }

    .store-name {
        font-size: clamp(1.65rem, 7vw, 2.2rem) !important;
    }

    .detail-hero {
        padding: 0.85rem;
        gap: 0.85rem;
    }

    .imdb-featured-container {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-status {
        width: 100%;
        text-align: center;
        margin-left: 0 !important;
    }
}

/* ======================
   AJAX Comment Toast
   ====================== */
.ajax-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    pointer-events: none;
}

.ajax-toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ajax-toast-success {
    background: #1a1a1a;
    color: #4ade80;
    border: 1px solid rgba(74,222,128,0.3);
}

.ajax-toast-error {
    background: #1a1a1a;
    color: #f87171;
    border: 1px solid rgba(248,113,113,0.3);
}

.ajax-toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ajax-toast-msg {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60vw;
}

/* New comment highlight animation */
.comment-item-new {
    animation: commentHighlight 2s ease-out;
}

@keyframes commentHighlight {
    0% {
        border-color: #f5c518 !important;
        box-shadow: 0 0 20px rgba(245,197,24,0.25);
        background: rgba(245,197,24,0.05);
    }
    100% {
        border-color: #2a2a2a !important;
        box-shadow: none;
        background: transparent;
    }
}
