/* ============================================================
   ParrotFm Design System — Bootstrap 5 Extension
   A custom CSS layer that overrides Bootstrap 5 defaults
   and defines the ParrotFm dark podcast platform identity.
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
    /* ── Brand Colors ── */
    --pfm-primary: #22c55e;
    --pfm-primary-hover: #16a34a;
    --pfm-primary-dark: #14532d;
    --pfm-primary-glow: rgba(34, 197, 94, 0.18);

    /* ── Backgrounds & Surfaces ── */
    --pfm-bg: #0a0a0a;
    --pfm-surface: #111111;
    --pfm-surface-2: #1c1c1c;
    --pfm-surface-3: #252525;
    --pfm-border: #2a2a2a;
    --pfm-border-light: #333333;

    /* ── Text ── */
    --pfm-text: #ffffff;
    --pfm-text-secondary: #d1d5db;
    --pfm-text-muted: #9ca3af;
    --pfm-text-subtle: #6b7280;

    /* ── Bootstrap CSS Variable Overrides ── */
    --bs-body-bg: var(--pfm-bg);
    --bs-body-color: var(--pfm-text);
    --bs-primary: #22c55e;
    --bs-primary-rgb: 34, 197, 94;
    --bs-secondary-rgb: 156, 163, 175;
    --bs-link-color: var(--pfm-primary);
    --bs-link-hover-color: var(--pfm-primary-hover);
    --bs-border-color: var(--pfm-border);
    --bs-border-radius: 10px;
    --bs-border-radius-lg: 14px;
    --bs-border-radius-sm: 6px;
    --bs-border-radius-xl: 18px;
    --bs-font-sans-serif: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* ── Component Tokens ── */
    --pfm-nav-height: 68px;
    --pfm-card-radius: 12px;
    --pfm-hero-height: 520px;

    /* ── Shadows ── */
    --pfm-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --pfm-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
    --pfm-shadow-play: 0 4px 16px rgba(0, 0, 0, 0.6);

    /* ── Transitions ── */
    --pfm-transition: 0.22s ease;
}

/* ============================================================
   BASE RESET & GLOBAL
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--pfm-bg);
    color: var(--pfm-text);
    font-family: var(--bs-font-sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--bs-font-sans-serif);
    font-weight: 700;
    color: var(--pfm-text);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--pfm-transition);
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--pfm-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--pfm-surface-3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pfm-border-light);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.pfm-navbar {
    background-color: var(--pfm-surface);
    border-bottom: 1px solid var(--pfm-border);
    min-height: var(--pfm-nav-height);
    padding: 0;
    z-index: 1030;
}

.pfm-navbar .container {
    min-height: var(--pfm-nav-height);
    gap: 1.5rem;
}

/* Brand */
.pfm-navbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pfm-text);
    letter-spacing: -0.3px;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}

.pfm-navbar-brand img {
    width: 100px;
    height: 100%;
    object-fit: contain;
}

/* Nav links */
.pfm-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pfm-nav-links .nav-link {
    color: var(--pfm-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    transition: color var(--pfm-transition), background-color var(--pfm-transition);
}

.pfm-nav-links .nav-link:hover {
    color: var(--pfm-text);
    background-color: var(--pfm-surface-2);
}

.pfm-nav-links .nav-link.active {
    color: var(--pfm-text);
    font-weight: 600;
}

/* Right-side nav controls wrapper */
.pfm-nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Hamburger button (mobile only) */
.pfm-hamburger {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    border-radius: 8px;
    color: var(--pfm-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: all var(--pfm-transition);
    flex-shrink: 0;
    padding: 0;
}

.pfm-hamburger:hover {
    background: var(--pfm-surface-3);
    border-color: var(--pfm-border-light);
}

/* Search */
/* (always in DOM; hidden on mobile via responsive override below) */
.pfm-search {
    position: relative;
    width: 220px;
    flex-shrink: 0;
}

.pfm-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pfm-text-subtle);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 2;
}

.pfm-search .form-control {
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    border-radius: 50px;
    color: var(--pfm-text);
    font-size: 0.825rem;
    padding: 0.38rem 1rem 0.38rem 2.2rem;
    height: 36px;
    transition: border-color var(--pfm-transition), box-shadow var(--pfm-transition);
}

