/* ========================================
   MettShort - Core Styles
   Variables, reset, header, footer, pagination, error, responsive
   ======================================== */

/* ========== Base: Variables & Reset ========== */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-hover: #252525;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #e83a57;
    --accent-hover: #ff4d6a;
    --border: #222222;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,0.5);
    --max-width: 1400px;
    --header-height: 56px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; display: block; }

/* Lazy Load */
.lazy-img {
    opacity: 0;
}
.lazy-img.lazy-loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

/* Common layout: main fills remaining space, footer sticks to bottom */
main {
    flex: 1;
}

/* Common Buttons */
.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: var(--accent);
    color: white;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }

.btn-secondary {
    display: inline-block;
    padding: 10px 24px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
}
.btn-secondary:hover { background: var(--bg-hover); }

/* VIP Badge (small) */
.vip-badge-sm {
    display: inline-block;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* ========== Header ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #000;
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 28px;
}

.logo {
    font-size: 25px;
    font-weight: 900;
    white-space: nowrap;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.nav { display: flex; gap: 24px; flex-shrink: 0; }
.nav-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 4px 0;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.android-app-fab { display: none; }

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.header-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    font-size: 10px;
}
.header-icon-link:hover { color: var(--text-primary); }
.header-icon-link span { font-size: 12px; font-weight: 500; }

/* User Avatar */
.user-menu { position: relative; }
.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}
.user-avatar:hover { border-color: var(--accent); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar-guest svg {
    width: 20px;
    height: 20px;
}
.user-avatar-guest {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}
.user-avatar-guest:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    order: -1;
}
.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========== Footer ========== */
.footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 20px;
}
.footer-links {
    display: flex;
    gap: 48px;
    margin-bottom: 32px;
}
.footer-links h4 { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links a { display: block; font-size: 16px; color: var(--text-primary); padding: 3px 0; }
.footer-links a:hover { color: var(--text-muted); }

.footer-copy { font-size: 18px; color: var(--text-primary); border-top: 1px solid var(--border); padding-top: 20px; }

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 24px 0;
}
.page-btn {
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}
.page-btn:hover, .page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.page-dots { padding: 8px 6px; color: var(--text-muted); }

/* ========== Error Page ========== */
.error-page {
    text-align: center;
    padding: 60px 16px 40px;
}
.error-illustration {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}
.error-digit {
    font-size: 72px;
    font-weight: 800;
    color: #4a4a5a;
    line-height: 1;
    letter-spacing: -2px;
}
.error-tv {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #2a2a3a;
    border-radius: 16px;
    animation: tv-float 3s ease-in-out infinite;
}
.error-tv svg { width: 48px; height: 48px; }
@keyframes tv-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.error-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 24px;
}
.btn-home {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    width: 245px;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 48px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
}
.btn-home:hover {
    background: #e03a5a;
    transform: translateY(-2px);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .drama-grid { grid-template-columns: repeat(4, 1fr); }
    .slider-card { width: 148px; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .menu-toggle { display: flex; }

    .header-inner {
        position: relative;
        padding: 0 16px;
        gap: 0;
    }
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 20px;
        font-weight: 900;
    }

    .header.menu-open .nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        gap: 12px;
    }

    .header-right .header-icon-link span { display: none; }
    .header-right .header-icon-link:nth-child(2) { display: none; }

    .hero-carousel { height: 50vh; min-height: 320px; max-height: 400px; }
    .carousel-arrow { width: 40px; height: 40px; display: none; }
    .carousel-prev { left: 12px; }
    .carousel-next { right: 12px; }

    .floor-container { padding: 0 16px; }

    .drama-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .detail-hero { flex-direction: column; gap: 16px; }
    .detail-cover { width: 160px; align-self: center; }
    .detail-title { font-size: 22px; }

    .auth-card { padding: 28px 20px; }
    .auth-title { font-size: 20px; }

    .error-digit { font-size: 52px; }
    .error-tv { width: 60px; height: 60px; }
    .error-tv svg { width: 36px; height: 36px; }
    .error-desc { font-size: 14px; }
    .btn-home { padding: 10px 36px; font-size: 14px; }

    .user-profile-card { flex-direction: column; text-align: center; padding: 24px 16px; }
}

@media (max-width: 480px) {
    .drama-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .card-info { padding: 6px 8px; }
    .card-title { font-size: 12px; }
    .detail-cover { width: 140px; }
    .hero-carousel { height: 45vh; min-height: 280px; }
    .carousel-title { font-size: 20px; }
    .carousel-play { padding: 10px 24px; }
    .carousel-dots { right: 16px; bottom: 20px; }

    .footer-copy { font-size: 12px; }
    .footer-links h4 {font-size: 15px;}
    .footer-links a { font-size: 12px; }
}

