:root {
    --bg-color: #121212;
    --header-bg: #1a1a1a;
    --card-bg: #252525;
    --accent-color: #ffd700;
}

/* 主题方案 - 只改变强调色 */
[data-theme="ocean"] {
    --accent-color: #0ea5e9;
}
[data-theme="mint"] {
    --accent-color: #10b981;
}
[data-theme="coral"] {
    --accent-color: #f43f5e;
}
[data-theme="lavender"] {
    --accent-color: #a855f7;
}
[data-theme="sunset"] {
    --accent-color: #f97316;
}

body { margin: 0; padding: 0; background: linear-gradient(to right, #04060b, #23283f); color: #fff; font-family: "Microsoft YaHei", sans-serif; overflow-x: hidden; min-height: 100vh; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; }
.bg-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* 导航栏 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(4,6,11,0.8); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.08); box-shadow: 0 4px 30px rgba(0,0,0,0.5); width: 100%; padding: 12px 0; }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 0 20px 12px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.site-logo { font-size: 18px; font-weight: 700; color: var(--accent-color); }

/* 类型切换开关 */
.type-switch { position: relative; display: inline-flex; align-items: center; background: #3b5998; border-radius: 50px; height: 32px; cursor: pointer; overflow: hidden; transition: background 0.4s ease; min-width: 82px; }
.type-switch.pc { background: var(--accent-color); }
.switch-ball { position: absolute; width: 24px; height: 24px; background: #fff; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.25); left: 4px; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; }
.switch-ball .iconfont { font-size: 14px; color: #3b5998; transition: color 0.4s; }
.type-switch.pc .switch-ball .iconfont { color: var(--accent-color); }
.type-switch.pc .switch-ball { transform: translateX(50px); }
.type-label { flex: 1; text-align: center; font-size: 12px; font-weight: 600; color: #fff; user-select: none; white-space: nowrap; padding: 0 10px; margin-left: 24px; transition: margin 0.4s ease, color 0.4s ease; }
.type-switch.pc .type-label { margin-left: 0; margin-right: 24px; color: #fff; }

/* 分类导航 */
.category-nav { display: flex; gap: 10px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.category-nav::-webkit-scrollbar { display: none; }
.cat-btn { padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; color: #888; background: transparent; transition: all 0.2s; white-space: nowrap; flex-shrink: 0; border: 1px solid transparent; }
.cat-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.cat-btn.active { background: var(--accent-color); color: #fff; font-weight: 600; }

/* 主内容区 */
.main-content { width: 100%; padding: 20px; box-sizing: border-box; min-height: 100vh; position: relative; z-index: 1; }

/* 瀑布流容器 */
.masonry-container { position: relative; transition: opacity 0.3s ease; }
.masonry-container .box { position: absolute; transition: transform 0.3s ease, opacity 0.3s ease; }

/* 卡片 */
.box { position: relative; border-radius: 12px; overflow: hidden; background: var(--card-bg); cursor: pointer; border: 3px solid transparent; transform: translateZ(0); transition: all 0.3s ease; }
.box:hover { border-color: var(--accent-color); transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.5); z-index: 10; }
.box img { width: 100%; height: auto; display: block; opacity: 0; transition: opacity 0.5s ease; }
.box img.loaded { opacity: 1; }

/* 电脑壁纸网格布局 */
.masonry-container.pc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.masonry-container.pc-grid .box { position: relative !important; left: auto !important; top: auto !important; width: auto !important; }
.masonry-container.pc-grid .box img { aspect-ratio: 16/9; object-fit: cover; }
@media (max-width: 1200px) { .masonry-container.pc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .masonry-container.pc-grid { grid-template-columns: 1fr; } }

/* 遮罩层 */
.lock-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); opacity: 0; transition: opacity 0.3s; z-index: 5; }
.box:hover .lock-overlay { opacity: 1; }

/* 标签 */
.lock-tag { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: bold; z-index: 10; white-space: nowrap; }
.tag-mobile { background: #fff; color: #000; border-radius: 20px; padding: 6px 14px; font-size: 11px; font-weight: 500; letter-spacing: 0.5px; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.tag-desktop { background: rgba(0,0,0,0.6); color: #fff; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); left: 20px; transform: none; }

/* 时间显示 */
.lock-time-group { position: absolute; width: 100%; text-align: center; color: #fff; z-index: 10; pointer-events: none; }
.time-mobile { top: 25%; }
.time-mobile .clock { font-size: 64px; font-weight: 300; text-shadow: 0 2px 10px rgba(0,0,0,0.3); line-height: 1; margin-bottom: 10px; }
.time-mobile .site { font-size: 14px; opacity: 0.9; letter-spacing: 1px; }
.time-desktop { bottom: 20px; left: 20px; text-align: left; width: auto; }
.time-desktop .clock { font-size: 48px; font-weight: 300; line-height: 1; text-shadow: 0 0 10px rgba(0,0,0,0.5); }
.time-desktop .date { font-size: 16px; font-weight: 300; margin-top: 5px; opacity: 0.9; }

/* 操作按钮 */
.action-bar { position: absolute; bottom: 15px; width: 100%; display: flex; justify-content: space-between; padding: 0 15px; box-sizing: border-box; z-index: 20; }
.action-btn { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.25s ease; color: white; }
.action-btn:hover, .action-btn:focus { background: rgba(0,0,0,0.5); backdrop-filter: blur(12px); border-color: rgba(255,255,255,0.4); transform: scale(1.1); }
.action-btn .iconfont { font-size: 18px; }
.home-indicator { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); width: 30%; height: 4px; background: rgba(255,255,255,0.6); border-radius: 2px; }

/* 网页底部信息栏 */
.site-footer { position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 20px; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255,255,255,0.7); z-index: 100; border-top: 1px solid rgba(255,255,255,0.1); }
@media (max-width: 768px) { .site-footer { font-size: 11px; padding: 8px 15px; } }

/* 主题切换按钮 */
.theme-btn { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; color: #fff; }
.theme-btn .iconfont { font-size: 18px; }
.theme-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.1); }
.theme-panel { position: fixed; top: 60px; right: 20px; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); border-radius: 12px; padding: 15px; z-index: 999; display: none; border: 1px solid rgba(255,255,255,0.1); }
.theme-panel.show { display: block; }
.theme-panel-title { font-size: 12px; color: #888; margin-bottom: 10px; }
.theme-options { display: flex; gap: 8px; flex-wrap: wrap; width: 120px; }
.theme-dot { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; }
.theme-dot:hover { transform: scale(1.15); }
.theme-dot.active { border-color: #fff; }
.theme-dot[data-theme="default"] { background: linear-gradient(135deg, #ffd700, #ffb700); }
.theme-dot[data-theme="ocean"] { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.theme-dot[data-theme="mint"] { background: linear-gradient(135deg, #10b981, #059669); }
.theme-dot[data-theme="coral"] { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.theme-dot[data-theme="lavender"] { background: linear-gradient(135deg, #a855f7, #9333ea); }
.theme-dot[data-theme="sunset"] { background: linear-gradient(135deg, #f97316, #ea580c); }

/* 手机壁纸按钮显示规则 */
/* 电脑端(>1024px)：显示二维码，隐藏全屏 */
.box.type-mobile .btn-fullscreen { display: none; }
.box.type-mobile .btn-qrcode { display: flex; }

/* 手机端(<=768px)：隐藏二维码，显示全屏 */
@media (max-width: 768px) {
    .box.type-mobile .btn-qrcode { display: none; }
    .box.type-mobile .btn-fullscreen { display: flex; }
}

/* iPad端(769px-1024px)：都显示 */
@media (min-width: 769px) and (max-width: 1024px) {
    .box.type-mobile .btn-fullscreen { display: flex; }
    .box.type-mobile .btn-qrcode { display: flex; }
}

/* 电脑壁纸遮罩层调整 */
.box.type-desktop .action-bar { bottom: 10px; right: 10px; left: auto; width: auto; padding: 0; gap: 8px; }
.box.type-desktop .action-btn { width: 36px; height: 36px; }
.box.type-desktop .action-btn .iconfont { font-size: 16px; }
.box.type-desktop .home-indicator { display: none; }
.box.type-desktop .tag-desktop { top: 10px; left: 10px; font-size: 11px; padding: 4px 10px; }

/* 标签筛选 */
.tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: auto; }
.tag-item { background: rgba(255,255,255,0.2); padding: 3px 8px; border-radius: 12px; font-size: 12px; backdrop-filter: blur(4px); cursor: pointer; transition: all 0.2s; pointer-events: auto; }
.tag-item:hover { background: var(--accent-color); color: #fff; }
.filter-bar { display: none; align-items: center; gap: 10px; padding: 10px 20px; background: rgba(0,0,0,0.5); border-bottom: 1px solid #333; position: relative; z-index: 1; }
.filter-bar.show { display: flex; }
.filter-tag { background: var(--accent-color); color: #fff; padding: 5px 12px; border-radius: 15px; font-size: 13px; font-weight: 500; }
.filter-clear { background: #444; color: #fff; padding: 5px 12px; border-radius: 15px; font-size: 13px; cursor: pointer; }
.filter-clear:hover { background: #555; }

/* 返回顶部 */
.back-to-top { position: fixed; bottom: 60px; right: 20px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 999; }
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent-color); border-color: var(--accent-color); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.back-to-top .iconfont { font-size: 20px; }

/* 加载提示 */
.loading-toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); color: #fff; padding: 12px 24px; border-radius: 25px; font-size: 14px; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 999; display: flex; align-items: center; gap: 10px; }
.loading-toast.show { opacity: 1; visibility: visible; }
.loading-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 显示控制 */
.mobile-only { display: none; }
.desktop-only { display: none; }
.box.type-mobile .mobile-only { display: block; }
.box.type-desktop .desktop-only { display: block; }
.box.type-mobile .time-mobile { display: block; }

/* 响应式 */
@media (max-width: 1400px) { .time-mobile .clock { font-size: 48px; } .time-mobile .site { font-size: 12px; } .time-desktop .clock { font-size: 40px; } .time-desktop .date { font-size: 14px; } }
@media (max-width: 1000px) { .time-mobile .clock { font-size: 36px; } .time-mobile .site { font-size: 10px; } .lock-tag { font-size: 10px; padding: 3px 8px; top: 12px; } .tag-mobile { padding: 5px 12px; border-radius: 16px; } .action-btn { width: 36px; height: 36px; } .action-btn .iconfont { font-size: 16px; } .action-bar { bottom: 12px; padding: 0 12px; } }
@media (max-width: 768px) { .time-mobile .clock { font-size: 28px; margin-bottom: 5px; } .time-mobile .site { font-size: 9px; } .lock-tag { font-size: 9px; padding: 2px 6px; top: 8px; } .tag-mobile { padding: 4px 10px; border-radius: 14px; } .action-btn { width: 30px; height: 30px; } .action-btn .iconfont { font-size: 14px; } .action-bar { bottom: 8px; padding: 0 8px; } .back-to-top { width: 40px; height: 40px; bottom: 55px; right: 15px; } .back-to-top .iconfont { font-size: 18px; } .random-btn { bottom: 105px; right: 15px; } .bell-icon { width: 40px; height: 40px; bottom: 55px; font-size: 18px; } .bell-popup { bottom: 105px; } }

/* 铃铛通知 */
.bell-icon { position: fixed; bottom: 60px; left: 20px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; z-index: 999; transition: all 0.3s; }
.bell-icon:hover { background: var(--accent-color); border-color: var(--accent-color); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.bell-popup { display: none; position: fixed; bottom: 115px; left: 20px; border: 1px solid rgba(255,255,255,0.2); padding: 12px 16px; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); box-shadow: 0 0 20px rgba(0,0,0,0.3); border-radius: 10px; color: #fff; z-index: 999; white-space: nowrap; }
.bell-popup p { margin: 0; font-size: 14px; }
.bell-popup.show { display: block; }

/* 二维码覆盖层 */
.qr-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 50; display: flex; justify-content: center; align-items: center; cursor: pointer; border-radius: 12px; }
.qr-box { text-align: center; pointer-events: none; }
.qr-code { background: #fff; padding: 10px; border-radius: 8px; display: inline-block; line-height: 0; }
.box .qr-overlay .qr-code img { display: block !important; max-width: 150px; height: auto !important; width: auto !important; opacity: 1 !important; position: static !important; transition: none !important; aspect-ratio: auto !important; object-fit: contain !important; }
.qr-overlay .qr-tip { font-size: 12px; color: #fff; margin-top: 10px; }
.qr-close { width: 32px; height: 32px; border: 2px solid rgba(255,255,255,0.6); border-radius: 50%; color: rgba(255,255,255,0.8); font-size: 16px; display: flex; align-items: center; justify-content: center; margin: 15px auto 0; cursor: pointer; pointer-events: auto; transition: all 0.2s; }
.qr-close:hover { border-color: #fff; color: #fff; transform: scale(1.1); }

/* 随机推荐按钮 */
.random-btn { position: fixed; bottom: 115px; right: 20px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; z-index: 999; transition: all 0.3s; }
.random-btn:hover { background: var(--accent-color); border-color: var(--accent-color); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.random-btn .iconfont { display: inline-block; transition: transform 0.5s ease; }
.random-btn .iconfont.spin { transform: rotate(360deg); }
@media (max-width: 768px) { .random-btn { width: 40px; height: 40px; bottom: 110px; right: 15px; font-size: 18px; } }
