:root {
    --primary: #3498db;
    --primary-hover: #2980b9;
    --secondary: #2c3e50;
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-light: #7f8c8d;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.1);
    --nav-height: 75px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Themes (Dark themes removed per requirement) */
.theme-blue { 
    --primary: #3498db; 
    --primary-hover: #2980b9;
    --bg-body: #f0f4f8; 
}
.theme-green { 
    --primary: #2ecc71; 
    --primary-hover: #27ae60;
    --bg-body: #f0f8f4; 
}
.theme-purple { 
    --primary: #9b59b6; 
    --primary-hover: #8e44ad;
    --bg-body: #f4f0f8; 
}
.theme-orange { 
    --primary: #e67e22; 
    --primary-hover: #d35400;
    --bg-body: #f8f4f0; 
}
.theme-red { 
    --primary: #e74c3c; 
    --primary-hover: #c0392b;
    --bg-body: #f9f0f0; 
}

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding-top: var(--nav-height);
    transition: var(--transition);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Utilities */
.btn { 
    padding: 10px 24px; 
    border-radius: var(--radius); 
    cursor: pointer; 
    border: 1px solid rgba(0,0,0,0.1); /* 增加细边框确保在浅色背景下可见 */
    font-weight: 600; 
    transition: var(--transition); 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.btn-primary { 
    background: var(--primary); 
    color: var(--on-primary, #fff); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    border: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* 增加文字阴影提高辨识度 */
}
.btn-primary:hover { 
    background: var(--primary-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(0,0,0,0.15); 
}
/* 确保按钮在任何情况下都不与背景色完全一致 */
.btn:active { transform: scale(0.95); }
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1.5rem; }

/* Headers */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: #fff;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5%;
    transition: var(--transition);
}
.header-v1 { background: #fff; color: var(--text-main); }
.header-v2 { background: var(--primary); color: var(--on-primary, #fff); }
.header-v2 .logo-text { color: var(--on-primary, #fff); }
.header-v2 .nav-menu a { color: var(--on-primary, #fff); opacity: 0.85; }
.header-v2 .nav-menu a:hover { color: var(--on-primary, #fff); }
.header-v2 .auth-box a { color: var(--on-primary, #fff); border-color: currentColor; opacity: 0.9; }

.logo-text { font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.nav-menu { display: flex; gap: 30px; font-weight: 500; }
.nav-menu a { transition: var(--transition); }
.nav-menu a:hover { color: var(--primary); }
.auth-box { display: flex; gap: 15px; font-size: 14px; }

/* Bodies / Layouts */
.section-title { 
    font-size: 28px; 
    font-weight: 700;
    border-left: 6px solid var(--primary); 
    padding-left: 15px; 
    margin: 50px 0 30px; 
    color: var(--text-main);
}
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.card { 
    background: var(--bg-card); 
    border-radius: var(--radius); 
    overflow: hidden; 
    box-shadow: var(--shadow); 
    transition: var(--transition); 
    border: 1px solid rgba(0,0,0,0.03);
}
.card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow-hover); 
}
.card-img { width: 100%; height: 180px; object-fit: cover; transition: var(--transition); }
.card:hover .card-img { transform: scale(1.05); }
.card-body { padding: 20px; }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }
.card-desc { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* Footer */
.site-footer { 
    background: #1a1a1a; 
    color: #fff; 
    padding: 60px 0 40px; 
    margin-top: 80px; 
    transition: var(--transition);
}
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-brand { flex: 1; min-width: 250px; }
.footer-links { display: flex; gap: 40px; }
.footer-links h4 { margin-bottom: 20px; color: #fff; font-size: 18px; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links a { color: #999; transition: var(--transition); font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.compliance-text { 
    font-size: 13px; 
    color: #666; 
    margin-top: 40px; 
    border-top: 1px solid #333; 
    padding-top: 30px; 
    text-align: center;
    line-height: 1.8;
}

/* Admin */
.admin-layout { 
    display: flex; 
    min-height: 100vh; 
    margin-top: calc(-1 * var(--nav-height)); /* 抵消 body 的 padding-top */
}
.admin-sidebar { width: 250px; background: #2c3e50; color: #fff; padding: 20px; display: flex; flex-direction: column; }
.admin-sidebar a { display: block; padding: 12px 15px; color: #bdc3c7; border-radius: 8px; margin-bottom: 4px; transition: var(--transition); }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-content { flex: 1; padding: 15px 20px; background: #f0f2f5; }
/* 后台侧边栏品牌区域 */
.sidebar-brand {
    padding: 20px 15px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    background: rgba(0,0,0,0.2);
    margin: -20px -20px 15px -20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    letter-spacing: 1px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* 移除之前的居中样式，改为更通用的结构 */
.admin-header-title {
    margin: 0;
    font-size: 1.25rem;
    color: #2c3e50;
    font-weight: 600;
}

.admin-header-actions {
    display: flex;
    gap: 12px;
}
.form-group { margin-bottom: 15px; }
.form-control { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; }

/* Skeleton Screen */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Mobile Sidebar */
@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; padding: 10px; }
    .sidebar-brand { margin: 0 0 10px 0; border-bottom: none; }
    .admin-sidebar a { display: inline-block; margin-right: 10px; padding: 8px 12px; font-size: 13px; }
    .admin-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .admin-header-actions { width: 100%; justify-content: space-between; }
    
    .site-header { padding: 0 15px; }
    .header-search { display: none; } /* Hide search on small mobile to save space, or can be toggled */
    .logo-text { font-size: 18px; }
    .nav-menu { display: none; } /* Standard header nav hidden on mobile */
}
.detail-hero { height: 300px; background: #333; color: #fff; display: flex; align-items: flex-end; padding: 40px; background-size: cover; background-position: center; }
.detail-container { max-width: 1000px; margin: 40px auto; padding: 20px; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); }
.detail-meta { color: #888; margin-bottom: 20px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 20px; }
.gallery-img { width: 100%; border-radius: 4px; cursor: pointer; }

/* Detail Page Styles */
.dynamic-detail { padding-top: 20px; }
.video-container { background: #000; position: relative; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.main-video { width: 100%; height: 100%; object-fit: contain; }
.video-placeholder { text-align: center; color: #fff; }
.video-placeholder img { max-height: 300px; margin-bottom: 20px; opacity: 0.6; }
.video-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 20px; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff; }
.video-overlay h1 { margin: 0; font-size: 2rem; }

.info-content { display: flex; gap: 40px; margin-top: 30px; }
.info-main { flex: 3; }
.info-sidebar { flex: 1; }
.stats-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 10px; }

.anime-header { padding: 40px 0; border-bottom: 1px solid #eee; margin-bottom: 30px; }
.comic-strip img { width: 100%; display: block; margin-bottom: 10px; }

.audio-player-box { display: flex; gap: 40px; align-items: center; padding: 60px 0; }
.disc-rotating { width: 300px; height: 300px; border-radius: 50%; overflow: hidden; border: 10px solid #333; animation: rotate 20s linear infinite; }
.disc-rotating img { width: 100%; height: 100%; object-fit: cover; }
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.lyrics-box { margin-top: 30px; padding: 20px; background: rgba(0,0,0,0.02); border-radius: 8px; }
.lyrics-box pre { white-space: pre-wrap; font-family: inherit; line-height: 1.8; color: #666; }

.theater-header { display: flex; gap: 40px; margin-bottom: 40px; background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.theater-cover { flex: 1; max-width: 300px; }
.theater-cover img { width: 100%; border-radius: 8px; }
.theater-info { flex: 2; display: flex; flex-direction: column; justify-content: space-between; }
.theater-meta { font-size: 1.1rem; line-height: 2; color: #666; }
.theater-meta .price { font-size: 1.5rem; color: #e74c3c; font-weight: bold; }
.btn-buy { background: #e74c3c; color: #fff; border: none; padding: 15px 40px; font-size: 1.2rem; border-radius: 30px; cursor: pointer; transition: 0.3s; }
.btn-buy:hover { background: #c0392b; transform: translateY(-2px); }
.theater-body { background: #fff; padding: 40px; border-radius: 12px; }

/* Payment Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 2000; }
.modal-content { background: #fff; padding: 30px; border-radius: var(--radius); width: 400px; text-align: center; }
.pay-options { display: flex; gap: 20px; justify-content: center; margin: 20px 0; }
.pay-options .btn { border: 1px solid #ddd; background: #fff; transition: all 0.2s; padding: 10px 20px; font-size: 16px; margin: 0 5px; }
.pay-options .btn:hover { border-color: var(--primary); color: var(--primary); }
.pay-options .btn.active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; transform: scale(1.1); font-weight: bold; box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4); }
.qr-code { width: 200px; height: 200px; background: #eee; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
