/* ====== 浪子科技 - 顶级毛玻璃UI + iOS27动画（优化版） ====== */

:root {
    --glass-bg: rgba(255, 255, 255, 0.14);
    --glass-bg-dark: rgba(20, 22, 40, 0.28);
    --glass-border: rgba(255, 255, 255, 0.28);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 12px 40px rgba(31, 38, 135, 0.14);
    --glass-shadow-lg: 0 24px 70px rgba(31, 38, 135, 0.22);
    --accent: #007AFF;
    --accent-gradient: linear-gradient(135deg, #007AFF, #5856D6, #AF52DE);
    --accent-soft: rgba(0, 122, 255, 0.12);
    --text: #1a1a2e;
    --text-light: rgba(26, 26, 46, 0.66);
    --radius: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    --transition: cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-ios: cubic-bezier(0.36, 0.66, 0.04, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: #e8eef5;
    color: var(--text);
    transition: background 0.8s var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====== 壁纸层 ====== */
#wallpaper-layer {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background 1.4s var(--transition);
}

#wallpaper-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(3px) saturate(120%);
    -webkit-backdrop-filter: blur(3px) saturate(120%);
    transition: background 0.8s;
}

body.dark-mode #wallpaper-layer::after {
    background: rgba(8, 10, 24, 0.42);
    backdrop-filter: blur(4px) saturate(140%);
    -webkit-backdrop-filter: blur(4px) saturate(140%);
}

/* ====== 流星雨主题画布（浅色 + 深色双模式）====== */
#meteor-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    display: none;
}

/* 流星雨壁纸项角标 */
.wallpaper-item.meteor-wp {
    position: relative;
    outline: 2px solid rgba(0, 122, 255, 0.6);
    box-shadow: 0 0 22px rgba(0, 122, 255, 0.4);
}
.wallpaper-item.meteor-wp::before {
    content: '☄ 流星雨';
    position: absolute;
    top: 8px; left: 8px;
    z-index: 2;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    padding: 3px 9px;
    border-radius: 9px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.45);
}
.wallpaper-item.meteor-wp .wp-label::after {
    content: ' ✦';
    color: #aaccff;
}

/* ====== 毛玻璃通用类 ====== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius);
}

.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 11px 22px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: all 0.35s var(--transition-spring);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.glass-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.35), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}
.glass-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
.glass-btn:hover::after { opacity: 1; }
.glass-btn:active { transform: scale(0.96); }

/* ====== 开屏动画（iOS27 风格）====== */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b1026 0%, #1a1a4e 45%, #2d1b69 100%);
    overflow: hidden;
    transition: opacity 0.9s var(--transition-ios), transform 0.9s var(--transition-spring);
    perspective: 800px;
}
#splash-screen::before {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 20% 30%, rgba(88,86,214,0.35), transparent 45%),
        radial-gradient(circle at 80% 60%, rgba(0,122,255,0.3), transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(175,82,222,0.28), transparent 50%);
    animation: splashBgDrift 8s ease-in-out infinite alternate;
}
@keyframes splashBgDrift {
    0% { transform: scale(1) translate(0,0); }
    100% { transform: scale(1.15) translate(-3%, 2%); }
}

.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    animation: splashIn 1.1s var(--transition-spring) both;
}

.splash-logo {
    width: 96px; height: 96px;
    margin: 0 auto 22px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 50px rgba(0,0,0,0.3), inset 0 0 24px rgba(255,255,255,0.15);
    animation: logoFloat 2.6s ease-in-out infinite, logoGlow 3s ease-in-out infinite;
}
.splash-logo i {
    font-size: 42px;
    color: white;
    animation: logoSpin 12s linear infinite;
}
@keyframes logoSpin {
    to { transform: rotate(360deg); }
}
@keyframes logoFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes logoGlow {
    0%,100% { box-shadow: 0 12px 50px rgba(0,0,0,0.3), inset 0 0 24px rgba(255,255,255,0.15); }
    50% { box-shadow: 0 18px 60px rgba(88,86,214,0.55), inset 0 0 36px rgba(255,255,255,0.25); }
}

.splash-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: 5px;
    margin-bottom: 6px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
    animation: titleGlow 2.4s ease-in-out infinite;
    background: linear-gradient(135deg, #fff, #c9d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@keyframes titleGlow {
    0%,100% { filter: drop-shadow(0 2px 20px rgba(120,140,255,0.3)); }
    50% { filter: drop-shadow(0 2px 40px rgba(160,170,255,0.65)); }
}
.splash-subtitle {
    font-size: 11px;
    letter-spacing: 9px;
    opacity: 0.6;
    margin-bottom: 44px;
    text-indent: 9px;
}