.pfm-search .form-control::placeholder {
    color: var(--pfm-text-subtle);
    font-size: 0.8rem;
}

.pfm-search .form-control:focus {
    background: var(--pfm-surface-2);
    border-color: var(--pfm-primary);
    box-shadow: 0 0 0 3px var(--pfm-primary-glow);
    color: var(--pfm-text);
    outline: none;
}

/* Icon button */
.pfm-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    border-radius: 50%;
    color: var(--pfm-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--pfm-transition);
    flex-shrink: 0;
}

.pfm-icon-btn:hover {
    color: var(--pfm-text);
    border-color: var(--pfm-border-light);
    background: var(--pfm-surface-3);
}

/* Account button */
.pfm-account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--pfm-text);
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: opacity var(--pfm-transition);
}

.pfm-account-btn:hover {
    opacity: 0.8;
}

.pfm-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pfm-border-light);
    background: var(--pfm-primary-dark);
}

/* ============================================================
   HERO CAROUSEL
   ============================================================ */

.pfm-hero {
    height: var(--pfm-hero-height);
    position: relative;
    overflow: hidden;
    background: var(--pfm-surface);
}

.pfm-hero .carousel,
.pfm-hero .carousel-inner,
.pfm-hero .carousel-item {
    height: 100%;
}

.pfm-hero-slide {
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    padding-bottom: 3.5rem;
}

/* Dark gradient overlay – dark on left, fades right and from bottom */
.pfm-hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right,
            rgba(10, 10, 10, 0.95) 0%,
            rgba(10, 10, 10, 0.80) 35%,
            rgba(10, 10, 10, 0.35) 60%,
            rgba(10, 10, 10, 0.05) 100%),
        linear-gradient(to top,
            rgba(10, 10, 10, 0.75) 0%,
            rgba(10, 10, 10, 0) 45%);
    z-index: 1;
}

.pfm-hero-slide .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
}

.pfm-hero-content {
    max-width: 520px;
    padding-bottom: 1rem;
}

.pfm-hero-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pfm-primary);
    margin-bottom: 0.75rem;
}

.pfm-hero-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 1rem;
}

.pfm-hero-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
    margin-bottom: 1.75rem;
    max-width: 440px;
}

/* Hero action buttons */
.pfm-btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.58rem 1.35rem;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--pfm-transition);
    white-space: nowrap;
    border: none;
}

.pfm-btn-watch {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    backdrop-filter: blur(6px);
}

.pfm-btn-watch:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.45);
}

.pfm-btn-watch .bi-play-fill {
    color: var(--pfm-primary);
    font-size: 1rem;
}

.pfm-btn-mylist {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(6px);
}

.pfm-btn-mylist:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

/* Carousel indicators */
.pfm-hero .carousel-indicators {
    margin-bottom: 1rem;
    gap: 7px;
    z-index: 10;
    justify-content: center;
}

.pfm-hero .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border-top: none;
    border-bottom: none;
    opacity: 1;
    transition: all 0.35s ease;
    flex-shrink: 0;
    margin: 0;
}

.pfm-hero .carousel-indicators .active {
    background-color: var(--pfm-primary);
    width: 26px;
    border-radius: 4px;
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */

.pfm-section {
    padding-top: 2.75rem;
    padding-bottom: 0.25rem;
}

.pfm-section-header {
    margin-bottom: 1.1rem;
}

.pfm-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pfm-text);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.pfm-section-subtitle {
    font-size: 0.8rem;
    color: var(--pfm-text-muted);
    margin-bottom: 0;
    line-height: 1.4;
}

/* ============================================================
   PODCAST CARD
   ============================================================ */

.pfm-card {
    background: transparent;
    border: none;
    border-radius: var(--pfm-card-radius);
    overflow: visible;
    cursor: pointer;
    transition: transform var(--pfm-transition);
    position: relative;
}

.pfm-card:hover {
    transform: translateY(-5px);
}

