*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* sina.email brand — Cute × Playful × Cinematic × Modern */
    /* Background */
    --bg: #F7FAFF;
    --bg-surface: #F1F6FD;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F6FD;
    --bg-elevated: #FFFFFF;
    --bg-soft: #F1F6FD;
    --surface: #FFFFFF;

    /* Text */
    --text: #17233D;
    --text-secondary: #68758C;
    --text-muted: #9AA6B8;

    /* Primary blue (brand color) */
    --accent: #3B91F5;
    --accent-hover: #2678DC;
    --accent-soft: rgba(59, 145, 245, 0.12);
    --accent-light: #EAF4FF;

    /* Yellow accent (CTA / watch / hot / active badges) */
    --accent-yellow: #FFC928;
    --accent-yellow-hover: #FFB51B;
    --accent-yellow-soft: rgba(255, 201, 40, 0.18);
    --accent-yellow-dark: #102E63;

    /* Brand dark (navy) */
    --brand-dark: #102E63;

    /* Secondary accents (compat names, repurposed) */
    --accent-cyan: #2678DC;       /* deep blue */
    --accent-pink: #FF5C61;       /* coral red for hot/danger */
    --accent-orange: #FFB51B;
    --accent-violet: #9D6CFF;

    /* Gradients */
    --grad-sunset: linear-gradient(135deg, #3B91F5 0%, #2678DC 100%);
    --grad-ocean: linear-gradient(135deg, #3B91F5 0%, #5CC8FF 100%);
    --grad-glow: linear-gradient(135deg, #FFC928 0%, #FFB51B 100%);
    --grad-watch: linear-gradient(135deg, #FFC928 0%, #FFB51B 100%);
    --grad-hero: radial-gradient(circle at 80% 20%, rgba(255, 201, 40, 0.30), transparent 30%), linear-gradient(135deg, #3B91F5, #2678DC);

    /* Status */
    --warn: #FFB51B;
    --warn-soft: rgba(255, 181, 27, 0.15);
    --success: #36C98F;
    --success-soft: rgba(54, 201, 143, 0.15);
    --danger: #FF5C61;
    --warning: #FFB51B;

    /* Border */
    --border: #E5EBF5;
    --border-light: #EEF3F9;

    /* Radius */
    --radius: 14px;
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --header-h: clamp(66px, 8vh, 88px);

    /* Shadow */
    --shadow-sm: 0 2px 8px rgba(16, 46, 99, 0.06);
    --shadow: 0 8px 24px rgba(16, 46, 99, 0.10);
    --shadow-lg: 0 12px 32px rgba(16, 46, 99, 0.14);
    --glow-cyan: 0 0 0 1px rgba(59, 145, 245, 0.3), 0 8px 24px rgba(59, 145, 245, 0.18);
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.01em;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}

.header-inner {
    display: flex;
    align-items: center;
    height: var(--header-h);
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 2px 0;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-img {
    height: clamp(56px, 7vh, 76px);
    width: auto;
    max-width: 260px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(16, 46, 99, 0.18));
}

.logo-text {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--accent-light);
}

.nav-link.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* Language switcher */
.lang-switcher {
    position: relative;
    margin-left: 12px;
}

.lang-switcher-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.lang-switcher-trigger:hover {
    border-color: var(--accent);
}

.lang-switcher-icon {
    font-size: 0.95rem;
}

.lang-switcher-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-secondary);
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 6px;
    z-index: 200;
}

.lang-switcher-option {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
}

.lang-switcher-option:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.lang-switcher-option.active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
}

/* Main */
.site-main {
    flex: 1;
    padding: 28px 0 40px;
}

/* Filters */
.filters {
    margin-bottom: 28px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.75fr) auto;
    gap: 12px;
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.filter-field-platform {
    min-width: 0;
}

.filter-field-action {
    width: 96px;
    justify-content: flex-end;
}

.filter-control {
    width: 100%;
    min-height: 44px;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.platform-picker {
    position: relative;
    width: 100%;
}

.platform-picker-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.875rem;
    font-family: 'Poppins', 'Nunito', sans-serif;
    line-height: 1.25;
    cursor: pointer;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s, background 0.15s;
}