.splash-loader {
    width: 220px; height: 5px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.splash-loader-bar {
    height: 100%; width: 0;
    background: linear-gradient(90deg, #fff, rgba(255,255,255,0.55));
    border-radius: 3px;
    animation: splashLoad 2.4s var(--transition) forwards;
    box-shadow: 0 0 12px rgba(255,255,255,0.7);
}
@keyframes splashLoad {
    0% { width: 0; }
    60% { width: 78%; }
    100% { width: 100%; }
}

.splash-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}
.splash-particles .orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 65%);
    animation: orbFloat linear infinite;
}
@keyframes orbFloat {
    0% { transform: translate(0,0) scale(1); opacity: 0.25; }
    50% { opacity: 0.5; }
    100% { transform: translate(var(--tx,40px), var(--ty,-40px)) scale(1.2); opacity: 0.15; }
}

#splash-screen.hide {
    opacity: 0;
    transform: scale(1.12);
    pointer-events: none;
}

/* ====== 主容器 ====== */
#main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: containerIn 0.9s var(--transition-spring) 0.1s both;
}
@keyframes containerIn {
    0% { opacity: 0; transform: translateY(48px) scale(0.98); filter: blur(6px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ====== 顶部导航 ====== */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 26px;
    position: sticky;
    top: 20px;
    z-index: 100;
    animation: navSlideDown 0.7s var(--transition-spring) 0.35s both;
}
@keyframes navSlideDown {
    0% { opacity: 0; transform: translateY(-34px); }
    100% { opacity: 1; transform: translateY(0); }
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-logo i {
    font-size: 24px;
    -webkit-text-fill-color: var(--accent);
    animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.nav-links { display: flex; gap: 6px; }
.nav-link {
    padding: 9px 18px;
    border-radius: 13px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.35s var(--transition-spring);
    display: flex;
    align-items: center;
    gap: 7px;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 50%;
    width: 0; height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: all 0.3s var(--transition-spring);
    transform: translateX(-50%);
}
.nav-link:hover, .nav-link.active {
    background: var(--accent-soft);
    color: var(--accent);
    transform: scale(1.05);
}
.nav-link:hover::after, .nav-link.active::after { width: 60%; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.visitor-count {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    animation: countPulse 2.4s ease-in-out infinite;
}
@keyframes countPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}
.visitor-count i { color: var(--accent); }

/* ====== 轮播图 ====== */
.carousel-section { margin-bottom: 34px; }

.carousel-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 300px;
    box-shadow: var(--glass-shadow-lg);
    animation: sectionIn 0.7s var(--transition-spring) 0.5s both;
}

.carousel-track {
    display: flex;
    width: 100%; height: 100%;
    transition: transform 0.7s var(--transition-spring);
}

.carousel-slide {
    min-width: 100%; height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.carousel-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1s var(--transition);
}
.carousel-slide:hover img { transform: scale(1.06); }

.carousel-slide .slide-overlay {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 44px 28px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    animation: overlayIn 0.6s var(--transition) 0.2s both;
}
@keyframes overlayIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.carousel-slide .slide-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.carousel-slide .slide-desc {
    font-size: 13px;
    opacity: 0.9;
}

.carousel-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.35s var(--transition-spring);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
}
.carousel-container:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%) scale(1.18);
    color: var(--accent);
}
.carousel-btn.prev { left: 18px; }
.carousel-btn.next { right: 18px; }

.carousel-dots {
    position: absolute;
    bottom: 14px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.carousel-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.35s var(--transition-spring);
}
.carousel-dot.active {
    width: 26px;
    border-radius: 5px;
    background: white;
    box-shadow: 0 0 10px rgba(255,255,255,0.7);
}

/* ====== 公告板 ====== */
.announcement-section { margin-bottom: 34px; }

.announcement-board {
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    position: relative;
    overflow: hidden;
    animation: sectionIn 0.7s var(--transition-spring) 0.6s both;
}
@keyframes sectionIn {
    from { opacity: 0; transform: translateY(36px); }
    to { opacity: 1; transform: translateY(0); }
}
.announcement-board::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--accent-gradient);
}
.announcement-board::after {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(0,122,255,0.1), transparent 70%);
    animation: floatSlow 9s ease-in-out infinite alternate;
}
@keyframes floatSlow {
    from { transform: translate(0,0); }
    to { transform: translate(-20px, 20px); }
}