@media (max-width: 768px) {
    .android-app-fab {
        position: fixed;
        right: max(16px, env(safe-area-inset-right));
        bottom: calc(16px + env(safe-area-inset-bottom));
        z-index: 90;
        display: grid;
        width: 46px;
        height: 46px;
        place-items: center;
        border: 1px solid #d7d9de;
        border-radius: 50%;
        background: #f3f4f6;
        box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
    }
    .android-app-fab:active { transform: scale(.95); }
    body.player-fullscreen .android-app-fab,
    html.player-fullscreen .android-app-fab { display: none; }
}
/* ========================================
   MettShort - Home & Listing Styles
   Hero carousel, floor sections, cards, genre/categories
   ======================================== */

/* ========== Hero Carousel ========== */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 300px;
    max-height: 600px;
    overflow: hidden;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-bg {
    position: absolute;
    inset: 0;
}
.carousel-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.6) 35%,
        rgba(0,0,0,0.15) 65%,
        rgba(0,0,0,0.05) 100%
    );
}
.carousel-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
}

.carousel-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 0 24px 24px;
}

.carousel-title {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
    max-width: 560px;
}

.carousel-play {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 25px;
    background: white;
    color: #000;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    transition: var(--transition);
    width: fit-content;
}
.carousel-play:hover {
    transform: scale(1.03);
    background: #f0f0f0;
}
.carousel-play svg { margin-top: 1px; }

/* Arrows */
.carousel-view-all {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}
.carousel-view-all:hover { color: white; }
.carousel-controls {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    max-width: var(--max-width);
    width: 100%;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(4px);
    pointer-events: auto;
}
.carousel-arrow:hover { background: rgba(0,0,0,0.8); border-color: rgba(255,255,255,0.3); }
.carousel-prev { left: 24px; }
.carousel-next { right: 24px; }

@media (max-width: 768px) {
    .hero-carousel { touch-action: pan-y; }
    .carousel-track {
        display: flex;
        transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
        will-change: transform;
    }
    .carousel-track.is-dragging { transition: none; }
    .carousel-slide {
        position: relative;
        inset: auto;
        flex: 0 0 100%;
        opacity: 1;
        transition: none;
        pointer-events: auto;
    }
    .carousel-arrow { display: none; }
    .carousel-content { padding-bottom: 24px; }
    .carousel-title { font-size: 24px; }
    .carousel-play { padding: 10px 28px; font-size: 14px; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .carousel-track { transition: none; }
}

/* Dots */
.carousel-dots {
    position: absolute;
    bottom: 28px;
    right: 24px;
    z-index: 10;
    display: flex;
    gap: 6px;
    align-items: center;
    pointer-events: auto;
}
.carousel-dot {
    width: 12px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}
.carousel-dot.active {
    width: 24px;
    background: white;
}
.carousel-dot:hover { background: rgba(255,255,255,0.6); }

/* ========== Floor (Slider Section) ========== */
.floor {
    padding: 15px 0;
}

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

.floor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.floor-title {
    font-size: 24px;
    font-weight: 700;
}

.floor-more {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}
.floor-more:hover { color: var(--accent); }

/* ========== Section Grid ========== */
.section-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.section-grid::-webkit-scrollbar { display: none; }

/* Regular grid: seven cards on wide screens, three on small screens. */
.section-grid:not(.section-grid--scroll):not(.section-grid--bigimage) .section-card {
    flex: 0 0 calc((100% - 96px) / 7);
    min-width: 0;
    scroll-snap-align: start;
}
@media (max-width: 1279px) {
    .section-grid:not(.section-grid--scroll):not(.section-grid--bigimage) .section-card {
        flex-basis: calc((100% - 80px) / 6);
    }
}
@media (max-width: 1099px) {
    .section-grid:not(.section-grid--scroll):not(.section-grid--bigimage) .section-card {
        flex-basis: calc((100% - 64px) / 5);
    }
}
@media (max-width: 899px) {
    .section-grid:not(.section-grid--scroll):not(.section-grid--bigimage) .section-card {
        flex-basis: calc((100% - 48px) / 4);
    }
}
@media (max-width: 768px) {
    .section-grid:not(.section-grid--scroll):not(.section-grid--bigimage) .section-card {
        flex-basis: calc((100% - 20px) / 3);
    }
}

.section-grid--scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.section-grid--scroll::-webkit-scrollbar { display: none; }

/* 大图样式 - 横向滑动 */
.section-grid--bigimage {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.section-grid--bigimage::-webkit-scrollbar { display: none; }

/* Keep the scroll variant separate from the regular grid sizing. */
.section-grid--scroll .section-card {
    flex: 0 0 calc((100% - 32px) / 3);
    min-width: 0;
    scroll-snap-align: start;
}
.section-grid--bigimage .section-card {
    flex: 0 0 calc((100% - 48px) / 4);
    min-width: 0;
    scroll-snap-align: start;
}
@media (max-width: 899px) {
    .section-grid--bigimage .section-card {
        flex-basis: calc((100% - 32px) / 3);
    }
}
@media (max-width: 768px) {
    .section-grid--scroll .section-card {
        flex-basis: calc((100% - 10px) / 2.5);
    }
    .section-grid--bigimage .section-card {
        flex-basis: calc((100% - 10px) / 2);
    }
}

.section-card {
    color: inherit;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    background: var(--bg-card);
    cursor: pointer;
}
@media (hover: hover) {
    .section-card:hover { transform: translateY(-4px); }
}

.section-cover {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--bg-secondary);
}
.section-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
@media (hover: hover) {
    .section-card:hover .section-cover img { transform: scale(1.05); }
}

.free-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    background: #20c464;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.28);
    pointer-events: none;
}