/* Thumbnail wrapper */
.pfm-thumb-wrap {
    position: relative;
    border-radius: var(--pfm-card-radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--pfm-surface-2);
}

.pfm-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--pfm-card-radius);
    transition: transform 0.35s ease;
}

.pfm-card:hover .pfm-thumb-wrap img {
    transform: scale(1.05);
}

/* Hover overlay */
.pfm-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--pfm-transition);
    border-radius: var(--pfm-card-radius);
}

.pfm-card:hover .pfm-thumb-overlay {
    opacity: 1;
}

/* Play button */
.pfm-play-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--pfm-shadow-play);
    color: #0a0a0a;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform var(--pfm-transition), box-shadow var(--pfm-transition);
}

.pfm-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

/* Duration badge */
.pfm-badge-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.78);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
    line-height: 1.5;
}

/* Episode / rank badge (top-left) */
.pfm-badge-ep {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    backdrop-filter: blur(4px);
}

/* Card body */
.pfm-card-body {
    padding: 0.6rem 0 0;
}

.pfm-show-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pfm-text);
    margin-bottom: 0.3rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pfm-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.pfm-ep-tag {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--pfm-text-subtle);
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    padding: 1px 7px;
    border-radius: 4px;
    line-height: 1.6;
}

.pfm-meta-text {
    font-size: 0.72rem;
    color: var(--pfm-text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Continue Watching progress bar ── */
.pfm-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0 0 var(--pfm-card-radius) var(--pfm-card-radius);
    overflow: hidden;
}

.pfm-progress-fill {
    height: 100%;
    background: var(--pfm-primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ============================================================
   FOOTER
   ============================================================ */

.pfm-footer {
    background: var(--pfm-surface);
    border-top: 1px solid var(--pfm-border);
    margin-top: 4rem;
}

.pfm-footer-main {
    padding: 3.5rem 0 2.5rem;
}

.pfm-footer-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pfm-text);
    text-decoration: none;
    margin-bottom: 0.8rem;
}

.pfm-footer-brand img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.pfm-footer-tagline {
    font-size: 0.82rem;
    color: var(--pfm-text-muted);
    line-height: 1.65;
    max-width: 290px;
    margin-bottom: 1.5rem;
}

/* Social links */
.pfm-social-links {
    display: flex;
    gap: 8px;
}

.pfm-social-link {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    color: var(--pfm-text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--pfm-transition);
}

.pfm-social-link:hover {
    color: var(--pfm-text);
    border-color: var(--pfm-border-light);
    background: var(--pfm-surface-3);
}

/* Subscribe form */
.pfm-subscribe-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pfm-subscribe-form .pfm-email-input {
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    color: var(--pfm-text);
    font-family: inherit;
    font-size: 0.83rem;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    flex: 1;
    min-width: 0;
    outline: none;
    transition: border-color var(--pfm-transition), box-shadow var(--pfm-transition);
}

.pfm-subscribe-form .pfm-email-input::placeholder {
    color: var(--pfm-text-subtle);
}

.pfm-subscribe-form .pfm-email-input:focus {
    border-color: var(--pfm-primary);
    box-shadow: 0 0 0 3px var(--pfm-primary-glow);
}

.pfm-btn-subscribe {
    background: var(--pfm-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--pfm-transition), transform var(--pfm-transition);
    flex-shrink: 0;
}

.pfm-btn-subscribe:hover {
    background: var(--pfm-primary-hover);
    transform: translateY(-1px);
}

/* Footer nav */
.pfm-footer-nav {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.pfm-footer-nav a {
    font-size: 0.835rem;
    color: var(--pfm-text-muted);
    text-decoration: none;
    transition: color var(--pfm-transition);
}

.pfm-footer-nav a:hover {
    color: var(--pfm-text);
}

/* Footer bottom bar */
.pfm-footer-bottom {
    border-top: 1px solid var(--pfm-border);
    padding: 1.25rem 0;
}

.pfm-footer-copy {
    font-size: 0.775rem;
    color: var(--pfm-text-subtle);
    margin: 0;
}

/* ============================================================
   UTILITIES & HELPERS
   ============================================================ */

/* Thin horizontal rule */
.pfm-divider {
    border-color: var(--pfm-border);
    opacity: 1;
}

/* For screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 991.98px) {

    /* ── Mobile nav collapse panel ── */
    .pfm-navbar .navbar-collapse {
        background: var(--pfm-surface);
        border-top: 1px solid var(--pfm-border);
        padding: 0.75rem 0 1.25rem;
        margin-top: 1px;
    }

    .pfm-nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0 0.25rem;
        gap: 0.1rem;
        margin-bottom: 0.5rem;
    }

    .pfm-nav-links li {
        width: 100%;
    }

    .pfm-nav-links .nav-link {
        font-size: 0.95rem;
        padding: 0.65rem 0.9rem;
        display: block;
        width: 100%;
    }

    .pfm-nav-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0.75rem 0.25rem 0;
        border-top: 1px solid var(--pfm-border);
        gap: 0.75rem;
    }

    .pfm-nav-controls .pfm-search {
        width: 100%;
    }

    .pfm-nav-controls .pfm-search .form-control {
        border-radius: 8px;
        width: 100%;
    }

    .pfm-nav-controls .pfm-icon-btn,
    .pfm-nav-controls .pfm-account-btn {
        align-self: flex-start;
    }

    .pfm-hero {
        --pfm-hero-height: 420px;
    }

    .pfm-hero-title {
        font-size: 1.75rem;
    }

    .pfm-hero-content {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .pfm-hero {
        --pfm-hero-height: 360px;
    }

    .pfm-hero-title {
        font-size: 1.5rem;
    }

    .pfm-hero-desc {
        font-size: 0.825rem;
    }

    .pfm-hero-slide {
        padding-bottom: 2.5rem;
    }

    .pfm-btn-hero {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .pfm-section {
        padding-top: 2rem;
    }

    .pfm-footer-main {
        padding: 2.5rem 0 2rem;
    }

    .pfm-subscribe-form {
        flex-direction: column;
        align-items: stretch;
    }

    .pfm-footer-nav {
        margin-top: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .pfm-hero {
        --pfm-hero-height: 300px;
    }

    .pfm-hero-label {
        display: none;
    }

    .pfm-hero-desc {
        display: none;
    }

    .pfm-hero-title {
        font-size: 1.3rem;
    }
}

/* ============================================================
   SHOW DETAIL — HERO
   ============================================================ */

.pfm-show-hero {
    position: relative;
    background: radial-gradient(ellipse at 25% 55%, #1a2d10 0%, #100820 50%, #080810 100%);
    overflow: hidden;
    padding: 0 0 2.5rem;
}

/* Subtle texture overlay */
.pfm-show-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(10, 8, 20, 0.55) 0%, rgba(10, 8, 20, 0.25) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.65) 100%);
    pointer-events: none;
    z-index: 1;
}

