/* ==========================================================================
   MovieFasta — customer interface
   All colours resolve from the CSS custom properties injected by the layout
   (which come from config/settings). Never hard-code a hex value here.
   ========================================================================== */

:root {
    --mf-radius:      14px;
    --mf-radius-sm:   10px;
    --mf-radius-lg:   22px;
    --mf-header-h:    72px;
    --mf-shadow:      0 18px 40px -22px rgba(0, 0, 0, .95);
    --mf-shadow-lg:   0 40px 80px -30px rgba(0, 0, 0, 1);
    --mf-ease:        cubic-bezier(.22, 1, .36, 1);
    --mf-accent-soft: color-mix(in srgb, var(--mf-accent) 16%, transparent);
    --mf-font:        'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mf-display:     'Outfit', 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

.mf-body {
    background: var(--mf-bg);
    color: var(--mf-text);
    font-family: var(--mf-font);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--mf-header-h);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .mf-display {
    font-family: var(--mf-display);
    font-weight: 700;
    letter-spacing: -.02em;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--mf-accent); }

.text-muted-2 { color: var(--mf-muted) !important; }
.text-accent  { color: var(--mf-accent) !important; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 2000;
    background: var(--mf-accent); color: #fff; padding: .75rem 1.25rem;
    border-radius: 0 0 var(--mf-radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
    outline: 2px solid var(--mf-accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* --------------------------------------------------------------- buttons -- */

.btn {
    --bs-btn-focus-box-shadow: none;
    font-family: var(--mf-display);
    font-weight: 600;
    border-radius: 999px;
    padding: .65rem 1.35rem;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: transform .18s var(--mf-ease), background .18s ease, border-color .18s ease, box-shadow .18s ease;
    min-height: 44px;                 /* comfortable touch target */
}
.btn:active { transform: scale(.975); }

.btn-accent {
    background: var(--mf-accent);
    color: #fff;
    box-shadow: 0 10px 26px -12px var(--mf-accent);
}
.btn-accent:hover,
.btn-accent:focus {
    background: color-mix(in srgb, var(--mf-accent) 86%, #fff);
    color: #fff;
}

.btn-ghost {
    background: rgba(255, 255, 255, .05);
    border-color: var(--mf-border);
    color: var(--mf-text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: var(--mf-text); border-color: rgba(255,255,255,.22); }

.btn-success-soft { background: color-mix(in srgb, var(--mf-success) 18%, transparent); color: var(--mf-success); border-color: color-mix(in srgb, var(--mf-success) 40%, transparent); }
.btn-success-soft:hover { background: color-mix(in srgb, var(--mf-success) 28%, transparent); color: var(--mf-success); }

.btn-lg-block { width: 100%; padding: .95rem 1.5rem; font-size: 1.02rem; }

.btn[disabled], .btn.is-loading { opacity: .62; pointer-events: none; }
.btn.is-loading::before {
    content: ''; width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid currentColor; border-top-color: transparent;
    animation: mf-spin .7s linear infinite;
}
@keyframes mf-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- header -- */

.mf-header {
    position: fixed; inset: 0 0 auto 0; z-index: 1030;
    height: var(--mf-header-h);
    background: color-mix(in srgb, var(--mf-bg) 82%, transparent);
    backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid transparent;
    transition: background .25s ease, border-color .25s ease;
}
.mf-header.is-scrolled {
    background: color-mix(in srgb, var(--mf-bg) 96%, transparent);
    border-bottom-color: var(--mf-border);
}
.mf-header-inner {
    height: var(--mf-header-h);
    display: flex; align-items: center; gap: 1.25rem;
}

.mf-brand { display: inline-flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.mf-brand:hover { color: inherit; }
.mf-brand-mark {
    width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center;
    background: var(--mf-accent); color: #fff; font-size: 1.05rem;
    box-shadow: 0 8px 22px -10px var(--mf-accent);
}
.mf-brand-text {
    font-family: var(--mf-display); font-weight: 800; font-size: 1.2rem;
    letter-spacing: -.03em; text-transform: uppercase;
}
.mf-brand-logo { height: 38px; width: auto; max-width: 170px; object-fit: contain; }

.mf-nav { display: flex; align-items: center; gap: .35rem; }
.mf-nav-link {
    padding: .5rem .9rem; border-radius: 999px;
    color: var(--mf-muted); font-weight: 500; font-size: .95rem;
    transition: color .18s ease, background .18s ease;
}
.mf-nav-link:hover { color: var(--mf-text); background: rgba(255,255,255,.06); }
.mf-nav-link.active { color: var(--mf-text); background: rgba(255,255,255,.09); }

.mf-header-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; flex-shrink: 0; }

.mf-burger {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255,255,255,.06); border: 1px solid var(--mf-border);
    color: var(--mf-text);
}

.mf-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(140deg, var(--mf-accent), color-mix(in srgb, var(--mf-accent) 45%, #7c1d24));
    color: #fff; border: none; font-weight: 700; font-size: .9rem;
    font-family: var(--mf-display);
    display: grid; place-items: center;
}

.mf-dropdown {
    background: var(--mf-card); border: 1px solid var(--mf-border);
    border-radius: var(--mf-radius); box-shadow: var(--mf-shadow); padding: .5rem;
    min-width: 235px;
}
.mf-dropdown-head { padding: .6rem .8rem .3rem; }
.mf-dropdown .dropdown-item {
    border-radius: var(--mf-radius-sm); color: var(--mf-muted);
    padding: .55rem .8rem; font-size: .93rem;
}
.mf-dropdown .dropdown-item:hover { background: rgba(255,255,255,.07); color: var(--mf-text); }
.mf-dropdown .dropdown-divider { border-color: var(--mf-border); }

/* ---------------------------------------------------------------- search -- */

.mf-search {
    position: relative; flex: 1 1 auto; max-width: 460px;
    display: none;
}
@media (min-width: 768px) { .mf-search { display: block; } }

.mf-search-input {
    width: 100%; height: 44px;
    background: rgba(255,255,255,.055);
    border: 1px solid var(--mf-border);
    border-radius: 999px;
    color: var(--mf-text);
    padding: 0 2.6rem 0 2.75rem;
    font-size: .93rem;
    transition: border-color .2s ease, background .2s ease;
}
.mf-search-input::placeholder { color: color-mix(in srgb, var(--mf-muted) 78%, transparent); }
.mf-search-input:focus {
    outline: none; background: rgba(255,255,255,.09);
    border-color: color-mix(in srgb, var(--mf-accent) 55%, transparent);
}
.mf-search-input::-webkit-search-cancel-button { display: none; }

.mf-search-icon {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--mf-muted); font-size: .88rem; pointer-events: none;
}
.mf-search-clear {
    position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,.09); border: none; color: var(--mf-muted);
    display: grid; place-items: center; font-size: .78rem;
}

.mf-suggestions {
    position: absolute; top: calc(100% + .6rem); left: 0; right: 0; z-index: 1040;
    background: var(--mf-card); border: 1px solid var(--mf-border);
    border-radius: var(--mf-radius); box-shadow: var(--mf-shadow-lg);
    overflow: hidden; max-height: 65vh; overflow-y: auto;
}
.mf-suggestion {
    display: flex; align-items: center; gap: .85rem;
    padding: .7rem .85rem; cursor: pointer;
    border-bottom: 1px solid color-mix(in srgb, var(--mf-border) 60%, transparent);
    transition: background .15s ease;
}
.mf-suggestion:last-child { border-bottom: none; }
.mf-suggestion:hover, .mf-suggestion.is-active { background: rgba(255,255,255,.06); }
.mf-suggestion img { width: 40px; height: 58px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.mf-suggestion-title { font-weight: 600; font-size: .92rem; }
.mf-suggestion-meta { font-size: .78rem; color: var(--mf-muted); }
.mf-suggestion-price { margin-left: auto; font-weight: 700; color: var(--mf-accent); font-size: .86rem; white-space: nowrap; }
.mf-suggestion-empty { padding: 1.25rem; text-align: center; color: var(--mf-muted); font-size: .9rem; }

/* Mobile: a full-width search row under the header */
.mf-mobile-search { padding: 0 0 1rem; }
@media (min-width: 768px) { .mf-mobile-search { display: none; } }
.mf-mobile-search .mf-search { display: block; max-width: none; }

/* ------------------------------------------------------------- offcanvas -- */

.mf-offcanvas {
    background: var(--mf-bg-alt); color: var(--mf-text);
    border-left: 1px solid var(--mf-border); width: min(320px, 86vw);
}
.mf-mobile-nav { display: flex; flex-direction: column; gap: .25rem; }
.mf-mobile-nav a {
    display: flex; align-items: center; gap: .85rem;
    padding: .9rem 1rem; border-radius: var(--mf-radius-sm);
    color: var(--mf-muted); font-weight: 500;
}
.mf-mobile-nav a:hover { background: rgba(255,255,255,.07); color: var(--mf-text); }
.mf-mobile-nav a i { width: 20px; text-align: center; color: var(--mf-accent); }
.mf-offcanvas-support { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--mf-border); }

/* ------------------------------------------------------------------ hero -- */

.mf-hero {
    position: relative; margin-bottom: 3rem;
    border-radius: var(--mf-radius-lg); overflow: hidden;
    min-height: 400px;
    background: linear-gradient(135deg, var(--mf-bg-alt), var(--mf-card));
}
@media (min-width: 992px) { .mf-hero { min-height: 480px; } }

.mf-hero-slide { position: relative; min-height: inherit; display: flex; align-items: flex-end; }
.mf-hero-bg { position: absolute; inset: 0; }
.mf-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.mf-hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, color-mix(in srgb, var(--mf-bg) 94%, transparent) 0%,
                                        color-mix(in srgb, var(--mf-bg) 72%, transparent) 45%,
                                        color-mix(in srgb, var(--mf-bg) 30%, transparent) 100%),
                linear-gradient(0deg, var(--mf-bg) 0%, transparent 55%);
}
.mf-hero-content { position: relative; padding: 2.5rem 1.75rem; max-width: 660px; }
@media (min-width: 768px) { .mf-hero-content { padding: 3.5rem 3rem; } }

.mf-hero-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--mf-accent-soft); color: var(--mf-accent);
    border: 1px solid color-mix(in srgb, var(--mf-accent) 35%, transparent);
    border-radius: 999px; padding: .35rem .9rem;
    font-size: .76rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    margin-bottom: 1.1rem;
}
.mf-hero-title {
    font-size: clamp(1.9rem, 5.2vw, 3.4rem); line-height: 1.05; margin-bottom: .9rem;
}
.mf-hero-sub { color: var(--mf-muted); font-size: clamp(.98rem, 2.2vw, 1.14rem); margin-bottom: 1.75rem; max-width: 520px; }

