/* z0004 - Disney+ Card Theme */
/* Disney蓝: #0063E5 | 清新卡片风 */

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; background: #f4f6f9; color: #1a1d29; line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: #0063E5; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; outline: none; }

/* ===== Container ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header { background: linear-gradient(135deg, #0063E5 0%, #0080FF 100%); color: #fff; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 12px rgba(0, 99, 229, 0.3); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; height: 60px; gap: 24px; }
.logo { font-size: 1.35rem; font-weight: 700; color: #fff; white-space: nowrap; letter-spacing: 0.5px; }
.logo:hover { color: #fff; opacity: 0.9; }

/* Main Nav */
.main-nav { flex: 1; }
.main-nav > ul { display: flex; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a { display: block; padding: 8px 16px; border-radius: 8px; font-size: 0.95rem; color: rgba(255,255,255,0.85); transition: all 0.2s; }
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active { background: rgba(255,255,255,0.15); color: #fff; }

/* Sub Nav */
.has-sub:hover .sub-nav { display: block; }
.sub-nav { display: none; position: absolute; top: 100%; left: 0; min-width: 160px; background: #fff; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); padding: 8px 0; z-index: 100; margin-top: 4px; }
.sub-nav li a { display: block; padding: 10px 20px; color: #333; font-size: 0.9rem; transition: all 0.2s; }
.sub-nav li a:hover,
.sub-nav li a.active { background: #f0f7ff; color: #0063E5; }

/* Header Search */
.header-search { display: flex; align-items: center; background: rgba(255,255,255,0.15); border-radius: 24px; overflow: hidden; transition: background 0.2s; }
.header-search:focus-within { background: rgba(255,255,255,0.25); }
.header-search input { width: 200px; height: 36px; padding: 0 16px; background: transparent; border: none; color: #fff; font-size: 0.9rem; }
.header-search input::placeholder { color: rgba(255,255,255,0.6); }
.header-search button { padding: 0 16px; height: 36px; color: #fff; font-size: 0.9rem; font-weight: 500; }
.header-search button:hover { background: rgba(255,255,255,0.1); }

/* Mobile Buttons */
.mobile-btns { display: none; gap: 8px; align-items: center; margin-left: auto; }
.mobile-btns button { color: #fff; padding: 6px; border-radius: 8px; }
.mobile-btns button:hover { background: rgba(255,255,255,0.15); }

/* Search Panel (Mobile) */
.search-panel { display: none; background: #0063E5; padding: 12px 24px; }
.search-panel.show { display: block; }
.search-panel-inner { display: flex; gap: 8px; max-width: 1280px; margin: 0 auto; }
.search-panel-inner input { flex: 1; height: 40px; padding: 0 16px; border-radius: 20px; border: none; background: rgba(255,255,255,0.2); color: #fff; font-size: 0.95rem; }
.search-panel-inner input::placeholder { color: rgba(255,255,255,0.6); }
.search-panel-inner button { padding: 0 20px; height: 40px; background: #fff; color: #0063E5; border-radius: 20px; font-weight: 600; font-size: 0.9rem; }

/* Mobile Nav */
.mobile-nav { display: none; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.1); max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.mobile-nav.show { display: block; max-height: 80vh; overflow-y: auto; }
.mobile-nav ul { padding: 8px 0; }
.mobile-nav li a { display: block; padding: 12px 24px; color: #333; font-size: 0.95rem; border-bottom: 1px solid #f0f0f0; }
.mobile-nav li a:hover { background: #f0f7ff; color: #0063E5; }
.mobile-nav .sub-item a { padding-left: 48px; color: #666; font-size: 0.9rem; }

/* ===== Hero Banner (Index) ===== */
.hero-banner { display: none; }

/* ===== Featured Grid ===== */
.featured-section { margin-top: 30px; position: relative; z-index: 1; }
.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.featured-item { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.1); transition: all 0.3s ease; }
.featured-item:hover { transform: translateY(-4px); box-shadow: 0 6px 24px rgba(0,0,0,0.18); }
.featured-item a { display: block; position: relative; }
.featured-item .cover { display: block; position: relative; padding-bottom: 66.67%; overflow: hidden; background: #1a1d29; }
.featured-item .cover img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.featured-item:hover .cover img { transform: scale(1.05); }
.featured-item .info { position: absolute; bottom: 0; left: 0; right: 0; padding: 32px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.8)); }
.featured-item .info .title { color: #fff; font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.featured-item .info .mark { display: inline-block; background: #0063E5; color: #fff; padding: 2px 10px; border-radius: 6px; font-size: 0.75rem; margin-bottom: 4px; }

/* ===== Content Section ===== */
.content-section { margin-top: 36px; }
.content-section:last-child { margin-bottom: 40px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-header h2 { font-size: 1.4rem; font-weight: 700; color: #1a1d29; position: relative; padding-left: 16px; }
.section-header h2::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 24px; background: #0063E5; border-radius: 2px; }
.more-link { color: #0063E5; font-size: 0.9rem; font-weight: 500; }
.more-link:hover { color: #004BB5; }

/* ===== Video Grid ===== */
.video-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; align-items: start; }
.item { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: all 0.3s ease; }
.item:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0, 99, 229, 0.15); }
.item a { display: block; }
.item .cover { display: block; position: relative; padding-bottom: 150%; overflow: hidden; background: #e8edf3; }
.item .cover img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.item:hover .cover img { transform: scale(1.03); }
.item .cover .mark { position: absolute; right: 0; bottom: 0; background: linear-gradient(135deg, #0063E5, #0080FF); color: #fff; padding: 2px 8px; border-radius: 6px 0 0 0; font-size: 0.7rem; }
.item .info { padding: 10px 12px 14px; }
.item .info .title { font-size: 0.88rem; color: #1a1d29; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }

/* ===== List Page ===== */
.list-section { padding-top: 30px; padding-bottom: 40px; }
.list-section h1 { font-size: 1.6rem; font-weight: 700; color: #1a1d29; margin-bottom: 20px; }
.list-section h1 .count { font-size: 0.9rem; font-weight: 400; color: #999; margin-left: 8px; }

/* Category Tabs */
.category-tabs { display: flex; gap: 10px; margin-bottom: 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.tab-item { flex-shrink: 0; padding: 8px 20px; border-radius: 24px; background: #fff; color: #555; font-size: 0.9rem; border: 1px solid #e8e8e8; transition: all 0.2s; white-space: nowrap; }
.tab-item:hover { border-color: #0063E5; color: #0063E5; }
.tab-item.active { background: #0063E5; color: #fff; border-color: #0063E5; }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 20px 0 16px; font-size: 0.88rem; color: #999; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #0063E5; }
.breadcrumb span { margin: 0 6px; color: #ccc; }
.breadcrumb span:last-child { color: #333; margin: 0; margin-left: 6px; }

/* ===== Detail Page (Archive) ===== */
.detail-section { margin-bottom: 32px; }
.detail-section h1 { font-size: 1.8rem; font-weight: 700; color: #1a1d29; margin-bottom: 20px; }
.detail-section h1 .subtitle { font-size: 1rem; font-weight: 500; color: #0063E5; margin-top: 4px; }
.detail-card { display: flex; gap: 32px; background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.detail-poster { flex-shrink: 0; width: 260px; }
.detail-poster .cover { display: block; position: relative; padding-bottom: 150%; overflow: hidden; border-radius: 12px; background: #e8edf3; }
.detail-poster .cover img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; display: flex; flex-direction: column; }
.info-table { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.info-row { display: flex; align-items: baseline; gap: 12px; font-size: 0.95rem; line-height: 1.6; }
.info-label { flex-shrink: 0; color: #999; min-width: 48px; }
.info-value { color: #333; word-break: break-all; }
.play-actions { margin-top: auto; }
.btn-play { display: inline-block; padding: 12px 40px; background: linear-gradient(135deg, #0063E5, #0080FF); color: #fff; border-radius: 28px; font-size: 1rem; font-weight: 600; transition: all 0.3s; box-shadow: 0 4px 16px rgba(0, 99, 229, 0.3); }
.btn-play:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0, 99, 229, 0.4); }
.btn-play.disabled { background: #ccc; cursor: default; box-shadow: none; }
.btn-play.disabled:hover { transform: none; }

/* Source Card */
.source-card { background: #fff; border-radius: 16px; padding: 20px 24px; margin-bottom: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.source-title { font-size: 1rem; font-weight: 600; color: #1a1d29; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }

/* Episode List */
.episode-list { display: flex; flex-wrap: wrap; gap: 10px; }
.episode-btn { display: inline-block; padding: 8px 18px; background: #f4f6f9; color: #333; border-radius: 10px; font-size: 0.85rem; transition: all 0.2s; border: 1px solid transparent; }
.episode-btn:hover { background: #e8f0fe; color: #0063E5; border-color: #0063E5; }
.episode-btn.current { background: #0063E5; color: #fff; border-color: #0063E5; }

/* Description Card */
.desc-card { background: #fff; border-radius: 16px; padding: 24px; margin-bottom: 32px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.desc-card h2 { font-size: 1.1rem; font-weight: 600; color: #1a1d29; margin-bottom: 12px; }
.desc-card p { font-size: 0.95rem; color: #555; line-height: 1.8; }

/* ===== Player ===== */
.player-card { background: #000; border-radius: 16px; overflow: hidden; margin-bottom: 24px; box-shadow: 0 4px 24px rgba(0,0,0,0.15); }
.video-player { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.video-player iframe,
.video-player video,
.video-player embed,
.video-player object { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.player-placeholder { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0a0a1a; color: rgba(255,255,255,0.7); z-index: 1; transition: opacity 0.4s; }
.player-placeholder.hide { opacity: 0; pointer-events: none; }
.player-placeholder p { margin-top: 16px; font-size: 0.9rem; }
.player-spinner { width: 44px; height: 44px; border: 3px solid rgba(255,255,255,0.15); border-top-color: #0063E5; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Search Page ===== */
.search-section { padding-top: 30px; padding-bottom: 40px; }
.search-section h1 { font-size: 1.4rem; font-weight: 600; color: #1a1d29; margin-bottom: 24px; }
.empty-state { text-align: center; padding: 60px 20px 40px; }
.empty-state .empty-icon { margin-bottom: 16px; }
.empty-state p { color: #999; font-size: 1rem; }

/* ===== Paging ===== */
.paging { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 32px 0; flex-wrap: wrap; }
.paging a,
.paging span,
.paging ul > li > a,
.paging ul > li > span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 14px; border-radius: 20px; font-size: 0.9rem; transition: all 0.2s; text-decoration: none; }
.paging a,
.paging ul > li > a { background: #fff; color: #333; border: 1px solid #e0e0e0; }
.paging a:hover,
.paging ul > li > a:hover { background: #0063E5; color: #fff; border-color: #0063E5; }
.paging a.current,
.paging span.current,
.paging ul > li > a.current,
.paging ul > li > span.current,
.paging .active a,
.paging .active span,
.paging span { background: #0063E5; color: #fff; font-weight: 600; border: 1px solid #0063E5; }
.paging a.disabled,
.paging span.disabled,
.paging ul > li > a.disabled { color: #c0c0c0; background: #f5f5f5; border-color: #e0e0e0; cursor: default; pointer-events: none; }
.paging ul { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; }
.paging select { height: 40px; padding: 0 10px; border: 1px solid #e0e0e0; border-radius: 20px; font-size: 0.9rem; color: #333; background: #fff; }

/* ===== Footer ===== */
.site-footer { background: #1a1d29; color: rgba(255,255,255,0.6); margin-top: 60px; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 40px 24px 32px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-bottom: 20px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: #0063E5; }
.footer-copy p { font-size: 0.82rem; color: rgba(255,255,255,0.4); }

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 1200px) {
    .video-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .featured-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}

@media (max-width: 992px) {
    .header-search { display: none; }
    .mobile-btns { display: flex; }
    .main-nav { display: none; }
    .video-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .detail-card { flex-direction: column; }
    .detail-poster { width: 100%; max-width: 300px; }
}

/* Tablet Small */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header-inner { padding: 0 16px; height: 54px; }
    .featured-section { margin-top: 20px; }
    .video-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .content-section { margin-top: 28px; }
    .section-header h2 { font-size: 1.2rem; }
    .item { border-radius: 10px; }
    .item .info { padding: 8px 10px 12px; }
    .item .info .title { font-size: 0.82rem; }
    .featured-item { border-radius: 10px; }
    .detail-section h1 { font-size: 1.4rem; }
    .detail-card { padding: 16px; }
    .source-card { padding: 16px; }
    .desc-card { padding: 16px; }
    .player-card { border-radius: 12px; }
    .list-section h1 { font-size: 1.3rem; }
}

/* Mobile */
@media (max-width: 576px) {
    .video-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .featured-section { margin-top: 16px; }
    .featured-item .cover { padding-bottom: 150%; }
    .item { border-radius: 10px; box-shadow: 0 1px 8px rgba(0,0,0,0.05); }
    .item .info { padding: 6px 8px 10px; }
    .item .info .title { font-size: 0.78rem; }
    .item .cover .mark { font-size: 0.65rem; padding: 1px 6px; }
    .featured-item { border-radius: 8px; }
    .featured-item .info { padding: 36px 10px 10px; }
    .featured-item .info .title { font-size: 0.85rem; }
    .detail-poster { max-width: 100%; }
    .btn-play { padding: 10px 32px; font-size: 0.9rem; }
    .episode-btn { padding: 6px 14px; font-size: 0.8rem; }
    .section-header h2 { font-size: 1.1rem; padding-left: 12px; }
    .section-header h2::before { height: 20px; }
    .paging a,
    .paging span,
    .paging ul > li > a,
    .paging ul > li > span { min-width: 34px; height: 34px; padding: 0 10px; font-size: 0.82rem; border-radius: 17px; }
    .footer-inner { padding: 30px 16px 24px; }
    .footer-links { gap: 6px 16px; }
    .footer-links a { font-size: 0.8rem; }
}

/* Small Mobile */
@media (max-width: 400px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