.pfm-show-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 1.5rem;
}

/* Back button */
.pfm-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    text-decoration: none;
    margin-bottom: 1.75rem;
    transition: background var(--pfm-transition), color var(--pfm-transition);
}

.pfm-back-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* Two-column layout */
.pfm-show-hero-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Cover art */
.pfm-show-cover {
    width: 180px;
    flex-shrink: 0;
    border-radius: var(--pfm-card-radius);
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* Info column */
.pfm-show-info {
    flex: 1;
    min-width: 0;
    padding-top: 0.25rem;
}

.pfm-show-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.pfm-show-name {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    color: var(--pfm-text);
    margin: 0;
    line-height: 1.15;
}

.pfm-show-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pfm-text-muted);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.pfm-show-desc {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--pfm-text-muted);
    margin-bottom: 1.25rem;
}

.pfm-show-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--pfm-text-muted);
}

.pfm-star-icon {
    color: #f59e0b;
    font-size: 0.8rem;
}

.pfm-rating-score {
    font-weight: 600;
    color: var(--pfm-text);
}

.pfm-rating-sep {
    color: var(--pfm-text-subtle);
}

/* ── Creator card ── */
.pfm-creator-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    border-radius: var(--pfm-card-radius);
    padding: 1.25rem;
}

.pfm-creator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.pfm-creator-body {
    flex: 1;
    min-width: 0;
}

