/* ==========================================================================
   Base Styles & Variables
   ========================================================================== */
:root {
    --bg-color: #0d0f12;
    --surface-color: #1a1d24;
    --surface-hover: #262a33;
    --glass-bg: rgba(20, 26, 36, 0.24);
    --glass-bg-strong: rgba(20, 26, 36, 0.28);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-highlight: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
    --glow-color: rgba(255, 97, 143, 0.35);
    --primary-color: #ff3366;
    --primary-hover: #e62e5c;
    --text-primary: #ffffff;
    --text-secondary: #8c92a4;
    --border-color: #2d313d;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --transition-speed: 0.3s;
    --ease-out-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 24px;
    --container-width: 1200px;
}

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

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 10% -10%, rgba(255, 51, 102, 0.15), transparent 38%),
                      radial-gradient(circle at 90% 110%, rgba(0, 164, 255, 0.16), transparent 35%);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.ambient-lights {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.ambient-light {
    position: absolute;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.8;
}

.ambient-light--one {
    width: 420px;
    height: 420px;
    top: 12%;
    left: -20px;
    background: radial-gradient(circle, rgba(255, 71, 128, 0.58) 0%, rgba(255, 71, 128, 0.2) 42%, rgba(255, 71, 128, 0) 78%);
}

.ambient-light--two {
    width: 400px;
    height: 400px;
    right: -220px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(0, 164, 255, 0.45) 0%, rgba(0, 164, 255, 0) 72%);
}

.glass,
.glass-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), var(--glass-bg));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.glow,
.light-reactive {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    --mx: 50%;
    --my: 50%;
}

.glow::before,
.light-reactive::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: all 0.4s var(--ease-out-smooth);
    background: radial-gradient(220px circle at var(--mx) var(--my), var(--glow-color) 0%, rgba(255, 255, 255, 0.05) 35%, transparent 72%);
}

.glow:hover::before,
.glow.is-active::before,
.light-reactive:hover::before,
.light-reactive.is-active::before {
    opacity: 1;
}

.glow > *,
.light-reactive > * {
    position: relative;
    z-index: 1;
}

.gradient-glow {
    background-image: linear-gradient(135deg, rgba(0, 198, 255, 0.2), rgba(0, 114, 255, 0.22));
    box-shadow: 0 0 20px rgba(0, 114, 255, 0.4), 0 0 42px rgba(0, 198, 255, 0.2);
    transition: all 0.4s var(--ease-out-smooth);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass,
    .glass-panel {
        background: rgba(20, 26, 36, 0.28);
    }
}

[data-io-reveal] {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    transition: opacity 420ms ease, transform 420ms ease;
    transition-delay: calc(var(--io-order, 0) * 70ms);
}

[data-io-reveal].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed;
    top: 12px;
    width: 100%;
    height: 82px;
    background: transparent;
    z-index: 1000;
    border: none;
}

.header.glass {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 58px;
    border-radius: 999px;
    background: rgba(20, 26, 36, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 28px;
    width: auto;
    display: block;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
}

.nav ul {
    display: flex;
    gap: 8px;
}

.nav a {
    font-size: 15px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    transition: all 0.3s ease;
}

.nav a:hover, .nav a.active {
    color: #fff;
    background: transparent;
}

/* ==========================================================================
   Banner
   ========================================================================== */
.banner {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 70px;
}

.banner-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.banner-video.is-paused {
    display: none;
}

.banner::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(circle at 20% 35%, rgba(0, 198, 255, 0.22), transparent 42%),
        radial-gradient(circle at 80% 70%, rgba(255, 87, 151, 0.2), transparent 45%);
}

.banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(7, 10, 18, 0.5), rgba(7, 10, 18, 0.76));
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 0px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.banner-title-logo {
    height: 160px;
    width: auto;
    max-width: min(720px, 92vw);
    display: inline-block;
    filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.55));
}