.board-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    position: relative;
    z-index: 1;
}
.board-header i {
    color: #FF6B35;
    animation: bellRing 2.2s ease-in-out infinite;
}
@keyframes bellRing {
    0%,100% { transform: rotate(0); }
    10% { transform: rotate(16deg); }
    20% { transform: rotate(-11deg); }
    30% { transform: rotate(6deg); }
    40% { transform: rotate(-6deg); }
    50% { transform: rotate(0); }
}
.board-live-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #34C759;
    margin-left: auto;
    animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.45); }
    50% { box-shadow: 0 0 0 9px rgba(52, 199, 89, 0); }
}
.board-content {
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-light);
    position: relative;
    z-index: 1;
}

/* ====== 区块标题 ====== */
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    animation: sectionIn 0.7s var(--transition-spring) both;
}
.section-title i {
    color: var(--accent);
    animation: iconWobble 3s ease-in-out infinite;
}
@keyframes iconWobble {
    0%,100% { transform: rotate(0); }
    25% { transform: rotate(-6deg); }
    75% { transform: rotate(6deg); }
}

/* ====== 卡片网格 ====== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 34px;
}

.card {
    border-radius: var(--radius);
    padding: 22px;
    cursor: pointer;
    transition: all 0.45s var(--transition-spring);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    box-shadow: var(--glass-shadow);
    animation: cardIn 0.6s var(--transition-spring) both;
}
@keyframes cardIn {
    0% { opacity: 0; transform: translateY(36px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transition: left 0.7s;
    z-index: 1;
}
.card:hover::before { left: 100%; }
.card:hover {
    transform: translateY(-8px) scale(1.025);
    box-shadow: 0 24px 60px rgba(31, 38, 135, 0.22);
    border-color: rgba(0, 122, 255, 0.4);
}
.card:active { transform: translateY(-3px) scale(0.985); }

.card-icon {
    width: 54px; height: 54px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 15px;
    color: white;
    background: var(--accent-gradient);
    box-shadow: 0 8px 22px rgba(0, 122, 255, 0.32);
    transition: transform 0.4s var(--transition-spring);
    position: relative;
    z-index: 2;
}
.card:hover .card-icon { transform: scale(1.12) rotate(-6deg); }

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    position: relative;
    z-index: 2;
}
.card-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.55;
    position: relative;
    z-index: 2;
}
.card-badge {
    position: absolute;
    top: 14px; right: 14px;
    padding: 4px 10px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(52, 199, 89, 0.16);
    color: #2ba149;
    z-index: 3;
}

/* ====== 音乐播放器（iOS 控制中心风格）====== */
#music-player {
    position: fixed;
    bottom: 26px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 11px 22px;
    border-radius: 40px;
    z-index: 200;
    animation: playerSlideUp 0.7s var(--transition-spring) 0.75s both;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255,255,255,0.3);
    border: 1px solid var(--glass-border);
}
@keyframes playerSlideUp {
    0% { opacity: 0; transform: translateX(-50%) translateY(70px) scale(0.9); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 168px;
}

.player-cover {
    width: 42px; height: 42px;
    border-radius: 13px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    animation: coverSpin 5s linear infinite paused;
    box-shadow: 0 4px 14px rgba(0,122,255,0.35);
    flex-shrink: 0;
}
.player-cover.playing { animation-play-state: running; }
@keyframes coverSpin { to { transform: rotate(360deg); } }

.player-text { overflow: hidden; }
.player-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}
.player-artist {
    font-size: 11px;
    color: var(--text-light);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.player-controls button {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s var(--transition-spring);
    font-size: 13px;
}
.player-controls button:hover {
    background: rgba(255, 255, 255, 0.36);
    transform: scale(1.18);
}
#play-btn {
    width: 44px !important;
    height: 44px !important;
    background: var(--accent) !important;
    color: white !important;
    font-size: 15px !important;
    box-shadow: 0 6px 18px rgba(0, 122, 255, 0.45);
}
#play-btn:hover { transform: scale(1.14); background: #0066DD !important; }
#play-btn.playing { animation: playPulse 2s ease-in-out infinite; }
@keyframes playPulse {
    0%,100% { box-shadow: 0 6px 18px rgba(0, 122, 255, 0.45); }
    50% { box-shadow: 0 6px 26px rgba(0, 122, 255, 0.75); }
}