.mf-hero-dots { position: absolute; bottom: 1.25rem; right: 1.75rem; display: flex; gap: .45rem; z-index: 3; }
.mf-hero-dot {
    width: 8px; height: 8px; border-radius: 999px; border: none;
    background: rgba(255,255,255,.3); transition: width .3s var(--mf-ease), background .3s ease;
}
.mf-hero-dot.is-active { width: 26px; background: var(--mf-accent); }

/* ----------------------------------------------------------------- rails -- */

.mf-section { margin-bottom: 3.25rem; }
.mf-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.15rem;
}
.mf-section-title { font-size: clamp(1.15rem, 2.6vw, 1.5rem); margin: 0; }
.mf-section-link { color: var(--mf-muted); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.mf-section-link:hover { color: var(--mf-accent); }

.mf-rail {
    display: grid; grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: .5rem; margin: 0 -1rem; padding-inline: 1rem;
    scrollbar-width: none;
}
.mf-rail::-webkit-scrollbar { display: none; }
.mf-rail > * { scroll-snap-align: start; }

@media (min-width: 576px)  { .mf-rail { grid-auto-columns: minmax(165px, 1fr); } }
@media (min-width: 992px)  { .mf-rail { grid-auto-columns: minmax(190px, 1fr); margin: 0; padding-inline: 0; } }

/* ------------------------------------------------------------------ grid -- */

.movie-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
@media (min-width: 576px)  { .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px)  { .movie-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1200px) { .movie-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .movie-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ------------------------------------------------------------ movie card -- */

.movie-card { position: relative; }
.movie-card-link { display: block; }

.movie-poster {
    position: relative; aspect-ratio: 2 / 3; overflow: hidden;
    border-radius: var(--mf-radius);
    background: var(--mf-card);
    border: 1px solid var(--mf-border);
    transition: transform .35s var(--mf-ease), border-color .3s ease, box-shadow .35s var(--mf-ease);
}
.movie-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.movie-card:hover .movie-poster {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--mf-accent) 50%, transparent);
    box-shadow: var(--mf-shadow);
}

