/**
 * 视频站样式 - 仿maccms10大狗影院风格
 */

/* ========== 全局 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #666666;
    --accent: #e50914; /* Netflix红 */
    --accent-hover: #ff1a25;
    --accent-blue: #00b4d8;
    --border: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.5);
    --gradient: linear-gradient(135deg, #e50914 0%, #b20710 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== 顶部导航 ========== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s;
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: var(--border);
}

body {
    padding-top: 60px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.logo-icon {
    width: 36px;
    height: 36px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 汉堡菜单按钮（仅移动端可见） */
.hamburger-btn {
    display: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 110;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.hamburger-btn span:nth-child(1) { top: 10px; }
.hamburger-btn span:nth-child(2) { top: 17px; }
.hamburger-btn span:nth-child(3) { top: 24px; }

/* 展开态 */
.hamburger-btn.open span:nth-child(1) {
    top: 17px;
    transform: translateX(-50%) rotate(45deg);
}
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) {
    top: 17px;
    transform: translateX(-50%) rotate(-45deg);
}

/* 导航菜单 */
.nav {
    flex: 1;
    display: flex;
    gap: 4px;
    justify-content: center;
    min-width: 0;
    overflow-x: auto;
}

.nav a {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.25s ease;
}

.nav a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
    background: var(--text-muted);
}

.nav a.active {
    color: var(--accent);
    background: rgba(229, 9, 20, 0.1);
}

.nav a.active::after {
    transform: translateX(-50%) scaleX(1);
    background: var(--accent);
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.5);
}

.nav-external {
    background: rgba(229, 9, 20, 0.12) !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
}

.nav-external::before {
    content: '🔗';
    margin-right: 4px;
    font-size: 12px;
}

.nav-external.active {
    background: var(--accent) !important;
    color: #fff !important;
}

/* 搜索框 */
.search-box {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0 14px;
    transition: all 0.25s;
}

.search-box:focus-within {
    border-color: var(--accent);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    padding: 8px;
    width: 180px;
    outline: none;
}

.search-box input::placeholder { color: var(--text-muted); }

.search-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

/* ========== 轮播横幅 ========== */
.banner {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a0a0a 0%, #0d0d0d 100%);
}

.banner-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.banner-slide.active { opacity: 1; }

.banner-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    z-index: 1;
}

.banner-bg-blur {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(20px) brightness(0.2) saturate(1.2);
    transform: scale(1.05);
    z-index: 0;
    will-change: filter;
}

.banner-content {
    position: absolute;
    bottom: 35%;
    left: 8%;
    max-width: 480px;
    z-index: 10;
}

.banner-tag {
    display: inline-block;
    background: var(--gradient);
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.banner-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
    text-shadow: 0 4px 20px var(--shadow);
}

.banner-meta {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 6px;
}

.banner-meta span { margin-right: 14px; }

.banner-desc {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 12px;
    max-height: 2.2em;
}

.banner-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: var(--gradient);
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.banner-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.5);
    color: #fff;
}

.banner-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dot.active {
    background: var(--accent);
    width: 36px;
    border-radius: 6px;
}

/* ========== 分类筛选 ========== */
.category-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.category-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 6px 18px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.cat-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(229, 9, 20, 0.08);
    transform: translateY(-1px);
}

.cat-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.35);
    transform: translateY(-1px);
}

/* ========== 区块标题 ========== */
.section {
    padding: 32px 0;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-more {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.section-more:hover { color: var(--accent); }

/* ========== 视频网格 ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* ========== 视频卡片 ========== */
.video-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px var(--shadow);
}

.card-cover {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-hover) 0%, var(--bg-card) 100%);
}

.card-cover img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.3s;
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 50%, #1e1e2e 100%);
    background-size: 200% 200%;
    animation: shimmer 1.5s infinite;
}

.card-cover img.loaded {
    animation: none;
    background: none;
}

.video-card:hover .card-cover img { transform: scale(1.08); }