.player-extra button {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s var(--transition-spring);
}
.player-extra button:hover {
    background: rgba(255, 255, 255, 0.36);
    transform: scale(1.18) rotate(18deg);
}

/* 正在播放的声波动画 */
.now-playing .player-cover { position: relative; }
.now-playing .player-cover::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(0,122,255,0.4);
    animation: ringExpand 1.8s ease-out infinite;
}
@keyframes ringExpand {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ====== 壁纸选择器 ====== */
#wallpaper-picker {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.wallpaper-picker-content {
    width: 90%;
    max-width: 720px;
    max-height: 82vh;
    border-radius: var(--radius-xl);
    padding: 26px;
    overflow-y: auto;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
    animation: modalIn 0.45s var(--transition-spring);
    border: 1px solid var(--glass-border);
}
.picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.picker-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
}
.picker-header button {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--transition-spring);
}
.picker-header button:hover {
    background: rgba(255,59,48,0.2);
    transform: rotate(90deg);
    color: #FF3B30;
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.wallpaper-item {
    aspect-ratio: 16/9;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: 3px solid transparent;
    transition: all 0.4s var(--transition-spring);
    background-size: cover;
    background-position: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.wallpaper-item:hover {
    transform: scale(1.07) translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}
.wallpaper-item.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.28);
}
.wallpaper-item .wp-label {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 5px 9px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 10px;
    text-align: center;
}

/* ====== 后台管理 ====== */
#admin-modal {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.admin-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.admin-panel {
    position: relative;
    width: 92%;
    max-width: 740px;
    max-height: 86vh;
    border-radius: var(--radius-xl);
    padding: 0;
    overflow: hidden;
    box-shadow: 0 50px 120px rgba(0, 0, 0, 0.45);
    animation: modalIn 0.45s var(--transition-spring);
    border: 1px solid var(--glass-border);
}
@keyframes modalIn {
    0% { opacity: 0; transform: scale(0.82) translateY(40px); }
    60% { transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.12);
}
.admin-header h2 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.close-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s var(--transition-spring);
}
.close-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    transform: rotate(90deg);
    color: #FF3B30;
}

.admin-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 18px;
    overflow-x: auto;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.06);
    scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
    padding: 9px 17px;
    border-radius: 11px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.35s var(--transition-spring);
}
.admin-tab:hover { background: rgba(0,0,0,0.05); }
.admin-tab.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(0,122,255,0.35);
    transform: scale(1.04);
}

.admin-tab-content {
    display: none;
    padding: 22px 26px;
    max-height: 56vh;
    overflow-y: auto;
}
.admin-tab-content.active {
    display: block;
    animation: tabIn 0.35s var(--transition-spring);
}
@keyframes tabIn {
    0% { opacity: 0; transform: translateX(24px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 13px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: all 0.35s var(--transition-spring);
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.14);
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.01);
}
.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.admin-list-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.35s var(--transition-spring);
    animation: cardIn 0.4s var(--transition-spring) both;
}
.admin-list-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}
.admin-list-item .item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.admin-list-item .item-title { font-size: 14px; font-weight: 600; }
.admin-list-item .item-actions { display: flex; gap: 6px; }
.admin-list-item .item-actions button {
    width: 32px; height: 32px;
    border-radius: 9px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s var(--transition-spring);
}
.btn-delete { background: rgba(255, 59, 48, 0.15); color: #FF3B30; }
.btn-delete:hover { background: rgba(255, 59, 48, 0.32); transform: scale(1.12); }
.btn-move { background: rgba(0, 122, 255, 0.15); color: var(--accent); }
.btn-move:hover { background: rgba(0, 122, 255, 0.32); transform: scale(1.12); }

.admin-list-item .item-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.admin-list-item .item-fields input {
    width: 100%;
    padding: 9px 13px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.14);
    font-size: 13px;
    outline: none;
    transition: all 0.3s;
}
.admin-list-item .item-fields input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.28);
}