.pfm-creator-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pfm-text);
    margin: 0 0 0.5rem;
}

.pfm-creator-bio {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--pfm-text-muted);
    margin: 0;
}

/* ── Show hero responsive ── */
@media (max-width: 767.98px) {
    .pfm-show-hero-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .pfm-show-cover {
        width: 150px;
    }

    .pfm-show-title-row {
        justify-content: center;
    }

    .pfm-show-rating {
        justify-content: center;
    }
}

/* ============================================================
   VIDEO DETAIL — PLAYER
   ============================================================ */

/* ── Native video player ── */
.pfm-video-section {
    background: #000;
    line-height: 0;
}

.pfm-video {
    display: block;
    width: 100%;
    max-height: 75vh;
    background: #000;
    object-fit: contain;
}

/* ============================================================
   EXPLORE PAGE
   ============================================================ */

.pfm-explore-header {
    padding: 3rem 0 2rem;
}

.pfm-explore-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--pfm-text);
    margin-bottom: 0.35rem;
}

.pfm-explore-subtitle {
    font-size: 0.95rem;
    color: var(--pfm-text-muted);
    margin-bottom: 1.75rem;
}

.pfm-explore-search-wrap {
    position: relative;
    max-width: 100%;
}

.pfm-explore-search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pfm-text-subtle);
    font-size: 1rem;
    pointer-events: none;
}

.pfm-explore-search-input {
    width: 100%;
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    border-radius: 50px;
    padding: 0.85rem 1.25rem 0.85rem 2.9rem;
    color: var(--pfm-text);
    font-size: 0.95rem;
    transition: border-color var(--pfm-transition), box-shadow var(--pfm-transition);
    outline: none;
}

.pfm-explore-search-input::placeholder {
    color: var(--pfm-text-subtle);
}

.pfm-explore-search-input:focus {
    border-color: var(--pfm-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

/* ── Filters bar ── */
.pfm-filters-bar {
    padding: 0 0 1.75rem;
}

.pfm-filters-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pfm-filter-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pfm-filter-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pfm-filter-icon-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--pfm-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    transition: color var(--pfm-transition);
}

.pfm-filter-icon-btn:hover {
    color: var(--pfm-text);
}

/* Genre pills */
.pfm-filter-pills {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pfm-pill {
    background: none;
    border: 1.5px solid var(--pfm-border-light);
    border-radius: 50px;
    color: var(--pfm-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 1.1rem;
    cursor: pointer;
    transition: all var(--pfm-transition);
    white-space: nowrap;
}

.pfm-pill:hover {
    border-color: var(--pfm-primary);
    color: var(--pfm-primary);
}

.pfm-pill--active {
    background: var(--pfm-primary);
    border-color: var(--pfm-primary);
    color: #fff;
}

.pfm-pill--active:hover {
    background: var(--pfm-primary-hover);
    border-color: var(--pfm-primary-hover);
    color: #fff;
}

/* Sort / length dropdowns */
.pfm-dropdown-btn {
    background: none;
    border: 1.5px solid var(--pfm-border-light);
    border-radius: 50px;
    color: var(--pfm-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 1.1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--pfm-transition);
}

.pfm-dropdown-btn:hover,
.pfm-dropdown-btn.show {
    border-color: var(--pfm-border-light);
    color: var(--pfm-text);
    background: var(--pfm-surface-2);
}

.pfm-dropdown-btn::after {
    margin-left: 0.5rem;
}

.pfm-dropdown-menu {
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    border-radius: 10px;
    padding: 0.4rem 0;
    min-width: 160px;
}

.pfm-dropdown-menu .dropdown-item {
    color: var(--pfm-text-muted);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.pfm-dropdown-menu .dropdown-item:hover,
.pfm-dropdown-menu .dropdown-item:focus {
    background: var(--pfm-surface-3);
    color: var(--pfm-text);
}

.pfm-explore-results {
    padding-top: 0;
}

/* ── Explore responsive ── */
@media (max-width: 767.98px) {
    .pfm-filters-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .pfm-filter-right {
        align-self: flex-start;
    }

    .pfm-explore-title {
        font-size: 1.75rem;
    }
}

/* ============================================================
   VIDEO DETAIL — EPISODE INFO SECTION
   ============================================================ */

.pfm-episode-info-section {
    padding: 2rem 0 0.5rem;
}

.pfm-ep-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--pfm-text);
    margin: 0;
    line-height: 1.2;
}

.pfm-ep-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
    flex-shrink: 0;
}

.pfm-ep-rating .bi-star-fill {
    color: #f59e0b;
    font-size: 0.78rem;
}

.pfm-ep-rating-sep {
    color: var(--pfm-border-light);
    font-weight: 300;
}

.pfm-ep-credits {
    font-size: 0.82rem;
    color: var(--pfm-text-muted);
    margin: 0.4rem 0 0;
}

.pfm-ep-views {
    font-size: 0.82rem;
    color: var(--pfm-text-muted);
    margin: 0.2rem 0 0;
}

.pfm-ep-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    padding-top: 0.25rem;
}

