/**
 * 中国农历新年（春节）风格主题 - 喜庆版
 * 在 body 上添加 class="theme-cny" 时生效
 * 元素：中国红、金色、祥云纹、灯笼意象、金边福纹、鞭炮条
 */

/* ========== 全局：背景与节日氛围 ========== */
body.theme-cny {
    background-color: rgba(30, 8, 8, 0.5) !important;
    background-image: url('/images/bg_body%20year.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
}
body.theme-cny.has-video-background {
    background-color: rgba(25, 5, 5, 0.7) !important;
    background-image: url('/images/bg_body%20year.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
}
body.theme-cny.has-video-background::before {
    background: linear-gradient(to bottom, rgba(180, 30, 45, 0.2) 0%, rgba(139, 0, 0, 0.15) 30%, rgba(0, 0, 0, 0.55) 100%);
}

/* 顶栏：喜庆红 + 金边 + 祥云感渐变 */
body.theme-cny .header {
    background: linear-gradient(135deg, #b22222 0%, #c41e3a 25%, #dc143c 50%, #b22222 75%, #8b0000 100%);
    border-bottom: 3px solid #d4af37;
    box-shadow: 0 4px 24px rgba(212, 175, 55, 0.35), 0 0 40px rgba(196, 30, 58, 0.2), inset 0 1px 0 rgba(255, 220, 100, 0.2);
}
body.theme-cny .header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700, #fff8dc, #ffd700, transparent);
    opacity: 0.7;
    pointer-events: none;
}
body.theme-cny .logo-icon {
    color: #ffd700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
}
body.theme-cny .logo-text {
    color: #fff8dc;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* 导航：金/暖色高亮 */
body.theme-cny .nav-link {
    color: #ffddcc;
}
body.theme-cny .nav-link:hover {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
body.theme-cny .nav-link.active {
    color: #ffd700;
    font-weight: 600;
}
body.theme-cny .nav-link.active::after {
    background: linear-gradient(90deg, #d4af37, #ffd700);
    height: 3px;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
body.theme-cny .icon-link {
    color: #ffddcc;
}
body.theme-cny .icon-link:hover {
    color: #ffd700;
}

/* 英雄区：红金渐变标题 + 节日遮罩 */
body.theme-cny .hero-section::before {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 215, 0, 0.04) 2px,
        rgba(255, 215, 0, 0.04) 4px
    );
}
body.theme-cny .hero-overlay {
    background: linear-gradient(to bottom, rgba(180, 30, 45, 0.3) 0%, rgba(139, 0, 0, 0.2) 25%, rgba(10, 10, 10, 0.6) 100%);
}
body.theme-cny .hero-title {
    background: linear-gradient(135deg, #fff8dc 0%, #ffd700 35%, #c41e3a 70%, #8b0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
body.theme-cny .hero-subtitle {
    color: #ffe4c4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 区块标题 */
body.theme-cny .section-title {
    color: #fff8dc;
}
body.theme-cny .section-title {
    position: relative;
}
body.theme-cny .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    margin-top: 8px;
    background: linear-gradient(90deg, #d4af37, #ffd700);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
body.theme-cny .section-description {
    color: #e8c4a0;
}

/* 功能卡片：金边 + 红底 + 灯笼感光晕 */
body.theme-cny .feature-card {
    background: linear-gradient(145deg, rgba(60, 15, 15, 0.6) 0%, rgba(35, 10, 10, 0.7) 100%);
    border: 2px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 215, 0, 0.1);
}
body.theme-cny .feature-card::before {
    background: linear-gradient(90deg, #c41e3a, #d4af37, #ffd700, #d4af37);
    opacity: 0.9;
    height: 3px;
}
body.theme-cny .feature-card:hover {
    border-color: #ffd700;
    box-shadow: 0 12px 36px rgba(212, 175, 55, 0.3), 0 0 24px rgba(196, 30, 58, 0.15);
}
body.theme-cny .feature-icon {
    color: #ffd700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}
body.theme-cny .feature-link {
    color: #d4af37;
}
body.theme-cny .feature-link:hover {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* 页脚：深红底 + 金线 + 福纹感 */
body.theme-cny .footer {
    background: linear-gradient(to top, #1a0505 0%, #2d0a0a 40%, #3d1212 100%);
    border-top: 3px solid rgba(212, 175, 55, 0.6);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 215, 0, 0.15);
}
body.theme-cny .footer::before {
    background: linear-gradient(90deg, transparent, #d4af37, #ffd700, #d4af37, transparent);
    opacity: 0.8;
    height: 2px;
}
body.theme-cny .footer-title::after {
    background: linear-gradient(90deg, #d4af37, #ffd700);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}
body.theme-cny .footer-links li::before {
    color: #d4af37;
}
body.theme-cny .footer-links li a:hover {
    color: #ffd700;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}
body.theme-cny .footer-bottom {
    border-top-color: rgba(212, 175, 55, 0.4);
}
body.theme-cny .footer-bottom::before {
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    opacity: 0.7;
}
body.theme-cny .footer-bottom p {
    color: #d4a574;
}

/* 按钮：中国红 + 金边高亮 */
body.theme-cny .btn-primary,
body.theme-cny a.btn-primary {
    background: linear-gradient(135deg, #c41e3a 0%, #a52a2a 50%, #8b0000 100%) !important;
    border: 2px solid #d4af37 !important;
    color: #fff8dc !important;
    box-shadow: 0 4px 16px rgba(196, 30, 58, 0.4), 0 0 0 1px rgba(255, 215, 0, 0.2);
}
body.theme-cny .btn-primary:hover {
    background: linear-gradient(135deg, #dc143c 0%, #c41e3a 50%, #a52a2a 100%) !important;
    border-color: #ffd700 !important;
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.45), 0 0 20px rgba(255, 215, 0, 0.2);
}
body.theme-cny .footer-online-count,
body.theme-cny .footer-online-user-admin {
    color: #ff5555;
}
body.theme-cny .footer-online-user-mod {
    color: #ffd700;
}
body.theme-cny .footer-online-user-member {
    color: #5aaeff;
}
body.theme-cny .footer-online-user-guest {
    color: #888888;
}
body.theme-cny .footer-online-username {
    color: #e8c4a0;
}

/* 移动端导航 */
body.theme-cny .mobile-nav-link.active {
    color: #ffd700;
}
body.theme-cny .mobile-menu-toggle span {
    background-color: #ffddcc;
}

/* 春节主题：导航栏背景音乐播放/暂停按钮（仅春节样式显示） */
body.theme-cny .cny-bg-music-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}
body.theme-cny .cny-bg-music-hint {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    padding: 6px 12px;
    white-space: nowrap;
    font-size: 12px;
    color: #fff8dc;
    background: rgba(139, 0, 0, 0.9);
    border: 1px solid #d4af37;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    animation: cny-hint-blink 1.2s ease-in-out infinite;
}
body.theme-cny .cny-bg-music-hint::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-bottom-color: #d4af37;
}
@keyframes cny-hint-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}
body.theme-cny .cny-bg-music-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.6);
    border-radius: 8px;
    color: #ffd700;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
body.theme-cny .cny-bg-music-btn:hover {
    background: rgba(255, 215, 0, 0.35);
    border-color: #ffd700;
    color: #fff8dc;
}
body.theme-cny .cny-bg-music-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.4);
}

/* 后台管理：顶栏与侧栏喜庆风格 */
body.theme-cny .admin-wrapper .header {
    background: linear-gradient(135deg, #8b0000 0%, #c41e3a 50%, #8b0000 100%);
    border-bottom: 3px solid #d4af37;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}
body.theme-cny .admin-sidebar {
    background: linear-gradient(180deg, #1a0808 0%, #2a1010 100%) !important;
    border-right: 2px solid rgba(212, 175, 55, 0.35);
}
body.theme-cny .admin-nav-item:hover,
body.theme-cny .admin-nav-item.active {
    color: #ffd700 !important;
    background: rgba(212, 175, 55, 0.15) !important;
}
body.theme-cny .admin-nav-item.active {
    border-left: 3px solid #d4af37 !important;
}