.movie-poster-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, color-mix(in srgb, var(--mf-bg) 92%, transparent) 0%, transparent 62%);
    display: flex; align-items: flex-end; justify-content: center;
    padding: 1rem .75rem;
    opacity: 0; transition: opacity .3s ease;
}
.movie-card:hover .movie-poster-overlay { opacity: 1; }

.movie-cta {
    display: inline-flex; align-items: center; gap: .45rem;
    background: var(--mf-accent); color: #fff;
    border-radius: 999px; padding: .45rem 1rem;
    font-size: .8rem; font-weight: 600; font-family: var(--mf-display);
    white-space: nowrap;
}

.movie-ribbon {
    position: absolute; top: .6rem; left: .6rem; z-index: 2;
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .28rem .6rem; border-radius: 999px;
    font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    backdrop-filter: blur(8px);
}
.movie-ribbon-featured { background: color-mix(in srgb, var(--mf-warning) 92%, transparent); color: #201400; }
.movie-ribbon-owned    { background: color-mix(in srgb, var(--mf-success) 92%, transparent); color: #04240f; }

.movie-body { padding: .7rem .15rem 0; }
.movie-title {
    font-size: .95rem; font-weight: 600; margin: 0 0 .18rem;
    display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden;
}
.movie-meta {
    font-size: .79rem; color: var(--mf-muted); margin: 0 0 .35rem;
    display: flex; align-items: center; gap: .3rem; flex-wrap: wrap;
}
.movie-dot { opacity: .5; }
.movie-price { font-size: .95rem; font-weight: 700; color: var(--mf-accent); margin: 0; font-family: var(--mf-display); }
.movie-price-owned { color: var(--mf-success); font-size: .86rem; display: inline-flex; align-items: center; gap: .35rem; }

/* skeleton loading */
.movie-skeleton .movie-poster { background: linear-gradient(100deg, var(--mf-card) 30%, rgba(255,255,255,.06) 50%, var(--mf-card) 70%); background-size: 220% 100%; animation: mf-shimmer 1.4s infinite; }
.movie-skeleton .sk-line { height: 11px; border-radius: 6px; background: var(--mf-card); margin-top: .55rem; animation: mf-shimmer 1.4s infinite; background-image: linear-gradient(100deg, var(--mf-card) 30%, rgba(255,255,255,.06) 50%, var(--mf-card) 70%); background-size: 220% 100%; }
.movie-skeleton .sk-line.short { width: 55%; }
@keyframes mf-shimmer { from { background-position: 180% 0; } to { background-position: -60% 0; } }

/* ------------------------------------------------------------- page head -- */

.mf-page-head { padding: 2.25rem 0 1.5rem; }
.mf-page-title { font-size: clamp(1.6rem, 4vw, 2.35rem); margin-bottom: .35rem; }
.mf-page-sub { color: var(--mf-muted); margin: 0; }

/* --------------------------------------------------------------- filters -- */

.mf-filters {
    background: var(--mf-card); border: 1px solid var(--mf-border);
    border-radius: var(--mf-radius); padding: 1.15rem; margin-bottom: 1.75rem;
}
.mf-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
@media (min-width: 768px)  { .mf-filter-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (min-width: 1200px) { .mf-filter-grid { grid-template-columns: repeat(7, minmax(0,1fr)); } }

.mf-label { display: block; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mf-muted); margin-bottom: .35rem; }

.form-control, .form-select, .mf-input {
    background: var(--mf-bg-alt);
    border: 1px solid var(--mf-border);
    color: var(--mf-text);
    border-radius: var(--mf-radius-sm);
    min-height: 46px;
    padding: .6rem .85rem;
    font-size: .93rem;
    transition: border-color .18s ease, background .18s ease;
}
.form-control:focus, .form-select:focus, .mf-input:focus {
    background: var(--mf-bg-alt); color: var(--mf-text);
    border-color: color-mix(in srgb, var(--mf-accent) 60%, transparent);
    box-shadow: 0 0 0 3px var(--mf-accent-soft);
}
.form-control::placeholder { color: color-mix(in srgb, var(--mf-muted) 72%, transparent); }
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23AAB2C0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
.form-control:disabled, .form-select:disabled { background: rgba(255,255,255,.03); color: var(--mf-muted); }
textarea.form-control { min-height: 120px; }

.mf-chip-row { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: none; }
.mf-chip-row::-webkit-scrollbar { display: none; }
.mf-chip {
    flex-shrink: 0; padding: .5rem 1rem; border-radius: 999px;
    background: rgba(255,255,255,.05); border: 1px solid var(--mf-border);
    color: var(--mf-muted); font-size: .86rem; font-weight: 500; white-space: nowrap;
    transition: all .18s ease;
}
.mf-chip:hover { color: var(--mf-text); border-color: rgba(255,255,255,.2); }
.mf-chip.is-active { background: var(--mf-accent); border-color: var(--mf-accent); color: #fff; }

.mf-active-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.mf-active-filter {
    display: inline-flex; align-items: center; gap: .45rem;
    background: var(--mf-accent-soft); border: 1px solid color-mix(in srgb, var(--mf-accent) 35%, transparent);
    color: var(--mf-text); border-radius: 999px; padding: .35rem .5rem .35rem .85rem; font-size: .82rem;
}
.mf-active-filter button { background: none; border: none; color: var(--mf-muted); padding: 0 .2rem; line-height: 1; }
.mf-active-filter button:hover { color: var(--mf-accent); }

/* ---------------------------------------------------------- movie detail -- */

.mf-detail-hero { position: relative; margin: -0rem 0 2.5rem; }
.mf-detail-backdrop { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 var(--mf-radius-lg) var(--mf-radius-lg); }
.mf-detail-backdrop img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.mf-detail-backdrop::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(0deg, var(--mf-bg) 4%, color-mix(in srgb, var(--mf-bg) 55%, transparent) 60%, color-mix(in srgb, var(--mf-bg) 80%, transparent) 100%);
}
.mf-detail-inner { position: relative; padding: 2.5rem 0 0; }

.mf-detail-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 992px) { .mf-detail-grid { grid-template-columns: 300px 1fr; gap: 3rem; } }

.mf-detail-poster {
    width: 190px; border-radius: var(--mf-radius); overflow: hidden;
    border: 1px solid var(--mf-border); box-shadow: var(--mf-shadow-lg);
    aspect-ratio: 2/3; background: var(--mf-card);
}
@media (min-width: 992px) { .mf-detail-poster { width: 100%; } }
.mf-detail-poster img { width: 100%; height: 100%; object-fit: cover; }

.mf-detail-title { font-size: clamp(1.75rem, 5vw, 3rem); line-height: 1.06; margin-bottom: .6rem; }
.mf-detail-tagline { color: var(--mf-muted); font-size: 1.02rem; margin-bottom: 1.25rem; max-width: 640px; }

.mf-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: 1.5rem; }
.mf-meta-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255,255,255,.06); border: 1px solid var(--mf-border);
    border-radius: 999px; padding: .35rem .85rem; font-size: .83rem; color: var(--mf-muted);
}
.mf-meta-pill strong { color: var(--mf-text); font-weight: 600; }