.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(229, 9, 20, 0.9);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px 10px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .card-overlay { opacity: 1; }

.card-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 48px;
    height: 48px;
    background: rgba(229, 9, 20, 0.9);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s;
}

.video-card:hover .card-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-info {
    padding: 10px 12px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.card-category {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-category .tag {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(229, 9, 20, 0.2);
    color: var(--accent);
    border-radius: 3px;
    font-size: 11px;
}

/* ========== 排行侧边栏 ========== */
.rank-box {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.rank-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-list { list-style: none; }

.rank-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    transition: background 0.2s;
    cursor: pointer;
}

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

.rank-item:hover { color: var(--accent); }

.rank-num {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-hover);
    color: var(--text-muted);
    flex-shrink: 0;
}

.rank-item:nth-child(1) .rank-num { background: var(--accent); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: #ff6b35; color: #fff; }
.rank-item:nth-child(3) .rank-num { background: #ffa500; color: #fff; }

.rank-info { flex: 1; min-width: 0; }

.rank-info .title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-info .meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== 详情页 ========== */
.detail-header {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.detail-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(20px) brightness(0.2);
    transform: scale(1.1);
}

.detail-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    display: flex;
    gap: 40px;
}

.detail-poster {
    width: 240px;
    flex-shrink: 0;
}

.detail-poster img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow);
}

.detail-info { flex: 1; padding-top: 20px; }

.detail-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-meta .tag {
    padding: 3px 12px;
    background: rgba(229, 9, 20, 0.2);
    color: var(--accent);
    border-radius: 4px;
    font-size: 12px;
}

.detail-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.4);
}

/* ========== 播放器 ========== */
.player-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--shadow);
}

.player-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.player-info {
    margin-top: 20px;
}

.player-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.player-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.player-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

/* ========== 其他视频资源链接卡片 ========== */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 12px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--brand-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.link-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-color);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 20px color-mix(in srgb, var(--brand-color) 20%, transparent);
}

.link-card:hover::before {
    transform: scaleX(1);
}

.link-icon {
    font-size: 36px;
    margin-bottom: 10px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.link-card:hover .link-icon {
    transform: scale(1.15);
}

.link-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.link-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 40px 0;
}

.page-btn {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-state .icon { font-size: 64px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h2 { font-size: 20px; color: var(--text-muted); margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--text-muted); }

/* ========== 页脚 ========== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 40px;
}

.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--accent); }

/* ========== 骨架屏 ========== */
.skeleton {
    animation: shimmer 1.5s infinite;
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-card) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .header-inner { height: 50px; }

    .hamburger-btn { display: block; }

    .nav {
        display: none;
        position: fixed;
        top: 50px;
        left: 0; right: 0;
        background: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
        border-bottom: 1px solid var(--border);
        z-index: 105;
        max-height: calc(100vh - 50px);
        overflow-y: auto;
    }

    .nav.open { display: flex; }

    .nav a {
        padding: 14px 24px;
        border-radius: 0;
        font-size: 15px;
        color: var(--text-secondary);
    }

    .nav a:hover,
    .nav a.active {
        color: var(--text-primary);
        background: rgba(255,255,255,0.05);
    }

    .nav a.active {
        color: var(--accent);
    }

    .nav-external {
        background: none !important;
        color: var(--accent) !important;
    }

    .nav-external::before {
        margin-right: 8px;
    }

    .nav a::after { display: none; }

    .search-box input { width: 120px; }
    .banner { height: 100vh; min-height: 500px; }
    .banner-title { font-size: 24px; }
    .banner-content { left: 24px; right: 24px; bottom: 25%; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .link-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
    .link-card { padding: 16px 8px; }
    .link-icon { font-size: 28px; }
    .link-name { font-size: 13px; }
    .detail-content { flex-direction: column; align-items: center; }
    .detail-poster { width: 160px; }
    .detail-title { font-size: 24px; }
}

@media (max-width: 480px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .link-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}