.pfm-mylist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid var(--pfm-text);
    border-radius: 50px;
    color: var(--pfm-text);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--pfm-transition);
}

.pfm-mylist-btn:hover {
    background: var(--pfm-surface-2);
    border-color: var(--pfm-border-light);
}

.pfm-action-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    border-radius: 50%;
    color: var(--pfm-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--pfm-transition);
    flex-shrink: 0;
}

.pfm-action-icon-btn:hover {
    background: var(--pfm-surface-3);
    border-color: var(--pfm-border-light);
    color: var(--pfm-text);
}

/* ============================================================
   VIDEO DETAIL — DESCRIPTION & SEASONS CARDS
   ============================================================ */

.pfm-detail-section {
    padding: 1.5rem 0 0;
}

.pfm-detail-card {
    background: var(--pfm-surface);
    border: 1px solid var(--pfm-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.pfm-detail-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pfm-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.55rem;
}

.pfm-detail-text {
    font-size: 0.865rem;
    color: var(--pfm-text-muted);
    line-height: 1.65;
    margin: 0;
}

/* Seasons & Episodes */
.pfm-seasons-section {
    padding: 2rem 0 0;
}

.pfm-seasons-card {
    background: var(--pfm-surface);
    border: 1px solid var(--pfm-border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
}

.pfm-season-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--pfm-border);
}

.pfm-season-count {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pfm-text);
}

.pfm-season-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pfm-prev-ep-link {
    font-size: 0.78rem;
    color: var(--pfm-text-muted);
    text-decoration: none;
    transition: color var(--pfm-transition);
}

.pfm-prev-ep-link:hover {
    color: var(--pfm-text);
}

.pfm-scroll-up-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pfm-surface-2);
    border: 1px solid var(--pfm-border);
    border-radius: 50%;
    color: var(--pfm-text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--pfm-transition);
}

.pfm-scroll-up-btn:hover {
    background: var(--pfm-surface-3);
    color: var(--pfm-text);
}

/* Individual episode rows */
.pfm-ep-item {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--pfm-border);
    transition: background var(--pfm-transition);
}

.pfm-ep-item:last-child {
    border-bottom: none;
}

.pfm-ep-item:hover {
    background: rgba(255, 255, 255, 0.025);
}

.pfm-ep-num {
    font-size: 1rem;
    font-weight: 800;
    color: var(--pfm-text-subtle);
    min-width: 26px;
    flex-shrink: 0;
    padding-top: 0.2rem;
    font-variant-numeric: tabular-nums;
}

.pfm-ep-item-thumb {
    position: relative;
    width: 110px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--pfm-surface-2);
    background-size: cover;
    background-position: center;
}

.pfm-ep-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pfm-ep-item:hover .pfm-ep-item-thumb img {
    transform: scale(1.06);
}

.pfm-ep-item-thumb .pfm-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--pfm-transition);
    border-radius: 8px;
}

.pfm-ep-item:hover .pfm-ep-item-thumb .pfm-thumb-overlay {
    opacity: 1;
}