.mf-spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--mf-border); border: 1px solid var(--mf-border); border-radius: var(--mf-radius); overflow: hidden; margin-bottom: 1.75rem; }
@media (min-width: 768px) { .mf-spec-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.mf-spec { background: var(--mf-card); padding: .95rem 1.1rem; }
.mf-spec-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mf-muted); margin-bottom: .2rem; }
.mf-spec-value { font-weight: 600; font-size: .95rem; }

.mf-buy-card {
    background: var(--mf-card); border: 1px solid var(--mf-border);
    border-radius: var(--mf-radius); padding: 1.5rem; margin-bottom: 1.75rem;
}
.mf-price-tag { font-family: var(--mf-display); font-size: 2.1rem; font-weight: 800; color: var(--mf-accent); line-height: 1; }
.mf-price-note { color: var(--mf-muted); font-size: .84rem; }

.mf-owned-banner {
    display: flex; align-items: center; gap: .75rem;
    background: color-mix(in srgb, var(--mf-success) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--mf-success) 38%, transparent);
    color: var(--mf-success); border-radius: var(--mf-radius-sm);
    padding: .85rem 1.1rem; margin-bottom: 1.1rem; font-weight: 600;
}

.mf-cast { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: none; }
.mf-cast::-webkit-scrollbar { display: none; }
.mf-cast-item { flex-shrink: 0; width: 92px; text-align: center; }
.mf-cast-photo {
    width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
    background: var(--mf-card); border: 1px solid var(--mf-border);
    display: grid; place-items: center; font-family: var(--mf-display);
    font-weight: 700; color: var(--mf-muted); font-size: 1.35rem; margin-bottom: .5rem;
}
.mf-cast-name { font-size: .8rem; font-weight: 500; line-height: 1.3; }