.platform-picker-trigger:hover {
    border-color: var(--accent-cyan);
    background: var(--bg-card-hover);
}

.platform-picker-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.platform-picker img.platform-picker-icon {
    display: block;
    max-width: 20px;
}

.platform-picker-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex-shrink: 0;
    font-size: 0.875rem;
    line-height: 1;
}

.platform-picker-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-picker-caret {
    width: 0;
    height: 0;
    margin-left: auto;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    flex-shrink: 0;
}

.platform-picker-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 120;
    min-width: 200px;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-lg);
}

.platform-picker-menu[hidden] {
    display: none !important;
}

.platform-picker-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
    white-space: nowrap;
    transition: background 0.15s;
}

.platform-picker-option span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.platform-picker-option:hover {
    background: var(--bg-card-hover);
}

.platform-picker-option.active {
    background: var(--accent-soft);
    color: var(--accent-cyan);
    font-weight: 600;
}

.filter-select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.875rem;
    font-family: 'Poppins', 'Nunito', sans-serif;
    min-height: 44px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23B8AED4' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.15s;
}

.filter-select:hover {
    border-color: var(--accent-cyan);
}

.search-input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.875rem;
    font-family: 'Poppins', 'Nunito', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.btn-search {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--grad-sunset);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 6px 18px rgba(59, 145, 245, 0.3);
}

.btn-search:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 22px rgba(59, 145, 245, 0.42);
}

.btn-search:active {
    transform: scale(0.97);
}

/* List */
.list-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--grad-glow);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.total-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: var(--glow-cyan), var(--shadow-lg);
}

.card-cover-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-surface);
}

.card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-cover {
    transform: scale(1.05);
}

.corner-mark {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.corner-mark.hot {
    background: var(--grad-glow);
    color: var(--brand-dark);
}

.corner-mark.new {
    background: var(--grad-ocean);
    color: #fff;
}

.card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-platform-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.page-btn {
    padding: 10px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.page-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
}

.page-info {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Empty & Error */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 1rem;
}

.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.error-page p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: var(--grad-ocean);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
    transition: filter 0.15s;
    box-shadow: 0 6px 18px rgba(92, 200, 255, 0.3);
}

.btn-back:hover {
    filter: brightness(1.08);
}

/* Detail */
.detail-page {
    max-width: 1440px;
    margin: 0 auto;
}