.section-info { padding: 8px 10px 10px; }

.detail-cover { position: relative; }

.section-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ========== Hover Overlay ========== */
.section-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30,30,35,0.88);
    opacity: 0;
    transition: opacity 0.25s ease;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    pointer-events: none;
}
@media (hover: hover) {
    .section-card:hover .section-hover-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

.section-hover-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-hover-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    margin: 0;
}

.section-hover-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    margin: 0;
}

.section-hover-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.section-hover-playbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1;
    padding: 7px 0;
    background: #7b60f3;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}
.section-hover-playbtn:hover { background: #7b60f3; }

.section-hover-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.section-hover-icon:hover { background: rgba(255,255,255,0.25); }

/* ========== Top of This Week ========== */
.floor-title-gold {
    color: #f5c518;
    font-style: italic;
}

.genre-list--rank .genre-card-cover {
    position: relative;
}

.topweek-rank {
    position: absolute;
    top: 1px;
    left: 1px;
    min-width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff4757;
    color: white;
    font-size: 13px;
    font-weight: 700;
    border-radius: 3px;
    padding: 0 7px;
    z-index: 2;
}
.genre-card-cover.has-free-badge .topweek-rank { top: 32px; }

/* ========== Drama Grid ========== */
.drama-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
}

.drama-card {
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    background: var(--bg-card);
}
.drama-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--bg-secondary);
}
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.drama-card:hover .card-cover img { transform: scale(1.05); }

.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.card-cover.has-free-badge .card-badge { top: 34px; }
.card-score {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.card-info { padding: 10px 12px; }
.card-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.card-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.card-views {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

.empty-state {
    text-align: center;
    padding: 60px 16px;
    color: var(--text-muted);
    font-size: 16px;
}

/* ========== Genre Page ========== */
.genre-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
}

.genre-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.genre-breadcrumb a {
    color: var(--text-secondary);
    transition: var(--transition);
}
.genre-breadcrumb a:hover { color: var(--accent); }
.genre-breadcrumb span:last-child { color: var(--text-primary); }

.genre-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.genre-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.genre-card {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    transition: var(--transition);
}
.genre-card:hover {
    border-color: rgba(255,255,255,0.15);
    background: var(--bg-hover);
}

.genre-card-cover {
    flex-shrink: 0;
    width: 140px;
    aspect-ratio: 2/3;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-secondary);
    position: relative;
}
.genre-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.genre-card:hover .genre-card-cover img { transform: scale(1.03); }

.genre-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.genre-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.genre-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4.5em;
}

.genre-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.genre-card-views,
.genre-card-likes {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.genre-card-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 15px;
    background: white;
    color: #000;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
    transition: var(--transition);
}
.genre-card-play:hover {
    transform: scale(1.03);
    background: #f0f0f0;
}

.genre-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}
.genre-empty p { margin-bottom: 16px; font-size: 15px; }

/* ========== Categories Page ========== */
.categories-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
}

.categories-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 28px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cat-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}
.cat-group:hover {
    border-color: rgba(255,255,255,0.15);
}

.cat-group-name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}
.cat-group-name:hover { color: var(--accent); }

.cat-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-group-item {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}
.cat-group-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ========== Home Responsive ========== */
@media (max-width: 768px) {
    .carousel-title { font-size: 18px; margin-bottom: 12px; }
    .carousel-play { padding: 5px 15px; font-size: 13px; gap: 5px; }
    .carousel-play svg { width: 14px; height: 14px; }
    .section-grid {
        gap: 10px;
        padding-bottom: 4px;
    }

    .section-grid--scroll { gap: 10px; }
    .section-grid--bigimage {
        gap: 10px;
        padding-bottom: 4px;
    }
    .section-card-title { font-size: 12px; }

    .genre-list { grid-template-columns: 1fr; }
    .genre-card-cover { width: 120px; }
    .genre-card-title { font-size: 14px; }
    .genre-card-desc { -webkit-line-clamp: 2; }
}