/* Sticky mobile buy bar */
.mf-sticky-buy {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1035;
    background: color-mix(in srgb, var(--mf-bg-alt) 96%, transparent);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--mf-border);
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 1rem;
    transform: translateY(110%); transition: transform .3s var(--mf-ease);
}
.mf-sticky-buy.is-visible { transform: translateY(0); }
@media (min-width: 992px) { .mf-sticky-buy { display: none; } }
.mf-sticky-buy .btn { flex: 1; }

/* --------------------------------------------------------------- trailer -- */

.mf-trailer-modal .modal-content { background: #000; border: 1px solid var(--mf-border); border-radius: var(--mf-radius); overflow: hidden; }
.mf-trailer-frame { position: relative; padding-top: 56.25%; background: #000; }
.mf-trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --------------------------------------------------------------- modals -- */

.mf-modal { background: var(--mf-card); border: 1px solid var(--mf-border); border-radius: var(--mf-radius); color: var(--mf-text); }
.modal-backdrop.show { opacity: .78; }

/* ---------------------------------------------------------------- toasts -- */

.toast-host {
    position: fixed; z-index: 1090; right: 1rem; bottom: 1rem;
    display: flex; flex-direction: column; gap: .6rem; max-width: min(380px, calc(100vw - 2rem));
}
@media (max-width: 575px) { .toast-host { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; } }

.mf-toast {
    display: flex; align-items: flex-start; gap: .75rem;
    background: var(--mf-card); border: 1px solid var(--mf-border);
    border-left: 3px solid var(--mf-muted);
    border-radius: var(--mf-radius-sm); padding: .85rem 1rem;
    box-shadow: var(--mf-shadow); font-size: .9rem;
    animation: mf-toast-in .35s var(--mf-ease);
}
.mf-toast.is-leaving { animation: mf-toast-out .25s ease forwards; }
.mf-toast i { margin-top: .15rem; }
.mf-toast-success { border-left-color: var(--mf-success); }
.mf-toast-success i { color: var(--mf-success); }
.mf-toast-error   { border-left-color: var(--mf-danger); }
.mf-toast-error i { color: var(--mf-danger); }
.mf-toast-warning { border-left-color: var(--mf-warning); }
.mf-toast-warning i { color: var(--mf-warning); }
.mf-toast-info    { border-left-color: var(--mf-accent); }
.mf-toast-info i { color: var(--mf-accent); }
.mf-toast-close { margin-left: auto; background: none; border: none; color: var(--mf-muted); padding: 0 0 0 .5rem; }

@keyframes mf-toast-in  { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes mf-toast-out { to   { opacity: 0; transform: translateX(20px); } }

/* -------------------------------------------------------------- auth page -- */

.mf-auth {
    min-height: calc(100vh - var(--mf-header-h) - 60px);
    display: flex; align-items: center; justify-content: center;
    padding: 2.5rem 1rem;
}
.mf-auth-card {
    width: 100%; max-width: 440px;
    background: var(--mf-card); border: 1px solid var(--mf-border);
    border-radius: var(--mf-radius-lg); padding: 2rem 1.75rem;
    box-shadow: var(--mf-shadow-lg);
}
@media (min-width: 576px) { .mf-auth-card { padding: 2.5rem; } }
.mf-auth-title { font-size: 1.65rem; margin-bottom: .35rem; }
.mf-auth-sub { color: var(--mf-muted); font-size: .94rem; margin-bottom: 1.75rem; }

.mf-field { margin-bottom: 1.1rem; }
.mf-field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: .4rem; }
.mf-field .invalid-feedback { display: block; font-size: .82rem; color: var(--mf-danger); margin-top: .35rem; min-height: 0; }
.mf-field .form-control.is-invalid { border-color: var(--mf-danger); box-shadow: none; background-image: none; }

.mf-password-wrap { position: relative; }
.mf-password-wrap .form-control { padding-right: 3rem; }
.mf-password-toggle {
    position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 9px;
    background: none; border: none; color: var(--mf-muted);
}
.mf-password-toggle:hover { color: var(--mf-text); }

.mf-phone-hint { font-size: .8rem; color: var(--mf-muted); margin-top: .35rem; }

.mf-auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--mf-muted); font-size: .82rem; }
.mf-auth-divider::before, .mf-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--mf-border); }

