/* ============================================
   a003 - Lavender Modern Card Theme
   Accent: #8b5cf6 (Lavender)  Background: #faf9fb
   Clean card-based design with strong shadows
   ============================================ */

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; font-size: 14px; color: #333; background: #faf9fb; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; transition: color .2s; }
a:hover { color: #8b5cf6; }
ul, ol { list-style: none; }
img { max-width: 100%; border: 0; vertical-align: middle; display: block; }
input, button { border: none; outline: none; font-family: inherit; -webkit-appearance: none; }
.hide { display: none !important; }

/* Layout */
.layout { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   Header - Clean bar with centered search
   ============================================ */
.header { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.logo { font-size: 20px; font-weight: 700; color: #8b5cf6; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo:hover { color: #8b5cf6; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; border-radius: 6px; font-size: 14px; }

/* Search Bar */
.search-bar { display: flex; flex: 1; max-width: 400px; height: 40px; background: #f3f4f6; border-radius: 20px; overflow: hidden; transition: box-shadow .2s; }
.search-bar:focus-within { box-shadow: 0 0 0 2px rgba(139,92,246,.2); }
.search-bar input { flex: 1; padding: 0 16px; background: transparent; color: #333; font-size: 14px; }
.search-bar input::placeholder { color: #999; }
.search-bar button { padding: 0 20px; background: #8b5cf6; color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .2s; }
.search-bar button:hover { background: #7c3aed; }

/* Nav */
.nav-main { display: flex; gap: 4px; }
.nav-main a { padding: 8px 14px; font-size: 14px; color: #666; border-radius: 8px; transition: all .2s; }
.nav-main a:hover { color: #8b5cf6; background: rgba(139,92,246,.06); }
.nav-main a.active { color: #8b5cf6; font-weight: 600; background: rgba(139,92,246,.1); }

/* Menu Toggle */
.menu-toggle { display: none; width: 32px; height: 32px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: #666; border-radius: 1px; transition: .2s; }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   Sections
   ============================================ */
.section { padding: 32px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 20px; font-weight: 600; color: #1a1a1a; }
.more { font-size: 13px; color: #999; }
.more:hover { color: #8b5cf6; }

.page-head { padding: 28px 0 24px; }
.page-head h1 { font-size: 26px; font-weight: 700; color: #1a1a1a; }

/* ============================================
   Video Grid - Elevated card style
   ============================================ */
.video-grid { display: grid; gap: 24px; }
.cols-5 { grid-template-columns: repeat(5, 1fr); }

.vcard { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: transform .25s, box-shadow .25s; }
.vcard:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(139,92,246,.12); }

.vcard-cover { position: relative; display: block; padding-bottom: 140%; overflow: hidden; }
.vcard-cover img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.vcard:hover .vcard-cover img { transform: scale(1.06); }

.vcard-tag { position: absolute; bottom: 8px; left: 8px; padding: 3px 8px; background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; font-size: 11px; font-weight: 600; border-radius: 4px; }

.vcard-info { padding: 14px; }
.vcard-title { font-size: 14px; color: #333; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.vcard-title:hover { color: #8b5cf6; }

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb { padding: 20px 0 16px; font-size: 13px; color: #999; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #8b5cf6; }
.breadcrumb span { margin: 0 6px; color: #ddd; }

/* ============================================
   Detail Page - Card layout
   ============================================ */
.detail-card { display: flex; gap: 32px; padding: 24px; background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,.05); margin-bottom: 32px; }
.detail-left { flex-shrink: 0; }
.detail-poster { width: 220px; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(139,92,246,.15); }
.detail-poster img { width: 100%; display: block; }

.detail-right { flex: 1; padding: 8px 0; }
.detail-right h1 { font-size: 26px; font-weight: 700; color: #1a1a1a; margin-bottom: 12px; }

.detail-score { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 20px; }
.detail-score .star { color: #fbbf24; font-size: 20px; }
.detail-score .num { font-size: 24px; font-weight: 700; color: #8b5cf6; }

.detail-meta { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.detail-meta th { width: 60px; padding: 10px 0; text-align: left; font-weight: 400; color: #999; vertical-align: top; }
.detail-meta td { padding: 10px 0; color: #333; border-bottom: 1px solid #f0f0f0; }
.detail-meta tr:last-child td { border-bottom: none; }

.detail-actions { padding-top: 8px; }
.btn-primary { display: inline-block; padding: 12px 40px; background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #fff; font-size: 15px; font-weight: 600; border-radius: 25px; transition: transform .2s, box-shadow .2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139,92,246,.35); color: #fff; }
.btn-primary.disabled { background: #e5e5e5; color: #999; cursor: not-allowed; box-shadow: none; }

/* Episode Section - Grid style */
.ep-section { padding: 24px 0; border-bottom: 1px solid #f0f0f0; }
.ep-section h3 { font-size: 16px; color: #8b5cf6; margin-bottom: 16px; font-weight: 600; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px; }
.ep-btn { display: block; padding: 10px 0; text-align: center; background: #f8f7fa; color: #666; font-size: 13px; border-radius: 8px; transition: all .2s; }
.ep-btn:hover { background: rgba(139,92,246,.1); color: #8b5cf6; }
.ep-btn.current { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; font-weight: 600; }

/* Description */
.desc-section { padding: 24px 0; }
.desc-section h3 { font-size: 16px; color: #1a1a1a; margin-bottom: 12px; font-weight: 600; }
.desc-section p { color: #666; line-height: 1.9; }

/* ============================================
   Player
   ============================================ */
.play-title { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 20px; }
.player-box { position: relative; width: 100%; max-width: 900px; aspect-ratio: 16/9; background: #1a1a1a; border-radius: 16px; overflow: hidden; margin-bottom: 24px; box-shadow: 0 8px 32px rgba(0,0,0,.1); }
.player-box iframe, .player-box video, .player-box embed, .player-box object { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.player-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #1a1a1a; z-index: 2; color: #999; gap: 16px; }
.loader { width: 40px; height: 40px; border: 3px solid #333; border-top-color: #8b5cf6; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   Paging - Capsule button style
   ============================================ */
.paging { display: flex; justify-content: center; padding: 32px 0; }
.paging ul { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.paging ul li a, .paging a { display: inline-block; min-width: 40px; height: 36px; line-height: 36px; text-align: center; padding: 0 14px; background: #fff; color: #666; font-size: 13px; border-radius: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: all .2s; }
.paging ul li a:hover, .paging a:hover { background: rgba(139,92,246,.1); color: #8b5cf6; }
.paging ul li.active a, .paging .active a { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(139,92,246,.3); }
.paging ul li.disabled a, .paging .disabled a { background: #f5f5f5; color: #ccc; cursor: not-allowed; box-shadow: none; }

/* Empty */
.empty-tip { text-align: center; padding: 48px 0; color: #999; }

/* ============================================
   Footer
   ============================================ */
.footer { margin-top: 48px; padding: 40px 0; background: #fff; text-align: center; }
.footer-brand { font-size: 18px; font-weight: 700; color: #8b5cf6; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-links a { font-size: 13px; color: #999; }
.footer-links a:hover { color: #8b5cf6; }
.footer-copy { font-size: 12px; color: #ccc; }

/* ============================================
   Responsive
   ============================================ */

/* Tablet ≤1024px */
@media (max-width: 1024px) {
    .cols-5 { grid-template-columns: repeat(4, 1fr); }
    .detail-poster { width: 180px; }
    .nav-main { display: none; position: fixed; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 20px; gap: 0; z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
    .nav-main.show { display: flex; }
    .nav-main a { padding: 14px 0; border-bottom: 1px solid #f0f0f0; font-size: 15px; border-radius: 0; }
    .nav-main a.active { background: transparent; }
    .menu-toggle { display: flex; }
}

/* Mobile ≤768px */
@media (max-width: 768px) {
    .layout { padding: 0 16px; }
    .header-inner { height: 56px; gap: 12px; }
    .search-bar { max-width: 200px; height: 36px; }
    .search-bar button { padding: 0 14px; font-size: 12px; }
    .cols-5 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .detail-card { flex-direction: column; padding: 20px; gap: 20px; }
    .detail-poster { width: 140px; }
    .detail-right h1 { font-size: 20px; }
    .section-head h2 { font-size: 18px; }
    .page-head h1 { font-size: 22px; }
    .player-box { border-radius: 12px; }
    .ep-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
}

/* Small phone ≤480px */
@media (max-width: 480px) {
    .cols-5 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .vcard-info { padding: 10px 12px; }
    .vcard-title { font-size: 13px; }
    .search-bar { display: none; }
    .ep-btn { padding: 8px 0; font-size: 12px; }
    .paging ul li a, .paging a { min-width: 34px; height: 32px; line-height: 32px; padding: 0 10px; font-size: 12px; }
    .footer-links { gap: 16px; }
}