/* ===== Detail Page: 3-Column Layout ===== */
.detail-page {
    padding: 24px 0 40px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

/* --- Left Column: Cover + Info + Episodes --- */
.detail-left {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-left::-webkit-scrollbar {
    width: 6px;
}

.detail-left::-webkit-scrollbar-track {
    background: transparent;
}

.detail-left::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.detail-left::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.detail-left {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.detail-cover {
    width: 100%;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 9 / 16;
    background: var(--bg-card);
}

.detail-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Center Column: Video Player --- */
.detail-center {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Right Column: Promotion + Share --- */
.detail-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.player-wrap {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin: 0 auto;
}

.player-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.85);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.player-loading.hidden {
    display: none;
}

.player-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: var(--accent-cyan);
    border-right-color: var(--accent-pink);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.detail-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.4;
}

.detail-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.detail-platform-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

.tag-badge {
    padding: 4px 10px;
    background: var(--accent-soft);
    color: var(--accent-cyan);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.detail-date {
    color: var(--text-muted, #999);
    font-size: 0.8rem;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    padding: 6px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.detail-desc-wrap {
    position: relative;
    margin-bottom: 16px;
}

.detail-desc-collapsed {
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

.detail-desc-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
    pointer-events: none;
}

.desc-toggle {
    display: block;
    margin-top: 8px;
    padding: 6px 0;
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}

.desc-toggle:hover {
    color: var(--accent-pink);
}

.episodes {
    margin-bottom: 0;
    width: 100%;
}

.episodes-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.episode-btn {
    padding: 12px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-align: center;
}

.episode-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--text);
}

.episode-btn.active {
    border-color: transparent;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(254, 44, 85, 0.35);
}

/* Promotion */
.promotion-guide {
    margin-bottom: 0;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.promotion-skeleton {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promotion-placeholder {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.promotion-guide-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.promotion-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.promotion-guide-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.promotion-guide-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.promotion-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
}

.promo-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.promo-btn:active {
    transform: scale(0.98);
}

.promo-btn-primary {
    background: var(--grad-watch);
    color: var(--brand-dark);
    box-shadow: 0 6px 16px rgba(255, 201, 40, 0.28);
}

.promo-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 201, 40, 0.35);
}

.promo-btn-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.promo-btn-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.promo-btn-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.promo-btn-text strong {
    font-size: 0.875rem;
    font-weight: 600;
}

.promo-btn-text small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.promo-code-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.promo-code-info strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.promo-code-info small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Share */
.share-section {
    margin-bottom: 0;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.share-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.1s;
}

.share-btn span:last-child {
    display: none;
}

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.share-btn:active {
    transform: scale(0.94);
}

.share-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
}

.share-btn-facebook {
    background: #1877f2;
    color: #fff;
}

.share-btn-facebook .share-btn-icon {
    font-family: Georgia, serif;
}

.share-btn-twitter {
    background: #000;
    color: #fff;
}

.share-btn-kakaotalk {
    background: #FEE500;
    color: #191919;
}

.share-btn-kakaotalk .share-btn-icon {
    background: rgba(0, 0, 0, 0.1);
}

.share-btn-line {
    background: #06C755;
    color: #fff;
}

.share-btn-telegram {
    background: #26A5E4;
    color: #fff;
}

.share-btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.share-btn-reddit {
    background: #FF4500;
    color: #fff;
}

.share-btn-email {
    background: #475569;
    color: #fff;
}

.share-btn-copy {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    grid-column: 1 / -1;
}

/* In narrow sidebars (book left column), stack share buttons vertically */
.book-left .share-buttons {
    grid-template-columns: 1fr;
}

.book-left .share-btn-copy {
    grid-column: auto;
}

.share-btn-copy .share-btn-icon {
    background: var(--bg);
}

.share-btn-tiktok {
    background: #010101;
    color: #fff;
}

.share-btn-tiktok .share-btn-icon {
    background: linear-gradient(135deg, #25f4ee, #fe2c55);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1rem;
}

.share-feedback {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--success);
    font-weight: 500;
}

/* Book detail */
.book-layout {
    display: grid;
    gap: 28px;
}

.book-left {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.book-right {
    min-width: 0;
}

.book-cover-wrap {
    max-width: 240px;
    margin: 0 auto;
}

.book-cover {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.book-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.4;
}

.book-author {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.book-chapters {
    margin-top: 24px;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 4px;
}

.chapter-list::-webkit-scrollbar {
    width: 4px;
}

.chapter-list::-webkit-scrollbar-track {
    background: transparent;
}

.chapter-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.chapter-btn {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chapter-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
    color: var(--text);
}

.chapter-btn.active {
    border-color: transparent;
    background: var(--accent-soft);
    color: var(--accent-cyan);
    font-weight: 700;
}

.chapter-content {
    display: none;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.chapter-content.active {
    display: block;
}

.chapter-content-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.chapter-content-body {
    white-space: pre-wrap;
    line-height: 1.85;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.promo-code-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.promo-code-btn:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.promo-code-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.promo-code-value {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-cyan);
}

.promo-code-action {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* About page */
.about-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 0;
}

.about-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.about-section p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, background 0.15s;
}

.about-contact-item:hover {
    border-color: var(--accent-cyan);
    background: var(--bg-card-hover);
}

.about-contact-icon {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.about-contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.about-contact-info strong {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

.about-contact-info span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    background: var(--brand-dark);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #FFFFFF;
}

.footer-copy {
    font-size: 0.75rem;
    color: #BFD5F5;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.footer-contact-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #BFD5F5;
    margin-bottom: 2px;
}

.footer-contact-link {
    font-size: 0.8125rem;
    color: #BFD5F5;
    transition: color 0.15s;
}

.footer-contact-link:hover {
    color: var(--accent-yellow);
    text-decoration: underline;
}

/* Mobile bottom TabBar */
.mobile-tabbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--border);
    padding: 8px env(safe-area-inset-right) 8px env(safe-area-inset-left);
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 0.6875rem;
    transition: color 0.15s;
}

.tabbar-item.active {
    color: var(--accent);
}

.tabbar-icon {
    font-size: 1.15rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .mobile-tabbar {
        display: flex;
        justify-content: space-around;
    }
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }
    .header-nav {
        display: none;
    }

    .site-header {
        height: var(--header-h);
    }

    .header-inner {
        gap: 10px;
        height: var(--header-h);
    }

    .logo-img {
        height: clamp(44px, 6vh, 56px);
        max-width: 200px;
    }

    .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .filter-field-search {
        grid-column: 1;
    }

    .filter-field-action {
        grid-column: 2;
        width: 100%;
        align-self: end;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-contact {
        align-items: center;
    }
}

@media (max-width: 480px) {
    :root {
        --header-h: clamp(48px, 8vh, 56px);
    }

    .site-header {
        height: var(--header-h);
    }

    .header-inner {
        gap: 6px;
        height: var(--header-h);
    }

    .logo-img {
        height: clamp(38px, 5.5vh, 48px);
        max-width: 160px;
        filter: drop-shadow(0 1px 3px rgba(16, 46, 99, 0.16));
    }

    .header-nav {
        gap: 2px;
    }

    .nav-link {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-field:nth-child(3) {
        grid-column: 1 / -1;
    }

    .platform-picker-menu {
        min-width: 100%;
        width: max-content;
        max-width: min(280px, calc(100vw - 32px));
    }

    .header-nav {
        gap: 4px;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 0.8125rem;
    }

    .about-title {
        font-size: 1.4rem;
    }
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* Mobile/Tablet (single-column): player first, promotion right under episodes */
@media (max-width: 899px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    /* 单列顺序：播放器+选集 → 推广卡 → 封面/简介 → 分享。
       .detail-right 用 display:contents 展开，让推广卡直接成为栅格项，
       再用 order 提到选集正下方，用户可以马上点到推广入口。 */
    .detail-right {
        display: contents;
    }

    .detail-center {
        order: -3;
        align-items: stretch;
    }

    #promotion-container {
        order: -2;
    }

    .detail-left {
        order: -1;
    }

    .episode-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        margin: 0 -4px;
    }

    .episode-btn {
        flex: 0 0 auto;
        min-width: 56px;
        scroll-snap-align: center;
    }
}

/* Tablet+: 3-column layout — left(cover+info) | center(player+episodes) | right(promo+share) */
@media (min-width: 900px) {
    .detail-layout {
        grid-template-columns: minmax(0, 260px) minmax(0, 1fr) minmax(0, 300px);
        gap: 32px;
    }

    .detail-left {
        position: sticky;
        top: calc(var(--header-h) + 16px);
        align-self: start;
        max-height: calc(100vh - var(--header-h) - 32px);
        overflow-y: auto;
        padding-right: 4px;
    }

    .detail-right {
        position: sticky;
        top: calc(var(--header-h) + 16px);
    }

    .book-layout {
        grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
        gap: 28px;
    }

    .book-left {
        position: sticky;
        top: calc(var(--header-h) + 16px);
        align-self: start;
    }

    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .detail-layout {
        grid-template-columns: minmax(0, 280px) minmax(0, 1fr) minmax(0, 340px);
        gap: 40px;
    }

    .detail-left {
        max-height: calc(100vh - var(--header-h) - 40px);
    }

    .detail-right {
        top: calc(var(--header-h) + 20px);
    }

    .book-layout {
        grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
        gap: 40px;
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .page-title {
        font-size: 1.6rem;
    }
}
/* SEO: list intro text */
.page-intro {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: -12px 0 24px;
    max-width: 860px;
}

/* SEO: breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb-link {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--accent);
}

.breadcrumb-sep {
    color: var(--text-muted);
    opacity: 0.6;
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* SEO: more-from-source module */
.more-section {
    margin-top: 40px;
}

.more-section .list-meta {
    margin-bottom: 16px;
}

.more-link {
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 600;
}

.more-link:hover {
    color: var(--accent-hover);
}

/* SEO: editorial overlay sections */
.overlay-section {
    margin-top: 36px;
    padding: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.overlay-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.overlay-text {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.overlay-chars {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
}

.overlay-chars li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.overlay-faq {
    margin-bottom: 16px;
}

.overlay-faq:last-child {
    margin-bottom: 0;
}

.overlay-faq-q {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.overlay-faq-a {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.overlay-similar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.overlay-similar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
}

.overlay-similar-item:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.overlay-similar-item img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

@media (max-width: 640px) {
    .page-intro {
        margin-top: -8px;
    }

    .breadcrumb-current {
        max-width: 200px;
    }
}

/* SEO: genre landing pages */
.genre-links-section,
.popular-genres {
    margin-top: 36px;
}

.genre-links-section .list-meta,
.popular-genres .list-meta {
    margin-bottom: 14px;
}

.genre-links-section .page-title,
.popular-genres .page-title {
    font-size: 1.125rem;
}

.genre-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.genre-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.genre-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.genre-chip-count {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* SEO: platform landing about section */
.platform-about {
    margin-top: 36px;
    padding: 20px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.platform-about .page-title {
    font-size: 1.125rem;
    margin-bottom: 10px;
}

.platform-about p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.75;
}

/* SEO: clickable tag chips on detail pages */
.detail-tags .tag-link {
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.detail-tags .tag-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =============================================================================
   ZIP 资源包预览播放器（DramaBox/dianzhong 源）
   浏览器内解析 ZIP 目录，视频字节走 CF Worker 边缘代理，不经源站。
   结构由 web/static/js/zip-player.js 生成（.zp/.zp-main/.ep-video/.zp-bar/...）。
   ============================================================================= */
.player-wrap.is-zip {
    aspect-ratio: auto;
    max-width: 860px;
    background: var(--bg-card);
    overflow: visible;
}

.player-wrap.is-zip .video-player,
.player-wrap.is-zip .player-loading {
    display: none;
}

.zip-mount[hidden] {
    display: none;
}

.zp {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.zp-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* 竖屏短剧 9:16：锁高度让宽度由 aspect-ratio 反推，居中留黑边 */
.zp .ep-video {
    display: block;
    height: min(68vh, 720px);
    width: auto;
    max-width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: contain;
    margin: 0 auto;
    background: #000;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .45);
}

.zp-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.zp-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.zp-hdr-title {
    font-weight: 600;
    color: var(--text);
}

.zp-hdr-now {
    font-variant-numeric: tabular-nums;
}

.zp-eps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
    align-content: start;
}

.zp-eps .ep-btn {
    width: 100%;
    padding: 9px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.zp-eps .ep-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
    color: var(--text);
}

.zp-eps .ep-btn.active {
    background: var(--grad-ocean);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}

.zp-status {
    min-height: 1.2em;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
}

.zp-status:empty {
    display: none;
}

.zp-dl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    background: var(--bg-elevated);
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.zp-dl:hover {
    text-decoration: none;
    color: #fff;
    background: var(--bg-card-hover);
    border-color: var(--accent-violet);
}

.zp-dl-inline {
    align-self: center;
}

.zp-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 8px;
    text-align: center;
}

.zp-error-msg {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
    max-width: 46ch;
}

.zp-resume {
    background: var(--bg-elevated);
    border: 1px solid var(--accent-soft);
    border-radius: var(--radius);
    padding: 16px 14px;
    margin: 0 18px 14px;
    text-align: center;
}

.zp-resume-msg {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: var(--text);
}

.zp-resume-msg strong {
    color: var(--accent-pink);
}

.zp-resume-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.zp-resume-yes,
.zp-resume-no {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.zp-resume-yes {
    background: var(--grad-ocean);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

.zp-resume-no {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.zp-resume-no:hover {
    color: #fff;
    background: var(--bg-card-hover);
}