/* -------------------------------------------------------------- checkout -- */

.mf-checkout { max-width: 560px; margin: 0 auto; padding: 2rem 0 4rem; }
.mf-checkout-card {
    background: var(--mf-card); border: 1px solid var(--mf-border);
    border-radius: var(--mf-radius-lg); padding: 1.75rem; box-shadow: var(--mf-shadow);
}
.mf-checkout-movie { display: flex; gap: 1rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--mf-border); margin-bottom: 1.25rem; }
.mf-checkout-movie img { width: 74px; height: 111px; object-fit: cover; border-radius: var(--mf-radius-sm); flex-shrink: 0; }

.mf-total-row { display: flex; align-items: baseline; justify-content: space-between; padding: 1rem 0; border-top: 1px solid var(--mf-border); margin-top: .5rem; }
.mf-total-label { color: var(--mf-muted); font-size: .95rem; }
.mf-total-value { font-family: var(--mf-display); font-size: 1.8rem; font-weight: 800; color: var(--mf-accent); }

.mf-waiting { text-align: center; padding: 1.5rem 0; }
.mf-pulse {
    width: 82px; height: 82px; border-radius: 50%; margin: 0 auto 1.25rem;
    display: grid; place-items: center; font-size: 1.9rem; color: var(--mf-accent);
    background: var(--mf-accent-soft);
    animation: mf-pulse 1.9s ease-in-out infinite;
}
@keyframes mf-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--mf-accent-soft); }
    50%      { box-shadow: 0 0 0 18px transparent; }
}