.pfm-ep-item-thumb .pfm-play-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.pfm-ep-item-info {
    flex: 1;
    min-width: 0;
}

.pfm-ep-item-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pfm-text);
    margin: 0 0 0.3rem;
    line-height: 1.35;
}

.pfm-ep-item-desc {
    font-size: 0.775rem;
    color: var(--pfm-text-muted);
    line-height: 1.55;
    margin: 0 0 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pfm-ep-item-meta {
    font-size: 0.72rem;
    color: var(--pfm-text-subtle);
}

.pfm-ep-duration {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    color: var(--pfm-text-muted);
    flex-shrink: 0;
    white-space: nowrap;
    padding-top: 0.2rem;
}

/* ============================================================
   VIDEO DETAIL — COMMENTS
   ============================================================ */

.pfm-comments-section {
    padding: 2.5rem 0 0;
}

.pfm-comment-list {
    display: flex;
    flex-direction: column;
    margin-top: 1.25rem;
}

.pfm-comment {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--pfm-border);
}

.pfm-comment:last-child {
    border-bottom: none;
}

.pfm-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.pfm-comment-body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 0.6rem;
}

.pfm-comment-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pfm-text);
}

.pfm-comment-text {
    font-size: 0.835rem;
    color: var(--pfm-text-muted);
}

.pfm-comment-time {
    font-size: 0.73rem;
    color: var(--pfm-text-subtle);
    flex-shrink: 0;
}

.pfm-comment-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.25rem;
    background: var(--pfm-surface);
    border: 1px solid var(--pfm-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    transition: border-color var(--pfm-transition);
}

.pfm-comment-input-wrap:focus-within {
    border-color: var(--pfm-primary);
}

.pfm-comment-field {
    flex: 1;
    background: none;
    border: none;
    color: var(--pfm-text);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    min-width: 0;
}

.pfm-comment-field::placeholder {
    color: var(--pfm-text-subtle);
}

.pfm-comment-send {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pfm-primary);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--pfm-transition), transform var(--pfm-transition);
}

.pfm-comment-send:hover {
    background: var(--pfm-primary-hover);
    transform: scale(1.06);
}

@media (max-width: 767.98px) {
    .pfm-video {
        max-height: 56vw;
    }

    .pfm-ep-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        padding-top: 0.75rem;
    }

    .pfm-ep-item-desc {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .pfm-player {
        height: 240px;
    }

    .pfm-ep-item-thumb {
        width: 80px;
    }

    .pfm-ep-num {
        display: none;
    }
}

/* ============================================================
   CATEGORIES PAGE
   ============================================================ */

/* Shared compact page header (Categories, category-detail) */
.pfm-page-header {
    padding: 2.5rem 0 1.5rem;
}

.pfm-page-header .pfm-back-btn {
    background: var(--pfm-surface-2);
    border-color: var(--pfm-border);
    margin-bottom: 1rem;
}

.pfm-page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--pfm-text);
    margin: 0 0 0.25rem;
}

.pfm-page-subtitle {
    font-size: 0.9rem;
    color: var(--pfm-text-muted);
    margin: 0;
}

/* Compact filter bar variant (no right-side dropdowns) */
.pfm-filters-bar--compact {
    padding-bottom: 1.5rem;
}

/* Category cards */
.pfm-cat-card {
    position: relative;
    display: block;
    border-radius: var(--pfm-card-radius);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    text-decoration: none;
    background: var(--pfm-surface-2);
    transition: transform var(--pfm-transition), box-shadow var(--pfm-transition);
}

.pfm-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.pfm-cat-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pfm-cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.35) 50%,
            rgba(0, 0, 0, 0.08) 100%);
}

.pfm-cat-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pfm-cat-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.pfm-cat-card-count {
    font-size: 0.78rem;
    color: var(--pfm-primary);
    font-weight: 500;
}

.pfm-categories-grid {
    padding-top: 0;
}

.pfm-cat-results {
    padding-top: 0;
}

/* ── Categories responsive ── */
@media (max-width: 575.98px) {
    .pfm-page-title {
        font-size: 1.6rem;
    }

    .pfm-cat-card {
        aspect-ratio: 2 / 3;
    }
}