.banner-content {
    position: relative;
    z-index: 2;
    overflow: visible;
    background: transparent;
    background-image: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.banner-content.glow::before {
    display: none;
}

.banner-content.gradient-glow {
    background-image: none;
    box-shadow: none;
}

.banner-content p {
    font-size: 20px;
    color: rgba(230, 236, 248, 0.96);
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.68);
}

.btn-primary {
    display: inline-block;
    position: relative;
    isolation: isolate;
    background: linear-gradient(rgba(13, 15, 18, 0.15), rgba(13, 15, 18, 0.02)) padding-box;
    color: rgba(255, 255, 255, 0.92);
    padding: 13px 38px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: 0.5px;
    transition: transform 0.4s var(--ease-out-smooth), box-shadow 0.4s var(--ease-out-smooth), color 0.4s var(--ease-out-smooth);
    border: 1px solid rgba(255, 255, 255, 0.22);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 198, 255, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-smooth);
}

.btn-secondary:hover {
    background-color: var(--surface-hover);
    border-color: var(--text-secondary);
    box-shadow: 0 0 20px rgba(0, 114, 255, 0.28);
}

/* ==========================================================================
   Filter Section
   ========================================================================== */
.main-content {
    padding: 60px 20px;
}

.filter-section {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
}

.filter-section.glow::before {
    display: none;
}

.filter-group {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    width: 100px;
    color: var(--text-secondary);
    font-size: 15px;
    flex-shrink: 0;
}

.filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-list li {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.filter-list li:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.filter-list li.active {
    background: rgba(255, 51, 102, 0.2);
    border-color: rgba(255, 51, 102, 0.45);
    color: #fff;
}

.sort-group {
    margin-bottom: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.sort-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-tab {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-tab:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.sort-tab.active {
    color: #fff;
    background: rgba(255, 51, 102, 0.2);
    border-color: rgba(255, 51, 102, 0.45);
}

/* ==========================================================================
   Video Grid
   ========================================================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px 16px;
}

.video-section-title {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 4px 0 40px;
    line-height: 1.05;
    padding: 0;
    color: #fff;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.video-section-title.glass {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.video-section-title::before {
    content: "";
    position: absolute;
    width: 78px;
    height: 78px;
    left: 0;
    top: -18px;
    border-radius: 50%;
    z-index: -1;
    filter: blur(10px);
    background: radial-gradient(circle, rgba(255, 177, 150, 0.55) 0%, rgba(255, 177, 150, 0.12) 55%, rgba(255, 177, 150, 0) 72%);
}

.video-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    transition: all 0.4s var(--ease-out-smooth);
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-card.glow::before {
    display: none;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 145%;
    background-color: #222;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.video-thumbnail img.loaded {
    opacity: 1;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.video-episodes {
    position: absolute;
    right: 8px;
    bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.playable-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.video-info {
    padding: 10px 2px 0;
}

.video-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.25;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.video-tag {
    font-size: 11px;
    color: #95a0b5;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 2px 8px;
}

/* ==========================================================================
   Load More & Loader
   ========================================================================== */
.load-more {
    text-align: center;
    margin-top: 40px;
}

.loader {
    border: 3px solid var(--surface-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

body.is-detail-page .banner,
body.is-player-page .banner {
    display: none;
}

body.is-player-page {
    overflow: hidden;
    background: #000;
}

/* ==========================================================================
   Detail Page
   ========================================================================== */
.detail-page {
    min-height: 100vh;
    position: relative;
    padding-bottom: 64px;
    background: #0d0f12;
}

.detail-hero {
    position: absolute;
    inset: 0 0 auto;
    height: min(56vh, 520px);
    background-position: center top;
    background-size: cover;
    filter: saturate(1.08);
    opacity: 0.85;
    pointer-events: none;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(13, 15, 18, 0.95), rgba(13, 15, 18, 0.48) 48%, rgba(13, 15, 18, 0.92)),
        linear-gradient(180deg, rgba(13, 15, 18, 0.1), #0d0f12 88%);
}

.detail-inner {
    position: relative;
    z-index: 1;
    padding-top: 42px;
}

.page-back-btn {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(8, 10, 14, 0.54);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 28px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.detail-layout {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
    margin-bottom: 62px;
}

.detail-cover-wrap {
    width: 168px;
    aspect-ratio: 3 / 4.2;
    border-radius: 8px;
    overflow: hidden;
    background: #171a20;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46);
}

.detail-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-main {
    padding-top: 6px;
    min-width: 0;
}

.detail-title {
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.18;
    font-weight: 800;
    margin-bottom: 18px;
}

.detail-tags,
.detail-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-tags span {
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 15px;
}

.detail-stats {
    margin-top: 18px;
    color: rgba(225, 231, 242, 0.72);
    font-size: 14px;
}

.detail-stats span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    background: rgba(255, 255, 255, 0.34);
}

.detail-play-btn {
    margin-top: 54px;
    min-width: 164px;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff8a1c, #ff5b1c);
    color: #fff;
    font-size: 17px;
    font-weight: 750;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(255, 103, 28, 0.28);
}

.detail-section {
    margin-bottom: 54px;
}

.detail-section h2 {
    font-size: 22px;
    margin-bottom: 18px;
}

.detail-section p {
    max-width: 980px;
    color: rgba(226, 232, 244, 0.68);
    font-size: 16px;
    line-height: 1.95;
}

.producer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 26px 34px;
}

.producer-item {
    width: 78px;
    text-align: center;
}

.producer-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 22px;
    margin-bottom: 8px;
    border: 2px solid rgba(255, 255, 255, 0.75);
}

.producer-avatar--1 { background: linear-gradient(135deg, #ff8a65, #ec407a); }
.producer-avatar--2 { background: linear-gradient(135deg, #42a5f5, #7e57c2); }
.producer-avatar--3 { background: linear-gradient(135deg, #26c6da, #66bb6a); }
.producer-avatar--4 { background: linear-gradient(135deg, #ffee58, #ff7043); color: #3a2600; }
.producer-avatar--5 { background: linear-gradient(135deg, #f06292, #ba68c8); }
.producer-avatar--6 { background: linear-gradient(135deg, #90a4ae, #455a64); }

.producer-item strong,
.producer-item small {
    display: block;
    white-space: nowrap;
}

.producer-item strong {
    font-size: 14px;
    line-height: 1.4;
}

.producer-item small {
    color: rgba(226, 232, 244, 0.56);
    font-size: 12px;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px 16px;
}

.episode-btn {
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
}

.episode-btn small {
    color: rgba(226, 232, 244, 0.5);
    font-size: 11px;
}

.episode-btn:hover {
    background: rgba(255, 138, 28, 0.22);
    border-color: rgba(255, 138, 28, 0.42);
}

/* ==========================================================================
   Episode Player Page
   ========================================================================== */
.player-page {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: #000;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

.episode-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-page:not(.is-horizontal-video) .episode-player {
    object-fit: cover;
}

.player-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 30%, transparent 62%, rgba(0, 0, 0, 0.76)),
        linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.34));
}

.player-topbar {
    position: absolute;
    top: max(18px, env(safe-area-inset-top));
    left: 18px;
    right: 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    z-index: 2;
}

.player-nav-btn,
.player-action-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.38);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}

.player-nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
    flex: 0 0 auto;
}

.player-series-title {
    max-width: min(620px, calc(100vw - 96px));
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-episode-title {
    max-width: min(620px, calc(100vw - 96px));
    font-size: 20px;
    line-height: 1.28;
    margin-top: 2px;
}

.player-side-actions {
    position: absolute;
    right: max(18px, env(safe-area-inset-right));
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.player-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 22px;
}

.player-action-btn:disabled {
    opacity: 0.36;
    cursor: default;
}

.player-bottom-panel {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    pointer-events: none;
}

.player-progress-text {
    font-size: 18px;
    font-weight: 800;
}

.player-tip {
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin-top: 40px;
}

/* ==========================================================================
   Floating Actions
   ========================================================================== */
.floating-actions {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(22, 26, 35, 0.66));
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-smooth);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.action-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 114, 255, 0.4), 0 0 32px rgba(255, 87, 151, 0.2);
}

.wechat-btn {
    color: #07c160;
}

.wechat-btn:hover {
    color: #fff;
    background-color: #07c160;
    border-color: #07c160;
}

.phone-btn {
    color: #00a4ff;
}

.phone-btn:hover {
    color: #fff;
    background-color: #00a4ff;
    border-color: #00a4ff;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(22, 26, 35, 0.74));
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    position: relative;
    max-width: 400px;
    width: 90%;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-speed);
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.qrcode-placeholder {
    width: 200px;
    height: 200px;
    background-color: #fff;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
    border-radius: 8px;
}

.qrcode-placeholder p {
    margin-top: 10px;
    font-size: 14px;
}

.phone-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0 10px;
}

.service-time {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1600px) {
    .video-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1280px) {
    .video-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .video-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .banner-content h2 {
        font-size: 32px;
    }

    .banner-title-logo {
        height: 120px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
    
    .nav {
        display: none; /* 移动端可以实现汉堡菜单，这里为了简洁先隐藏 */
    }

    .filter-label {
        width: 100%;
        margin-bottom: 8px;
    }

    .sort-group {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
    }

    .video-thumbnail {
        padding-top: 145%;
    }

    .video-title {
        font-size: 15px;
    }

    .video-section-title {
        font-size: 32px;
    }

    .detail-inner {
        padding-top: max(16px, env(safe-area-inset-top));
    }

    .page-back-btn {
        width: 40px;
        height: 40px;
        margin-bottom: 18px;
    }

    .detail-layout {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 16px;
        margin-bottom: 38px;
    }

    .detail-cover-wrap {
        width: 112px;
        border-radius: 8px;
    }

    .detail-title {
        font-size: 24px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 12px;
    }

    .detail-tags {
        gap: 7px;
    }

    .detail-tags span {
        font-size: 12px;
        padding: 3px 7px;
    }

    .detail-stats {
        gap: 7px;
        margin-top: 11px;
        font-size: 12px;
    }

    .detail-stats span + span::before {
        margin-right: 7px;
    }

    .detail-play-btn {
        width: 100%;
        min-width: 0;
        height: 42px;
        margin-top: 18px;
        border-radius: 8px;
        font-size: 15px;
    }

    .detail-section {
        margin-bottom: 38px;
    }

    .detail-section h2 {
        font-size: 19px;
        margin-bottom: 14px;
    }

    .detail-section p {
        font-size: 14px;
        line-height: 1.85;
    }

    .producer-list {
        gap: 20px 18px;
    }

    .producer-item {
        width: 64px;
    }

    .producer-avatar {
        width: 50px;
        height: 50px;
        font-size: 19px;
    }

    .episode-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .episode-btn {
        min-height: 46px;
        font-size: 14px;
    }

    .player-topbar {
        left: 12px;
        right: 12px;
        gap: 10px;
    }

    .player-nav-btn {
        width: 40px;
        height: 40px;
    }

    .player-episode-title {
        font-size: 18px;
    }

    .player-side-actions {
        right: max(12px, env(safe-area-inset-right));
        gap: 12px;
    }

    .player-action-btn {
        width: 44px;
        height: 44px;
    }

    .player-bottom-panel {
        left: 14px;
        right: 14px;
    }
    
    /* 竖屏视频在移动端可以并排显示或者特殊布局，目前统一处理为列表 */
    
    .floating-actions {
        right: 15px;
        bottom: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-io-reveal] {
        opacity: 1;
        transform: none;
    }

    .glow::before,
    .light-reactive::before {
        display: none;
    }

    .banner-video {
        display: none;
    }
}