.mf-steps { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.75rem; }
.mf-step { flex: 1; text-align: center; }
.mf-step-dot {
    width: 30px; height: 30px; border-radius: 50%; margin: 0 auto .4rem;
    display: grid; place-items: center; font-size: .78rem; font-weight: 700;
    background: rgba(255,255,255,.07); color: var(--mf-muted); border: 1px solid var(--mf-border);
}
.mf-step.is-done .mf-step-dot { background: var(--mf-success); color: #04240f; border-color: var(--mf-success); }
.mf-step.is-active .mf-step-dot { background: var(--mf-accent); color: #fff; border-color: var(--mf-accent); }
.mf-step-label { font-size: .74rem; color: var(--mf-muted); }
.mf-step.is-active .mf-step-label, .mf-step.is-done .mf-step-label { color: var(--mf-text); }

.mf-success-icon {
    width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 1.5rem;
    display: grid; place-items: center; font-size: 2.4rem;
    background: color-mix(in srgb, var(--mf-success) 16%, transparent); color: var(--mf-success);
}

/* ------------------------------------------------------------- my movies -- */

.mf-library-item {
    display: flex; gap: 1rem; align-items: center;
    background: var(--mf-card); border: 1px solid var(--mf-border);
    border-radius: var(--mf-radius); padding: 1rem; margin-bottom: 1rem;
    transition: border-color .2s ease;
}
.mf-library-item:hover { border-color: rgba(255,255,255,.18); }
.mf-library-item img { width: 76px; height: 114px; object-fit: cover; border-radius: var(--mf-radius-sm); flex-shrink: 0; }
.mf-library-body { flex: 1; min-width: 0; }
.mf-library-title { font-size: 1.02rem; font-weight: 600; margin-bottom: .25rem; }
.mf-library-meta { font-size: .82rem; color: var(--mf-muted); display: flex; flex-wrap: wrap; gap: .4rem; }
.mf-library-actions { display: flex; flex-direction: column; gap: .5rem; flex-shrink: 0; }
@media (max-width: 575px) {
    .mf-library-item { flex-wrap: wrap; }
    .mf-library-actions { width: 100%; flex-direction: row; }
    .mf-library-actions .btn { flex: 1; }
}

/* --------------------------------------------------------------- account -- */

.mf-panel { background: var(--mf-card); border: 1px solid var(--mf-border); border-radius: var(--mf-radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.mf-panel-title { font-size: 1.08rem; margin-bottom: 1.25rem; display: flex; align-items: center; gap: .6rem; }
.mf-panel-title i { color: var(--mf-accent); }

.mf-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .mf-stat-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.mf-stat { background: var(--mf-card); border: 1px solid var(--mf-border); border-radius: var(--mf-radius); padding: 1.15rem; }
.mf-stat-label { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--mf-muted); margin-bottom: .35rem; }
.mf-stat-value { font-family: var(--mf-display); font-size: 1.6rem; font-weight: 800; }

/* ---------------------------------------------------------- empty states -- */

.mf-empty {
    text-align: center; padding: 3.5rem 1.5rem;
    background: var(--mf-card); border: 1px dashed var(--mf-border);
    border-radius: var(--mf-radius-lg);
}
.mf-empty-icon {
    width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 1.25rem;
    display: grid; place-items: center; font-size: 1.9rem;
    background: rgba(255,255,255,.05); color: var(--mf-muted);
}
.mf-empty h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.mf-empty p { color: var(--mf-muted); max-width: 420px; margin: 0 auto 1.5rem; }

/* ---------------------------------------------------------------- badges -- */

.badge {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .7rem; border-radius: 999px;
    font-size: .74rem; font-weight: 600; letter-spacing: .03em;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: color-mix(in srgb, var(--mf-success) 15%, transparent); color: var(--mf-success); }
.badge-warning { background: color-mix(in srgb, var(--mf-warning) 15%, transparent); color: var(--mf-warning); }
.badge-danger  { background: color-mix(in srgb, var(--mf-danger) 15%, transparent);  color: var(--mf-danger); }
.badge-muted   { background: rgba(255,255,255,.07); color: var(--mf-muted); }

/* ----------------------------------------------------------- categories -- */

.mf-category-card {
    position: relative; display: block; overflow: hidden;
    border-radius: var(--mf-radius); border: 1px solid var(--mf-border);
    background: linear-gradient(135deg, var(--mf-card), var(--mf-bg-alt));
    padding: 1.5rem; min-height: 132px;
    transition: transform .3s var(--mf-ease), border-color .25s ease;
}
.mf-category-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--mf-accent) 45%, transparent); color: inherit; }
.mf-category-card h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.mf-category-card p { color: var(--mf-muted); font-size: .84rem; margin: 0; }
.mf-category-count { position: absolute; top: 1.1rem; right: 1.25rem; font-family: var(--mf-display); font-size: 1.9rem; font-weight: 800; color: rgba(255,255,255,.07); }