.add-btn, .save-btn {
    width: 100%;
    padding: 13px;
    margin-top: 8px;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
}
.save-btn {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(0,122,255,0.32);
}
.save-btn:hover { background: #0066DD; transform: translateY(-2px); }

.danger-btn {
    width: 100%;
    padding: 13px;
    margin-top: 16px;
    justify-content: center;
    background: rgba(255, 59, 48, 0.14);
    color: #FF3B30;
    border-color: rgba(255, 59, 48, 0.3);
    border-radius: 14px;
    font-weight: 600;
}
.danger-btn:hover { background: rgba(255, 59, 48, 0.26); }

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.stat-card {
    padding: 22px 16px;
    border-radius: 18px;
    text-align: center;
    transition: all 0.4s var(--transition-spring);
    animation: cardIn 0.5s var(--transition-spring) both;
}
.stat-card:hover { transform: scale(1.06) translateY(-4px); }
.stat-icon {
    font-size: 30px;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-value {
    font-size: 30px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ====== 登录弹窗 ====== */
#login-modal {
    position: fixed;
    inset: 0;
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.login-box {
    position: relative;
    width: 90%;
    max-width: 390px;
    border-radius: var(--radius-xl);
    padding: 38px 30px;
    box-shadow: 0 50px 120px rgba(0, 0, 0, 0.45);
    animation: modalIn 0.5s var(--transition-spring);
    text-align: center;
    border: 1px solid var(--glass-border);
}
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-logo i {
    font-size: 26px;
    -webkit-text-fill-color: var(--accent);
}
.login-box h3 {
    margin-bottom: 26px;
    font-size: 15px;
    color: var(--text-light);
    font-weight: 500;
}
.login-btn {
    width: 100%;
    padding: 14px;
    justify-content: center;
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,122,255,0.32);
}
.login-btn:hover { background: #0066DD; transform: translateY(-2px); }

/* ====== Toast ====== */
.toast {
    position: fixed;
    top: 84px; left: 50%;
    transform: translateX(-50%);
    padding: 13px 26px;
    border-radius: 16px;
    background: rgba(20, 20, 40, 0.9);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    animation: toastIn 0.4s var(--transition-spring);
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.12);
    max-width: 90%;
    text-align: center;
}
@keyframes toastIn {
    0% { opacity: 0; transform: translateX(-50%) translateY(-24px) scale(0.85); }
    60% { transform: translateX(-50%) translateY(4px) scale(1.03); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.toast.hidden { display: none; }
.toast.success { border-left: 5px solid #34C759; }
.toast.error { border-left: 5px solid #FF3B30; }
.toast.info { border-left: 5px solid var(--accent); }

/* ====== 页脚 ====== */
.footer {
    text-align: center;
    padding: 22px;
    border-radius: var(--radius);
    margin-top: 34px;
    font-size: 13px;
    color: var(--text-light);
    animation: sectionIn 0.7s var(--transition-spring) both;
}
.footer-stats {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 26px;
    flex-wrap: wrap;
}
.footer-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-stats i { color: var(--accent); }

/* ====== 工具类 ====== */
.hidden { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ====== 滚动入场（IntersectionObserver）====== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition-spring), transform 0.8s var(--transition-spring);
    will-change: opacity, transform;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
/* 已带自有入场动画的元素，交给各自 keyframes 控制 */
.cards-grid.reveal .card,
.carousel-container.reveal,
.announcement-board.reveal {
    /* 保留子元素/自有动画，仅对容器做轻量过渡 */
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
    #main-container { padding: 12px; }
    .top-nav { padding: 11px 16px; border-radius: var(--radius); }
    .nav-links { display: none; }
    .cards-grid { grid-template-columns: 1fr; gap: 14px; }
    .carousel-container { height: 190px; border-radius: var(--radius-lg); }
    #music-player {
        bottom: 14px;
        padding: 9px 14px;
        gap: 10px;
        border-radius: 30px;
    }
    .player-info { min-width: 104px; }
    .player-title { max-width: 62px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .wallpaper-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-list-item .item-fields { grid-template-columns: 1fr; }
    .splash-title { font-size: 30px; letter-spacing: 3px; }
}

/* ====== 深色模式支持 ====== */
@media (prefers-color-scheme: dark) {
    body:not(.light-mode) {
        --text: #fff;
        --text-light: rgba(255, 255, 255, 0.72);
        --glass-bg: rgba(30, 32, 55, 0.28);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
}

/* ====== 滚动条美化 ====== */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.38); }

/* ====== Ripple 效果 ====== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: rippleAnim 0.65s linear;
    pointer-events: none;
    z-index: 5;
}
@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ====== 暗色壁纸标记 ====== */
.wallpaper-item.dark-wp::after {
    content: '🌙';
    position: absolute;
    top: 6px; right: 6px;
    font-size: 12px;
    z-index: 2;
}