/* ---------------------------------------------------------------- footer -- */

.mf-footer { background: var(--mf-bg-alt); border-top: 1px solid var(--mf-border); padding: 3.5rem 0 1.5rem; margin-top: 4rem; }
.mf-footer-title { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mf-muted); margin-bottom: 1rem; }
.mf-footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.mf-footer-links a { color: var(--mf-muted); font-size: .9rem; }
.mf-footer-links a:hover { color: var(--mf-accent); }
.mf-pay-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.mf-pay-badge { font-size: .72rem; padding: .28rem .6rem; border-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid var(--mf-border); color: var(--mf-muted); }
.mf-footer-bottom {
    display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between;
    margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--mf-border);
    font-size: .84rem; color: var(--mf-muted);
}

/* ------------------------------------------------------------ error page -- */

.mf-error { min-height: 65vh; display: grid; place-items: center; text-align: center; padding: 3rem 1rem; }
.mf-error-code { font-family: var(--mf-display); font-size: clamp(4rem, 18vw, 8rem); font-weight: 800; line-height: 1; color: var(--mf-accent); opacity: .25; }
.mf-error h1 { font-size: clamp(1.4rem, 4vw, 2rem); margin: -.5rem 0 .75rem; }

/* ------------------------------------------------------------- utilities -- */

.mf-divider { height: 1px; background: var(--mf-border); border: 0; margin: 2rem 0; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.mf-body::-webkit-scrollbar { width: 10px; }
.mf-body::-webkit-scrollbar-track { background: var(--mf-bg); }
.mf-body::-webkit-scrollbar-thumb { background: var(--mf-border); border-radius: 999px; }
.mf-body::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--mf-muted) 55%, transparent); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
