:root {
            --theme-primary: #d65db1;
            --theme-secondary: #ffb6c1;
            --theme-accent: #ff8fab;
            --theme-text-strong: #a87aaa;
            --theme-text-main: #6a4d6a;
            --theme-bg-soft: rgba(255, 245, 250, 0.95);
            --theme-bg-gradient-start: rgba(255, 225, 245, 0.65);
            --theme-bg-gradient-end: rgba(225, 240, 255, 0.65);
            --theme-button-correct: #b565a7;
            --theme-button-wrong: #e88d9a;
            --theme-error-text: #e57373;
            --theme-error-bg: rgba(229, 115, 115, 0.1);
            --theme-progress-start: #f7a399;
            --theme-progress-end: #ff8fab;
            --theme-guesses-link: #d65db1;
            --theme-guesses-link-hover: #c34c9d;
            --theme-guesses-bg: #fff5f8;
            --theme-guesses-bg-hover: #ffe6f0;
            --theme-danmaku-item-bg: rgba(255, 255, 255, 0.92);
            --theme-danmaku-input-border: #ffc0cb;
            --theme-danmaku-scrollbar: rgba(214, 93, 177, 0.4);
            --theme-particle-color1: "#ffb6c1";
            --theme-particle-color2: "#d65db1";
            --theme-particle-color3: "#b565a7";
            --theme-particle-color4: "#c0a8e0";
            --theme-particle-color5: "#ff8fab";
            --theme-confetti-1: #b565a7;
            --theme-confetti-2: #e88d9a;
            --theme-confetti-3: #ffb347;
            --theme-confetti-4: #87ceeb;
            --theme-confetti-5: #ff9a8c;
            --theme-confetti-6: #c0a8e0;
            --theme-body-bg: #fdf0f5;
            --theme-shadow-color: rgba(214, 93, 177, 0.15);
            --theme-shadow-hover-color: rgba(214, 93, 177, 0.25);
            --theme-shadow-popup-color: rgba(214, 93, 177, 0.25);
            --theme-show-more-bg: var(--theme-secondary);
            --theme-show-more-bg-hover: var(--theme-primary);
            --theme-show-more-text: var(--theme-text-main);
            --theme-show-more-text-hover: #fff;
            --theme-refresh-button-bg: rgba(255, 255, 255, 0.6);
            --theme-refresh-button-bg-hover: rgba(255, 255, 255, 0.9);
            --theme-refresh-button-text: var(--theme-primary);
            --theme-refresh-button-text-hover: var(--theme-guesses-link-hover);
            --theme-refresh-button-shadow: rgba(0, 0, 0, 0.05);
            --theme-refresh-button-shadow-hover: rgba(0, 0, 0, 0.1);
            --theme-temp-message-bg: var(--theme-bg-soft);
            --theme-temp-message-border: var(--theme-secondary);
            --theme-temp-message-text: var(--theme-text-main);
            --theme-achievement-bg: rgba(255, 250, 230, 0.98);
            --theme-achievement-border: #ffcc00;
            --theme-achievement-text: #a0522d;
            --theme-achievement-icon-color: #ffd700;
            --theme-achievement-shadow: rgba(255, 215, 0, 0.3);
        }

        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        html { font-size: 16px; }
        body {
            font-family: 'Comic Sans MS', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
            display: flex; flex-direction: column; min-height: 100vh;
            background-color: var(--theme-body-bg);
            background-image: url('https://th.bing.com/th/id/R.1d665e12e96a58b63941428bd6e2be22?rik=PuKnamM9nLjvNQ&pid=ImgRaw&r=0');
            background-size: cover;
            background-repeat: no-repeat;
            background-attachment: fixed;
            background-position: center center;
            overflow-x: hidden;
            line-height: 1.6;
            padding-top: 1rem;
            color: var(--theme-text-main);
            transition: background-color 0.3s ease, color 0.3s ease;
            contain: paint;
        }
        body::before {
            content: ""; position: fixed; inset: 0;
            background: linear-gradient(135deg, var(--theme-bg-gradient-start) 0%, var(--theme-bg-gradient-end) 100%);
            z-index: -1;
            transition: background 0.3s ease;
        }

        .page-container {
            display: grid;
            grid-template-columns: auto 1fr auto;
            grid-template-areas: "music main danmaku";
            width: 100%;
            max-width: 1400px;
            margin: 0 auto 1rem auto;
            padding: 0 1.5rem;
            gap: 1.5rem;
            position: relative;
            flex-grow: 1;
        }

        .main-content {
            grid-area: main;
            display: flex; flex-direction: column;
            gap: 1.2rem;
            min-width: 0;
            position: relative;
            z-index: 5;
        }
        .container {
            display: flex; flex-direction: column; align-items: center;
            background-color: rgba(255, 255, 255, 0.97);
            padding: clamp(1.5rem, 4vw, 2.5rem);
            border-radius: 28px;
            box-shadow: 0 12px 35px var(--theme-shadow-color);
            width: 100%;
            z-index: 10;
            border: 1px solid var(--theme-secondary);
            position: relative;
            overflow: visible;
            background-size: cover;
            background-position: center center;
            background-repeat: no-repeat;
            transition: background-image 0.5s ease-in-out, border-color 0.3s ease, box-shadow 0.3s ease;
            will-change: transform, opacity;
        }
        .container::before {
            content: ""; position: absolute; inset: 0;
            background: linear-gradient(135deg, rgba(255, 240, 248, 0.75) 0%, rgba(240, 248, 255, 0.75) 100%);
            z-index: 1; pointer-events: none; transition: background-color 0.3s ease;
        }
        .container > * { position: relative; z-index: 2; }

        .guesses-box {
            background-color: rgba(255, 255, 255, 0.98);
            border-radius: 20px;
            box-shadow: 0 8px 20px var(--theme-shadow-color);
            padding: 1.2rem 1.5rem;
            width: 100%;
            z-index: 10;
            border: 1px solid var(--theme-secondary);
            transition: box-shadow 0.3s ease, border-color 0.3s ease;
            display: flex; flex-direction: column;
        }
        .guesses-box .guesses-header {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 1rem;
            position: relative;
            gap: 10px;
        }
        .guesses-box h2 {
            margin: 0;
            font-size: 1.3rem;
            color: var(--theme-text-strong);
            text-align: center;
            font-weight: 600;
            transition: color 0.3s ease;
            order: 2;
        }
        .guesses-box h2:before, .guesses-box h2:after {
             content: "🌸";
             color: var(--theme-secondary); margin: 0 8px;
             font-size: 1.1rem;
             transition: color 0.3s ease;
        }
        /* --- UI 改进和新功能样式 --- */
/* --- 同步按钮样式 --- */
.sync-container {
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--theme-guesses-bg);
    border-radius: 12px;
    text-align: center;
    border: 1px dashed var(--theme-secondary);
}
#syncDataButton {
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    background-color: var(--theme-primary);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}
#syncDataButton:hover {
    filter: brightness(1.1);
}
#syncDataButton:active {
    transform: scale(0.98);
}
#syncDataButton:disabled {
    background-color: var(--theme-secondary);
    cursor: not-allowed;
}
#syncStatusText {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--theme-text-main);
    min-height: 1.2em; /* 避免消息出现时布局跳动 */
}
/* 1. 修复数据弹窗的标签栏换行问题 */
.data-tabs {
    flex-wrap: wrap; /* 允许换行 */
    justify-content: center; /* 居中对齐 */
}

/* 2. 让排行榜的玩家昵称看起来可以点击 */
.leaderboard-table .nickname.clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: color 0.2s;
}
.leaderboard-table .nickname.clickable:hover {
    color: var(--theme-primary);
}

/* 3. 玩家资料弹窗 (Player Profile Modal) 的全新样式 */
.profile-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 500; /* 比成就弹窗更高 */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0s linear 0.3s;
}

.profile-modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.profile-modal-content {
    background: var(--theme-bg-soft);
    border: 2px solid var(--theme-secondary);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px var(--theme-shadow-popup-color);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.profile-modal-backdrop.visible .profile-modal-content {
    transform: scale(1);
}

.profile-modal-close {
    position: absolute; 
    top: 15px; 
    right: 20px; 
    font-size: 1.8rem;
    color: var(--theme-text-main); 
    cursor: pointer; 
    line-height: 1;
    z-index: 10;
}

#profile-modal-title {
    font-size: 1.5rem;
    color: var(--theme-text-strong);
    margin: 0 0 1rem 0;
    padding-right: 30px; /* 避免和关闭按钮重叠 */
}

#profile-content-grid {
    flex-grow: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding-top: 10px;
    max-height: 70vh;
}

.profile-character-item {
    position: relative;
}

.profile-character-item a {
    display: block;
    text-decoration: none;
}

.profile-character-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--theme-secondary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-character-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px var(--theme-shadow-hover-color);
}

.character-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    font-size: 0.8rem;
    text-align: center;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-modal-loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--theme-text-main);
}

/* 玩家资料信息项样式 */
.profile-info-item {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--theme-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-info-item h3 {
    color: var(--theme-text-strong);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
    border-bottom: 1px solid var(--theme-secondary);
    padding-bottom: 0.5rem;
}

.profile-info-item p {
    color: var(--theme-text-main);
    font-size: 1.1rem;
    margin: 0.8rem 0;
    padding: 0.5rem;
    background: var(--theme-guesses-bg);
    border-radius: 8px;
    border: 1px solid var(--theme-secondary);
}

.profile-info-item p strong {
    color: var(--theme-primary);
}

        #refreshGuessesButton {
            background-color: var(--theme-refresh-button-bg);
            color: var(--theme-refresh-button-text);
            border: 1px solid var(--theme-secondary);
            border-radius: 50%;
            width: 30px; height: 30px;
            font-size: 1rem;
            line-height: 28px;
            text-align: center;
            cursor: pointer;
            padding: 0;
            transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
            box-shadow: 0 1px 3px var(--theme-refresh-button-shadow);
            order: 1;
            flex-shrink: 0;
        }
        #refreshGuessesButton:hover {
            background-color: var(--theme-refresh-button-bg-hover); color: var(--theme-refresh-button-text-hover); transform: rotate(90deg) scale(1.1); box-shadow: 0 2px 5px var(--theme-refresh-button-shadow-hover);
        }
        #refreshGuessesButton:active { transform: rotate(45deg) scale(1.0); }

        .guesses-box ul {
             list-style: none;
             display: flex; flex-wrap: wrap;
             justify-content: center;
             gap: 0.6rem;
             padding: 0;
             position: relative; z-index: 1;
        }
        .guesses-box li {
            font-size: 0.8rem;
            color: var(--theme-text-main);
            word-break: break-word;
            text-align: center;
            flex: 0 1 auto;
            min-width: 80px;
            transition: color 0.3s ease;
            overflow: visible;
            position: relative;
        }
        .guesses-box li a {
            text-decoration: none; color: var(--theme-guesses-link); display: block; padding: 0.5rem 0.7rem;
            border-radius: 14px;
            background-color: var(--theme-guesses-bg);
            transition: all 0.2s ease;
            border: 1px solid var(--theme-secondary);
            position: relative; z-index: 2;
        }
        .guesses-box li a:hover {
            background-color: var(--theme-guesses-bg-hover); color: var(--theme-guesses-link-hover); transform: translateY(-3px) scale(1.03);
            box-shadow: 0 5px 12px var(--theme-shadow-hover-color);
            z-index: 3;
        }
        .guesses-box li .guess-hover-image {
            position: absolute; top: 0; left: 50%; transform: translate(-50%, -110%);
            width: 200px; height: 200px; object-fit: cover; border-radius: 12px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            border: 2px solid var(--theme-secondary); opacity: 0; pointer-events: none; z-index: 10;
            transition: opacity 0.3s ease, transform 0.3s ease; background-color: rgba(255, 255, 255, 0.9);
            loading: lazy;
        }
        .guesses-box li:hover .guess-hover-image {
            opacity: 1; transform: translate(-50%, -110%) translateY(-10px);
        }

        .music-container {
            grid-area: music;
            width: 330px;
            position: sticky; top: 1rem; align-self: start;
            z-index: 50;
            height: auto;
            max-height: 90vh;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
            border-radius: 20px; overflow: hidden;
            border: 1px solid var(--theme-secondary);
            background-color: rgba(255, 255, 255, 0.95);
            transition: border-color 0.3s ease;
            display: flex; flex-direction: column;
        }
        .playlist-selector-grid {
             padding: 15px;
             background: var(--theme-bg-soft);
             border-radius: 20px;
             border: 1px solid var(--theme-secondary);
             box-shadow: inset 0 1px 5px rgba(0,0,0,0.05);
             margin: 15px 15px 0 15px;
             flex-shrink: 0;
         }
        
        /* 歌单搜索区域 */
        .playlist-search-area {
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(var(--theme-secondary, #ffb6c1), 0.3);
        }
        
        .playlist-search-area form {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            flex-wrap: wrap;
        }
        
        .playlist-search-area label {
            font-size: 1rem;
            color: var(--theme-text-strong);
            font-weight: 600;
            flex-shrink: 0;
        }
        
        .playlist-search-area input[type="text"] {
            font-size: 0.95rem;
            border: 1px solid var(--theme-secondary);
            border-radius: 8px;
            padding: 4px 8px;
            width: 150px;
            flex-grow: 1;
        }
        
        .playlist-search-area button[type="submit"] {
            font-size: 0.95rem;
            border-radius: 8px;
            background: var(--theme-primary);
            color: #fff;
            border: none;
            padding: 4px 12px;
            cursor: pointer;
            transition: background 0.2s;
            flex-shrink: 0;
        }
        
        .playlist-search-area button[type="submit"]:hover {
            background: var(--theme-accent);
        }
        
        /* 搜索结果样式 */
        .search-results {
            margin-top: 10px;
            max-height: 200px;
            overflow-y: auto;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 12px;
            border: 1px solid var(--theme-secondary);
            padding: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        .search-results.hidden {
            display: none;
        }
        
        .search-result-item {
            padding: 8px 12px;
            margin-bottom: 5px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            background: rgba(255,255,255,0.7);
            border: 1px solid transparent;
        }
        
        .search-result-item:hover {
            background: var(--theme-secondary);
            color: var(--theme-primary);
            transform: translateX(5px);
        }
        
        /* 歌单网格 - 确保一行三个，共三行 */
        .playlist-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(3, auto);
            gap: 12px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(var(--theme-secondary, #ffb6c1), 0.3);
            margin-bottom: 15px;
        }
        .playlist-btn {
            display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
            font-size: 1.1rem;
            background: rgba(255,255,255,0.7);
            border: 1.5px solid var(--theme-secondary);
            border-radius: 16px; padding: 12px 0 10px 0; cursor: pointer; transition: all 0.2s;
            color: var(--theme-text-main);
            min-height: 70px; min-width: 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            font-family: inherit;
            text-align: center;
        }
        .playlist-btn:hover {
            background: var(--theme-secondary);
            color: var(--theme-primary);
            transform: scale(1.06) translateY(-2px);
            box-shadow: 0 6px 18px var(--theme-shadow-color);
        }
        .custom-playlist-area {
             padding-top: 0;
             text-align: center;
        }
        .custom-playlist-area form {
             display: flex; align-items: center; justify-content: center; gap: 10px;
             flex-wrap: wrap;
        }
        .custom-playlist-area label {
             font-size: 1rem; color: var(--theme-text-strong);
             font-weight: 600;
             flex-shrink: 0;
        }
        .custom-playlist-area input[type="text"] {
            font-size: 0.95rem; border: 1px solid var(--theme-secondary);
            border-radius: 8px; padding: 4px 8px;
            width: 120px; text-align: center;
            flex-grow: 0;
        }
        .custom-playlist-area button[type="submit"] {
            font-size: 0.95rem; border-radius: 8px;
            background: var(--theme-primary); color: #fff;
            border: none; padding: 4px 12px;
            cursor: pointer; transition: background 0.2s;
            flex-shrink: 0;
        }
        .custom-playlist-area button[type="submit"]:hover { background: var(--theme-accent); }

        .music-container iframe { display: block; width: 100%; border: none; flex-grow: 1; min-height: 380px; }
        .music-iframe-wrapper {
             flex-grow: 1;
             padding: 0 15px 15px 15px;
             display: flex;
         }

        .danmaku-section {
            grid-area: danmaku;
            width: 280px;
            position: sticky; top: 1rem; align-self: start;
            height: calc(100vh - 2rem);
            max-height: 90vh;
            display: flex; flex-direction: column; z-index: 90;
            background-color: var(--theme-bg-soft);
            backdrop-filter: blur(10px);
            border-radius: 20px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
            overflow: hidden;
            border: 1px solid var(--theme-secondary);
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }
        .danmaku-container-right {
            flex-grow: 1; overflow: hidden; padding: 10px 0 0 0; position: relative;
            background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20,20 Q50,0 80,20 T100,50 Q80,80 50,100 T0,50 Q20,20 50,0 Z' fill='none' stroke='%23ffc0cb' stroke-width='0.4' opacity='0.15'/%3E%3C/svg%3E");
            background-size: 80px 80px;
            contain: content;
        }
        #danmakuListRight {
            list-style: none; padding: 0 14px; margin: 0; width: 100%; height: 100%;
            overflow-y: auto;
            display: flex; flex-direction: column-reverse;
            scrollbar-width: thin; scrollbar-color: var(--theme-danmaku-scrollbar) transparent;
        }
        #danmakuListRight::-webkit-scrollbar { width: 6px; }
        #danmakuListRight::-webkit-scrollbar-thumb { background-color: var(--theme-danmaku-scrollbar); border-radius: 3px; }
        .danmaku-item-right {
            white-space: normal; padding: 6px 12px; margin-top: 5px; font-size: 13px;
            color: var(--theme-text-main);
            background-color: var(--theme-danmaku-item-bg);
            border-radius: 10px; flex-shrink: 0; word-wrap: break-word;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
            border: 1px solid rgba(255, 182, 193, 0.25);
            position: relative;
            animation: fadeIn 0.3s ease-out;
            transition: color 0.3s ease, background-color 0.3s ease;
            contain: content;
        }
        @keyframes fadeIn { from { opacity: 0; transform: translate3d(0, 5px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
        .danmaku-item-right:before {
            content: "✨"; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); color: var(--theme-secondary); font-size: 10px;
            transition: color 0.3s ease;
        }
        .danmaku-item-animating {
            position: absolute; bottom: 5px; left: 14px; right: 14px; z-index: 100;
            white-space: normal; padding: 8px 14px; font-size: 14px;
            color: var(--theme-text-main); background-color: rgba(255, 255, 255, 0.95);
            border-radius: 12px; word-wrap: break-word; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            border: 1px solid var(--theme-secondary);
            opacity: 0;
            transform: translate3d(0, 100%, 0);
            transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.4s ease-out, color 0.3s ease, border-color 0.3s ease;
            backface-visibility: hidden; perspective: 1000px;
        }
        .danmaku-item-animating.visible { opacity: 1; transform: translate3d(0, 0, 0); }

        #presetDanmakuContainer {
            padding: 10px; background-color: var(--theme-bg-soft);
            backdrop-filter: blur(5px); display: flex; flex-wrap: wrap; gap: 6px;
            justify-content: center; pointer-events: auto; border-top: 1px solid var(--theme-secondary);
            transition: opacity 0.2s ease-in-out, visibility 0s linear 0.2s, background-color 0.3s ease, border-color 0.3s ease;
            opacity: 0; visibility: hidden;
        }
        #presetDanmakuContainer.visible { opacity: 1; visibility: visible; transition-delay: 0s; }
        .preset-danmaku-button {
            padding: 5px 10px; font-size: 11px; background-color: #fff; color: var(--theme-primary);
            border: 1px solid var(--theme-secondary);
            border-radius: 15px; cursor: pointer; transition: all 0.2s ease;
            box-shadow: 0 1px 2px rgba(214, 93, 177, 0.1); flex-grow: 0;
        }
        .preset-danmaku-button:hover { background-color: var(--theme-guesses-bg); border-color: var(--theme-primary); box-shadow: 0 2px 4px var(--theme-shadow-color); transform: translateY(-1px); }
        .preset-danmaku-button:active, .preset-danmaku-button.pressed { background-color: var(--theme-guesses-bg-hover); transform: scale(0.96); box-shadow: 0 1px 1px var(--theme-shadow-color); }

        .danmaku-input-container-right {
            padding: 12px; background-color: var(--theme-bg-soft);
            backdrop-filter: blur(5px); pointer-events: auto; border-top: 1px solid var(--theme-secondary);
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }
        #danmakuInputRight {
            width: 100%; padding: 10px 16px; font-size: 13px; border: 1px solid var(--theme-danmaku-input-border);
            border-radius: 50px; box-shadow: inset 0 1px 3px rgba(214, 93, 177, 0.08); outline: none;
            background-color: #fff; transition: border-color 0.2s, box-shadow 0.2s, color 0.3s ease; color: var(--theme-text-main);
        }
        #danmakuInputRight:focus { border-color: var(--theme-primary); box-shadow: inset 0 1px 3px var(--theme-shadow-color), 0 0 0 0.2rem var(--theme-shadow-hover-color); }
        #danmakuInputRight:disabled { background-color: #eee; cursor: not-allowed; opacity: 0.7; }
        #danmakuInputRight::placeholder { color: #bbb; font-style: italic; }

        #floatingDanmakuOverlay {
            position: fixed; inset: 0;
            overflow: hidden; pointer-events: none; z-index: 150;
        }
        .floating-danmaku-item {
            position: absolute; left: 0; transform: translateX(-100%);
            white-space: nowrap;
            padding: 5px 15px; font-size: 16px; font-weight: bold; color: #fff;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); opacity: 0.85;
            will-change: transform;
            animation: floatAcross 16s linear forwards;
            contain: content;
        }
        @keyframes floatAcross { from { transform: translate3d(-100%, 0, 0); } to { transform: translate3d(calc(100vw - 300px), 0, 0); } }
        .floating-danmaku-item.finished { display: none; }

        .achievement-danmaku-burst-item {
            position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.5);
            white-space: nowrap;
            font-size: 24px;
            font-weight: bold;
            color: var(--theme-achievement-icon-color, #ff007f);
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
            opacity: 0;
            animation: popAndFade 2s ease-out forwards;
            z-index: 20;
            pointer-events: none;
            will-change: transform, opacity;
        }
        @keyframes popAndFade {
            0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
            20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
            80% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
            100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
        }


        .start-text {
            font-size: clamp(1.8rem, 5vw, 2.4rem); text-align: center; margin-bottom: 2rem;
            color: var(--theme-text-strong);
            font-weight: 600; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.08); position: relative;
            transition: color 0.3s ease;
        }
        .modes-row { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
        .mode-button, .answer-button, .restart-button, .popup-button, .achievement-popup-button {
            padding: 0.8rem clamp(1.5rem, 4vw, 1.8rem);
            font-size: clamp(0.95rem, 3vw, 1.1rem);
            font-weight: 500; letter-spacing: 0.5px;
            border: none; outline: none; cursor: pointer; border-radius: 50px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
            color: #fff;
            transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        background-color 0.2s ease,
                        filter 0.15s ease;
            margin-bottom: 0.8rem; flex-grow: 1; flex-basis: 160px;
            text-align: center; min-width: 130px; position: relative; overflow: hidden;
            background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
            background-size: 40px 40px;
            animation: stripes 2s linear infinite;
            will-change: transform;
            z-index: 1;
        }
        .mode-button::after, .answer-button::after, .restart-button::after, .popup-button::after, .achievement-popup-button::after {
            content: "";
            position: absolute;
            top: 0;
            left: -150%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            z-index: 2;
            transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
        }
        .mode-button:hover::after, .answer-button:hover::after, .restart-button:hover::after, .popup-button:hover::after, .achievement-popup-button:hover::after {
            transform: translateX(250%);
        }

        @keyframes stripes {
            from { background-position: 0 0; }
            to { background-position: 40px 0; }
        }

        .mode-button:hover, .answer-button:hover, .restart-button:hover, .popup-button:hover, .achievement-popup-button:hover,
        #showAchievementsButton:hover {
            transform: translateY(-5px) scale(1.03) rotate(-2deg);
            box-shadow: 0 10px 20px var(--theme-shadow-hover-color);
            filter: brightness(1.15);
        }
        .mode-button:active, .answer-button:active, .restart-button:active, .popup-button:active, .achievement-popup-button:active,
        .mode-button.pressed, .answer-button.pressed, .restart-button.pressed, .popup-button.pressed, .achievement-popup-button.pressed,
        #showAchievementsButton:active, #showAchievementsButton.pressed {
            transform: translateY(1px) scale(0.96);
            box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.12);
            filter: brightness(0.9);
        }

        .mode-button:nth-child(1) { background-color: var(--theme-primary); }
        .mode-button:nth-child(2) { background-color: #957dad; }
        .mode-button:nth-child(3) { background-color: #ffb347; color: #fff; }
        .mode-button:nth-child(4) { background-color: var(--theme-accent); }

        .answer-button:nth-child(1) { background-color: var(--theme-button-correct); }
        .answer-button:nth-child(2) { background-color: var(--theme-button-wrong); }
        .answer-button:nth-child(3) { background-color: #ffb347; color: #fff; }
        .answer-button:nth-child(4) { background-color: #87ceeb; }
        .answer-button:nth-child(5) { background-color: #ff9a8c; }
        .answer-button:nth-child(6) { background-color: #b0c4de; }

        .restart-button { background-color: #87ceeb; }
        .popup-button.correct { background-color: var(--theme-button-correct); }
        .popup-button.wrong { background-color: var(--theme-button-wrong); }

        .achievement-popup-button {
             background-color: var(--theme-achievement-border, #ffcc00);
        }


        .question-display {
            padding: clamp(1.5rem, 4vw, 2.2rem); background-color: var(--theme-bg-soft);
            border-radius: 24px; text-align: center; font-size: clamp(1.4rem, 4vw, 1.8rem);
            margin-bottom: 1.5rem; color: var(--theme-text-main);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06); width: 100%; display: flex; align-items: center;
            justify-content: center; min-height: 110px; line-height: 1.5; border: 1px solid var(--theme-secondary);
            transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
        }
        .progress-bar-container {
            width: 100%; max-width: 500px; background-color: rgba(233, 236, 239, 0.9); border-radius: 50px;
            margin-bottom: 1.2rem; overflow: hidden; margin-left: auto; margin-right: auto; height: 24px;
            border: 1px solid var(--theme-secondary);
            transition: border-color 0.3s ease;
        }
        .progress-bar {
            background: linear-gradient(90deg, var(--theme-progress-start), var(--theme-progress-end));
            height: 100%; border-radius: 50px;
            transition: width 0.4s cubic-bezier(0.3, 0.8, 0.2, 1), background 0.3s ease;
            position: relative;
        }
        .progress-bar:after {
            content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.1) 100%);
            animation: progressShine 2s infinite linear;
            border-radius: 50px; overflow: hidden;
        }
        @keyframes progressShine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
        .progress-text {
            text-align: center; font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--theme-text-strong); font-weight: 500;
            transition: color 0.3s ease;
        }
        .result-text {
            text-align: center; color: var(--theme-button-correct); font-size: clamp(2rem, 6vw, 2.8rem); font-weight: bold;
            margin-bottom: 2rem; margin-top: 1.5rem; position: relative; text-shadow: 1px 1px 4px var(--theme-shadow-color);
            animation: pulse 1.5s infinite ease-in-out;
            transition: color 0.3s ease, text-shadow 0.3s ease, font-size 0.3s ease;
        }
        .result-text.error { color: var(--theme-button-wrong); animation: none; }
        .result-text.invalid { color: var(--theme-text-main); font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 500; animation: none; margin-top: 1rem; margin-bottom: 1.2rem; text-shadow: none; }
        @keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.9; } }
        .error-text {
            text-align: center; color: var(--theme-error-text); font-size: 1.1rem; font-weight: 500; margin-bottom: 1.5rem;
            margin-top: 1.2rem; background-color: var(--theme-error-bg); padding: 0.8rem 1.2rem;
            border-radius: 12px; border-left: 5px solid var(--theme-error-text);
            transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
        }
        .answer-buttons-row { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; width: 100%; }
        .answer-button { flex-basis: 140px; flex-grow: 1; max-width: calc(33.33% - 0.7rem); }
        .guessed-image {
            display: block; width: 220px; height: 220px; object-fit: contain; border-radius: 24px;
            margin: 0 auto 2rem auto; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
            background-color: rgba(255, 255, 255, 0.95); border: 1px solid var(--theme-secondary);
            transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
        }
        .guessed-image:hover { transform: scale(1.08) rotate(3deg); box-shadow: 0 15px 40px var(--theme-shadow-hover-color); }
        .hidden { display: none !important; }

        .confetti-container { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 150; }
        .confetti {
            position: absolute; width: 12px; height: 12px; border-radius: 50%; opacity: 0; will-change: transform, opacity;
            animation: confetti-fall 4s linear forwards, confetti-rotate 2.5s linear infinite;
        }
        @keyframes confetti-fall { 0% { top: -15%; opacity: 1; transform: rotate(-60deg) scale(0.9); } 100% { top: 120%; opacity: 0.4; transform: rotate(60deg) scale(1.3); } }
        @keyframes confetti-rotate { 0%, 100% { transform: rotateY(0deg) translateX(0px); } 50% { transform: rotateY(180deg) translateX(20px); } }

        #particles-js { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -10; }

        #confirmationPopup {
            position: fixed; top: 50%; left: 50%;
            background-color: rgba(255, 255, 255, 0.98);
            padding: 2.5rem 3rem; border-radius: 24px;
            box-shadow: 0 12px 40px var(--theme-shadow-popup-color);
            z-index: 200; text-align: center; border: 1px solid var(--theme-secondary);
            backdrop-filter: blur(8px);
            opacity: 0; visibility: hidden;
            transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s, box-shadow 0.3s ease, border-color 0.3s ease;
            transform: translate(-50%, -40%) scale(0.9);
        }
        #confirmationPopup.visible { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); transition-delay: 0s; }
        #confirmationPopup p {
            font-size: 1.4rem; color: var(--theme-text-strong); margin-bottom: 1rem; font-weight: 500;
            transition: color 0.3s ease;
        }
        #confirmationPopup p::before { content: "❓ "; color: var(--theme-accent); margin-right: 10px; font-size: 1.4rem; vertical-align: middle; transition: color 0.3s ease; }
        .checkbox-container {
            margin-top: 1rem; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: center;
            cursor: pointer; font-size: 0.95rem; color: var(--theme-text-main); transition: color 0.3s ease;
        }
        .checkbox-container input[type="checkbox"] {
            margin-right: 10px; cursor: pointer; appearance: none; -webkit-appearance: none;
            width: 18px; height: 18px; border: 2px solid var(--theme-secondary); border-radius: 5px;
            position: relative; top: -1px; transition: background-color 0.2s ease, border-color 0.2s ease;
        }
        .checkbox-container input[type="checkbox"]:checked { background-color: var(--theme-accent); border-color: var(--theme-primary); }
        .checkbox-container input[type="checkbox"]:checked::after { content: '✔'; position: absolute; top: 0px; left: 2px; font-size: 12px; color: white; }
        .checkbox-container label { cursor: pointer; user-select: none; }
        .popup-buttons { display: flex; gap: 1.2rem; justify-content: center; }
        .popup-button { padding: 0.7rem 1.6rem; font-size: 1rem; flex-grow: 0; min-width: 120px; }

        #achievementNotificationPopup {
             position: fixed; top: 50%; left: 50%;
             background-color: var(--theme-achievement-bg);
             border: 2px solid var(--theme-achievement-border);
             border-radius: 20px; padding: 2.5rem 2rem;
             box-shadow: 0 10px 30px var(--theme-achievement-shadow);
             text-align: center; max-width: 400px; width: 90%;
             z-index: 300;
             opacity: 0; visibility: hidden;
             transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
             transform: translate(-50%, -40%) scale(0.8);
         }
        #achievementNotificationPopup.visible { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); transition-delay: 0s; }


        .achievement-notification-icon {
             font-size: 3.5rem;
             margin-bottom: 1rem;
             color: var(--theme-achievement-icon-color);
        }

        #achievementNotificationTitle {
             font-size: 1.8rem; margin-bottom: 0.8rem; color: var(--theme-text-strong);
             font-weight: 700;
        }

        #achievementNotificationMessage {
             font-size: 1.2rem; color: var(--theme-achievement-text);
             margin-bottom: 1.5rem; line-height: 1.4;
        }
         #achievementNotificationDetails {
             font-size: 1rem; color: var(--theme-text-main);
             margin-top: 1rem; font-style: italic;
         }

        #achievementListPopup {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background-color: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(5px);
            z-index: 350;
            display: flex; align-items: flex-start; justify-content: center;
            opacity: 0; visibility: hidden;
            transition: opacity 0.3s ease, visibility 0s linear 0.3s;
            overflow-y: auto; /* 允许垂直滚动 */
            padding-top: 1rem;
            padding-bottom: 1rem;
        }
        #achievementListPopup.visible { opacity: 1; visibility: visible; transition-delay: 0s; }

        .achievement-list-content {
             background-color: var(--theme-bg-soft);
             border: 2px solid var(--theme-secondary);
             border-radius: 20px; padding: 1.5rem;
             box-shadow: 0 10px 30px var(--theme-shadow-popup-color);
             max-width: 900px; /* 增大最大宽度 */
             width: 95%; /* 增加宽度 */
             max-height: 90vh;
             display: flex; flex-direction: column;
             position: relative;
             transform: scale(0.9);
             transition: transform 0.3s ease;
             overflow-y: auto; /* 允许垂直滚动 */
             margin-top: 1rem; /* 确保弹窗内容与顶部有一定距离 */
        }
        #achievementListPopup.visible .achievement-list-content { transform: scale(1); }

        .achievement-list-close-button {
             position: absolute; top: 15px; right: 20px;
             font-size: 1.8rem; color: var(--theme-text-main);
             cursor: pointer; line-height: 1; transition: color 0.2s ease;
             z-index: 10;
        }
        .achievement-list-close-button:hover { color: var(--theme-primary); }

        .data-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 1rem;
            border-bottom: 1px solid var(--theme-secondary);
            flex-shrink: 0;
            flex-wrap: nowrap;
            overflow-x: auto;
        }

        .tab-btn {
            padding: 10px 15px;
            cursor: pointer;
            border: none;
            background: transparent;
            font-size: 1.1rem;
            color: var(--theme-text-main);
            border-bottom: 3px solid transparent;
            transition: color 0.2s, border-color 0.2s;
            flex-shrink: 0;
        }
        .tab-btn:hover {
            color: var(--theme-primary);
        }
        .tab-btn.active {
            color: var(--theme-primary);
            font-weight: bold;
            border-bottom-color: var(--theme-primary);
        }

        .tab-content {
            display: none;
            flex-grow: 1;
            overflow-y: auto;
            padding-right: 5px;
            min-height: 300px; /* 确保内容区域有最小高度 */
        }
        .tab-content.active {
            display: block;
        }

        .level-summary {
            background: rgba(255, 255, 255, 0.7);
            border: 1px solid var(--theme-secondary);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        .level-stat-item { display: inline-block; margin: 0 1rem; }
        .level-stat-item .label {
            display: block;
            font-size: 0.9rem;
            color: var(--theme-text-main);
            margin-bottom: 0.25rem;
        }
        .level-stat-item .value {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--theme-primary);
        }
        .xp-bar-container {
            background: rgba(0,0,0,0.08);
            border-radius: 8px;
            padding: 3px;
            margin-top: 0.5rem;
        }
        .xp-bar {
            background: linear-gradient(90deg, var(--theme-progress-start), var(--theme-progress-end));
            height: 12px;
            border-radius: 5px;
            transition: width 0.4s ease;
        }
        .xp-text {
            font-size: 0.8rem;
            margin-top: 0.25rem;
            color: var(--theme-text-main);
        }

        /* 等级特权样式 */
        .privileges-section {
            background: rgba(255, 255, 255, 0.7);
            border: 1px solid var(--theme-secondary);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        .privileges-title {
            text-align: center;
            font-size: 1.5rem;
            color: var(--theme-text-strong);
            margin: 0 0 1rem 0;
            position: relative;
        }
        .privileges-title::after {
            content: "";
            display: block;
            width: 50px;
            height: 3px;
            background: var(--theme-primary);
            margin: 0.5rem auto;
            border-radius: 3px;
        }
        .privileges-container {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        .privileges-category .category-title {
            font-size: 1.2rem;
            color: var(--theme-text-strong);
            margin: 0 0 1rem 0;
            padding-bottom: 0.3rem;
            border-bottom: 2px solid var(--theme-secondary);
            position: relative;
        }
        .privileges-category .category-title::after {
            content: "";
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 50px;
            height: 2px;
            background: var(--theme-primary);
        }

        /* 修改特权网格布局，使用更合适的方框 */
        .privileges-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* 稍微增大方框 */
            gap: 1rem; /* 增大间距 */
        }

        /* 小方框样式特权卡片 */
        .privilege-card {
            background: var(--theme-bg-soft);
            border-radius: 10px;
            padding: 1rem; /* 稍微增大内边距 */
            border: 1px solid var(--theme-secondary);
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
            position: relative;
            overflow: hidden;
            height: 100%;
        }
        .privilege-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 3px;
        }
        .privilege-card.unlocked {
            background: linear-gradient(135deg, rgba(255, 245, 248, 0.9), rgba(240, 248, 255, 0.9));
            border-color: var(--theme-primary);
            box-shadow: 0 3px 10px rgba(214, 93, 177, 0.15);
        }
        .privilege-card.unlocked::before {
            background: var(--theme-primary);
        }
        .privilege-card.locked {
            opacity: 0.7;
            filter: grayscale(40%);
            background: rgba(245, 245, 245, 0.8);
        }
        .privilege-card.locked::before {
            background: #ccc;
        }
        .privilege-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }
        .privilege-card.unlocked:hover {
            box-shadow: 0 4px 12px rgba(214, 93, 177, 0.25);
        }

        /* 特权图标 */
        .privilege-icon {
            font-size: 1.8rem; /* 稍微增大图标 */
            text-align: center;
            margin-bottom: 0.5rem;
            color: var(--theme-primary);
        }

        /* 特权内容 */
        .privilege-content {
            flex-grow: 1;
            text-align: center;
        }
        .privilege-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 0.3rem;
            gap: 0.3rem;
        }
        .privilege-level {
            background: var(--theme-primary);
            color: white;
            font-size: 0.7rem;
            font-weight: bold;
            padding: 0.1rem 0.4rem;
            border-radius: 15px;
        }
        .privilege-name {
            font-size: 1rem; /* 稍微增大名称 */
            font-weight: bold;
            color: var(--theme-text-strong);
            line-height: 1.2;
        }
        .privilege-description {
            font-size: 0.75rem;
            color: var(--theme-text-main);
            line-height: 1.3;
            margin-top: 0.3rem;
            display: none; /* 在小方框中隐藏描述 */
        }

        /* 特权状态 */
        .privilege-status {
            margin-top: 0.5rem;
            padding-top: 0.5rem;
            border-top: 1px dashed var(--theme-secondary);
            font-size: 0.8rem; /* 稍微增大状态文字 */
            font-weight: bold;
            text-align: center;
        }
        .privilege-card.unlocked .privilege-status {
            color: #4caf50;
        }
        .privilege-card.locked .privilege-status {
            color: #9e9e9e;
        }

        /* 待解锁特权的特殊样式 */
        .privilege-card.locked .privilege-name {
            font-size: 0.9rem;
        }
        .privilege-card.locked .privilege-level {
            font-size: 0.65rem;
        }

        .more-privileges {
            text-align: center;
            font-size: 0.9rem;
            color: var(--theme-text-main);
            font-style: italic;
            margin-top: 0.5rem;
            padding: 0.8rem;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 8px;
        }

        #pokedex-title {
            text-align: center;
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--theme-text-strong);
            margin: 1.5rem 0 1rem 0;
        }

        #levels-content .pokedex-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
            gap: 15px;
            padding: 1rem;
        }
        .pokedex-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            background: rgba(255,255,255,0.7);
            border-radius: 12px;
            padding: 12px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        .pokedex-item img {
            width: 90px;
            height: 90px;
            object-fit: cover;
            border-radius: 50%;
            border: 2px solid var(--theme-secondary);
            margin-bottom: 8px;
        }
        .pokedex-name {
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--theme-text-strong);
            text-align: center;
        }
        .pokedex-empty {
            text-align: center;
            grid-column: 1 / -1;
            padding: 2rem;
            color: var(--theme-text-main);
        }

        #stats-content, #quests-content, #customize-content {
            padding: 1rem;
            color: var(--theme-text-main);
        }
        .stats-category {
            margin-bottom: 1.5rem;
            background: rgba(255,255,255,0.6);
            padding: 1rem;
            border-radius: 12px;
            border: 1px solid var(--theme-secondary);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        .stats-category h4 {
            font-size: 1.2rem;
            color: var(--theme-text-strong);
            margin: 0 0 1rem 0;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--theme-secondary);
        }

        /* 高级统计数据样式 */
        .stats-category.advanced-stats {
            background: linear-gradient(135deg, rgba(214, 93, 177, 0.1), rgba(255, 143, 171, 0.1));
            border: 1px solid var(--theme-primary);
            position: relative;
        }
        .stats-category.advanced-stats h4::after {
            content: "💎";
            margin-left: 10px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 1rem;
        }

        .stat-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--theme-guesses-bg);
            padding: 10px 15px;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }
        .stat-item .label {
            font-size: 0.95rem;
        }
        .stat-item .value {
            font-size: 1.2rem;
            font-weight: bold;
            color: var(--theme-primary);
        }

        .customization-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); /* 增大每个自定义项 */
            gap: 15px; /* 增大间距 */
        }

        .quest-list-item {
            background: rgba(255,255,255,0.7);
            border: 1px solid var(--theme-secondary);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1rem;
            opacity: 0.7;
        }
        .quest-list-item.completed {
            opacity: 1;
            border-left: 5px solid var(--theme-button-correct);
        }
        .quest-title {
            font-size: 1.1rem;
            font-weight: bold;
            color: var(--theme-text-strong);
            margin-bottom: 0.5rem;
        }
        .quest-title .icon { margin-right: 0.5rem; }
        .quest-reward {
            font-size: 0.9rem;
            color: var(--theme-primary);
            font-weight: bold;
        }
        .quest-progress-bar-container {
            background: rgba(0,0,0,0.08);
            border-radius: 8px;
            padding: 3px;
            margin-top: 0.75rem;
        }
        .quest-progress-bar {
            background: linear-gradient(90deg, var(--theme-progress-start), var(--theme-progress-end));
            height: 12px; /* 稍微增大进度条高度 */
            border-radius: 5px;
            transition: width 0.4s ease;
        }
        .quest-progress-text {
            font-size: 0.85rem; /* 稍微增大进度文字 */
            text-align: right;
            margin-top: 0.25rem;
        }
        .quest-list-item.completed .quest-progress-text::after {
            content: ' ✓';
            color: var(--theme-button-correct);
            font-weight: bold;
        }

        .custom-item {
            background: rgba(255,255,255,0.7);
            border: 2px solid var(--theme-secondary);
            border-radius: 12px;
            padding: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }
        .custom-item:hover { transform: translateY(-3px); box-shadow: 0 4px 10px var(--theme-shadow-color); }
        .custom-item.active { border-color: var(--theme-primary); box-shadow: 0 0 0 3px var(--theme-secondary); }
        .custom-item.locked {
            filter: grayscale(80%);
            cursor: not-allowed;
            opacity: 0.6;
            position: relative;
        }
        .custom-item.locked::after {
            content: '🔒';
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            font-size: 2rem;
            color: rgba(0,0,0,0.5);
        }
        .custom-item img { width: 60px; height: 60px; object-fit: contain; }
        .custom-item .label {
            display: block;
            margin-top: 5px;
            font-size: 0.8rem;
            color: var(--theme-text-main);
        }
        .bubble-preview {
            width: 60px; height: 40px;
            background: var(--theme-bg-soft);
            border: 1px solid var(--theme-secondary);
            border-radius: 10px;
            margin: 10px auto 0;
            position: relative;
        }
        .bubble-preview::after {
            content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
            border-left: 8px solid transparent; border-right: 8px solid transparent;
            border-top: 8px solid var(--theme-secondary);
        }
        .bubble-preview.bubble-style-blue { background: #e3f2fd; border-color: #90caf9; }
        .bubble-preview.bubble-style-blue::after { border-top-color: #90caf9; }
        .bubble-preview.bubble-style-gold { background: #fff8e1; border-color: #ffe082; }
        .bubble-preview.bubble-style-gold::after { border-top-color: #ffe082; }


        .achievement-list {
             list-style: none; padding: 0; margin: 0;
             display: grid;
             grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 使用网格布局 */
             gap: 15px; /* 增大间距 */
         }

        .achievement-list-item {
             display: flex; align-items: center; gap: 15px;
             padding: 15px; /* 增大内边距 */
             border-radius: 12px;
             background-color: rgba(255, 255, 255, 0.8);
             border: 1px solid rgba(var(--theme-secondary, #ffb6c1), 0.5);
             opacity: 0.6;
             transition: opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
         }
         .achievement-list-item.unlocked {
             opacity: 1;
             background-color: var(--theme-guesses-bg, #fff5f8);
             border-color: var(--theme-accent, #ff8fab);
             box-shadow: 0 2px 8px rgba(0,0,0,0.05);
         }

         .achievement-item-icon {
             font-size: 2.2rem; /* 稍微增大图标 */
             flex-shrink: 0;
             color: #ccc;
             transition: color 0.3s ease;
         }
         .achievement-list-item.unlocked .achievement-item-icon {
             color: var(--theme-achievement-icon-color, #ffd700);
         }

         .achievement-item-text {
             flex-grow: 1;
         }

         .achievement-item-title {
             font-size: 1.1rem; /* 稍微增大标题 */
             font-weight: bold;
             color: var(--theme-text-strong);
             margin-bottom: 4px; transition: color 0.3s ease;
         }
         .achievement-list-item:not(.unlocked) .achievement-item-title {
             color: var(--theme-text-main);
         }

         .achievement-item-description {
             font-size: 0.9rem; /* 稍微增大描述 */
             color: var(--theme-text-main);
             line-height: 1.4; transition: color 0.3s ease;
         }


        .theme-picker {
            background-color: rgba(255, 255, 255, 0.85);
            padding: 0.8rem 1.2rem; border-radius: 18px; box-shadow: 0 3px 8px rgba(0,0,0,0.1);
            display: inline-flex; flex-wrap: wrap;
            align-items: center; justify-content: center; gap: 0.8rem;
            z-index: 10;
        }
        .theme-picker .buttons-container { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; width: 100%; }
        .theme-button {
            width: 26px; height: 26px; border-radius: 50%;
            border: 2px solid rgba(0,0,0,0.2); cursor: pointer; padding: 0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
            flex-shrink: 0;
            position: relative;
        }
        .theme-button.locked::after {
            content: '🔒';
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 12px;
            text-shadow: 1px 1px 2px black;
        }
        .theme-button.locked {
            filter: grayscale(80%);
            cursor: not-allowed;
        }

        .theme-button:hover { transform: scale(1.15); box-shadow: 0 2px 6px rgba(0,0,0,0.2); }

/* 吉祥物投喂按钮 */
.feed-mascot-button {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #FFD700;
    border: 2px solid #FFA500;
    color: #8B4513;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    z-index: 1002;
}

.feed-mascot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.feed-mascot-button:active {
    transform: scale(0.95);
}

        .theme-button.active { border-color: var(--theme-primary); transform: scale(1.2); box-shadow: 0 0 0 3px var(--theme-secondary); }

        .top-controls-container {
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 0 auto 0.8rem auto;
            flex-wrap: wrap;
            gap: 1rem;
            max-width: 100%;
        }
        
        /* 将我的数据按钮和主题选择器放在同一行 */
        .top-controls-container > * {
            margin: 0.2rem;
        }

        #showAchievementsButton {
             display: flex; align-items: center; gap: 4px; padding: 6px 12px;
             border-radius: 20px; border: 1px solid var(--theme-secondary);
             background-color: var(--theme-secondary);
             color: var(--theme-text-main);
             cursor: pointer;
             transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                         box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                         background-color 0.3s ease, color 0.3s ease;
             font-size: 0.85rem; font-weight: 500;
             box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
#showAchievementsButton:hover {
     background-color: var(--theme-primary);
     color: var(--theme-show-more-text-hover);
 }
 #showAchievementsButton .level-badge {
     background-color: var(--theme-primary);
     color: white;
     border-radius: 50%;
     width: 20px;
     height: 20px;
     font-size: 0.7rem;
     display: inline-flex;
     justify-content: center;
     align-items: center;
     font-weight: bold;
     margin-right: 3px;
}
/* 称号样式 */
.title-badge {
    display: inline-block;
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-accent));
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 5px;
    vertical-align: middle;
}
#showAchievementsButton:hover .level-badge {
    background-color: white;
    color: var(--theme-primary);
}
#showAchievementsButton #coinDisplay {
    font-weight: bold;
    color: #FFD700; /* 金币颜色 */
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}
 #showAchievementsButton span {
      font-weight: bold; margin-left: 3px; color: var(--theme-text-strong); transition: color 0.3s ease;
  }
  #showAchievementsButton:hover span {
      color: #fff;
  }

/* 称号样式 */
.title-badge {
    display: inline-block;
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-accent));
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 5px;
    vertical-align: middle;
}

        .mascot {
            position: fixed; right: 20px; bottom: 20px; width: 120px; height: 120px;
            z-index: 1000; cursor: pointer; transition: transform 0.3s ease;
            user-select: none;
        }
        .mascot:hover { transform: scale(1.1); }
        .mascot img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
        .mascot-speech-bubble {
            position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
            background-color: var(--theme-bg-soft); border: 1px solid var(--theme-secondary);
            border-radius: 15px; padding: 8px 12px; font-size: 0.9rem;
            color: var(--theme-text-main); white-space: nowrap;
            opacity: 0; transition: opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; pointer-events: none;
            z-index: 1001;
            min-width: 150px;
            text-align: center;
        }
        .mascot-speech-bubble::after {
            content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
            border-left: 10px solid transparent; border-right: 10px solid transparent;
            border-top: 10px solid var(--theme-secondary);
            transition: border-top-color 0.3s ease;
        }
        .mascot-speech-bubble.bubble-style-blue { background: #e3f2fd; border-color: #90caf9; }
        .mascot-speech-bubble.bubble-style-blue::after { border-top-color: #90caf9; }
        .mascot-speech-bubble.bubble-style-gold { background: #fff8e1; border-color: #ffe082; }
        .mascot-speech-bubble.bubble-style-gold::after { border-top-color: #ffe082; }
        .mascot-speech-bubble.visible { opacity: 1; }

        .temporary-message {
            position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
            background: var(--theme-temp-message-bg);
            padding: 10px 20px; border-radius: 20px;
            border: 1px solid var(--theme-temp-message-border);
            color: var(--theme-temp-message-text);
            font-size: 0.9rem; z-index: 1000;
            animation: messagePopup 0.3s ease-out forwards;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

/* 商店页面样式 */
.shop-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.shop-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--theme-secondary);
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}
.shop-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.shop-tab.active {
    background-color: var(--theme-primary);
    color: white;
    border-color: var(--theme-primary);
    font-weight: bold;
}
.shop-tab-content {
    display: none;
}
.shop-tab-content.active {
    display: block;
}

/* 抽奖特效样式 */
.gacha-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease-out;
}

.gacha-popup-content {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: popIn 0.6s ease-out;
    border: 3px solid gold;
}

.gacha-popup-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.gacha-popup-reward {
    font-size: 3rem;
    font-weight: bold;
    margin: 1.5rem 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: pulse 1s ease-in-out infinite;
}

.gacha-popup-close {
    background-color: white;
    color: var(--theme-primary);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.gacha-popup-close:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.shop-category {
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.6);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--theme-secondary);
}
.shop-category h4 {
    font-size: 1.2rem;
    color: var(--theme-text-strong);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--theme-secondary);
}
.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}
.shop-item {
    background: var(--theme-bg-soft);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--theme-secondary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.shop-item.owned {
    border-color: #4caf50;
    background: linear-gradient(135deg, rgba(255, 245, 248, 0.9), rgba(200, 255, 200, 0.3));
}
.shop-item.locked {
    opacity: 0.6;
    filter: grayscale(50%);
}
.shop-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.shop-item.owned:hover {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}
.shop-item.locked:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.shop-item-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}
.shop-item-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.shop-item-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--theme-text-strong);
    margin-bottom: 0.3rem;
    text-align: center;
}
.shop-item-description {
    font-size: 0.85rem;
    color: var(--theme-text-main);
    margin-bottom: 0.5rem;
    text-align: center;
    flex-grow: 1;
}
.shop-item-price {
    font-size: 1rem;
    font-weight: bold;
    color: #FFD700;
    text-align: center;
    margin-bottom: 0.8rem;
}
.shop-item-action {
    padding: 0.5rem;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--theme-primary);
    color: white;
}
.shop-item-action:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.shop-item-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.shop-item-action.used {
    background-color: #4CAF50;
}
.shop-item-action.use {
    background-color: #2196F3;
}
.shop-item-action.buy {
    background-color: var(--theme-primary);
}
.shop-item-action.locked {
    background-color: #9E9E9E;
}

/* 签到按钮样式 */
.check-in-button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #8B4513;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-top: 1rem;
}
.check-in-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.check-in-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 任务刷新按钮样式 */
.refresh-quests-button {
    background: linear-gradient(45deg, #4caf50, #2e7d32);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-left: 10px;
}
.refresh-quests-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.refresh-quests-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 弹幕样式 */
.danmaku-style-colorful {
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
    color: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.danmaku-style-neon {
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 20px #00ffff;
}
.danmaku-style-glow {
    color: #ffff00;
}

/* 自定义页面样式 */
.customization-section {
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.6);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--theme-secondary);
}

.customization-title {
    font-size: 1.2rem;
    color: var(--theme-text-strong);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--theme-secondary);
}

.customization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
}

.customization-item {
    background: var(--theme-bg-soft);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--theme-secondary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    height: 100%;
    cursor: pointer;
}

.customization-item.unlocked:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.customization-item.locked {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(40%);
}

.customization-item.selected {
    border-color: var(--theme-primary);
    background: linear-gradient(135deg, rgba(255, 245, 248, 0.9), rgba(240, 248, 255, 0.9));
    box-shadow: 0 3px 10px rgba(214, 93, 177, 0.15);
}

.customization-icon {
    text-align: center;
    margin-bottom: 0.5rem;
}

.customization-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.bubble-preview {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    background: white;
    font-size: 1.2rem;
}

.customization-info {
    flex-grow: 1;
    text-align: center;
}

.customization-name {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--theme-text-strong);
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.customization-level {
    font-size: 0.75rem;
    color: var(--theme-primary);
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.customization-status {
    font-size: 0.7rem;
    color: #4caf50;
    font-weight: bold;
}

.customization-lock {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
    color: #9e9e9e;
}

.danmaku-style-neon {
    color: #00ffff;
    text-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00;
}
.danmaku-style-3d {
    color: #ff00ff;
    text-shadow: 2px 2px 0 #800080, 4px 4px 0 rgba(0,0,0,0.2);
}
.danmaku-style-handwriting {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    color: #ff6347;
}
.danmaku-style-pixel {
    font-family: 'Courier New', monospace;
    color: #7cfc00;
    text-shadow: 2px 0 0, -2px 0 0, 0 2px 0, 0 -2px 0;
}
.danmaku-style-retro {
    font-family: 'Courier New', monospace;
    color: #00ff00;
    background-color: #000;
    padding: 2px 4px;
}
.danmaku-style-future {
    color: #00bfff;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.danmaku-style-dreamy {
    color: #ff69b4;
    filter: blur(0.5px);
}

/* 新增弹幕样式 */
.danmaku-style-rainbow {
    background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080);
    background-size: 1200% 1200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 3s ease infinite;
    font-weight: bold;
}

.danmaku-style-fire {
    color: #ff4500;
    text-shadow: 0 0 5px #ff4500, 0 0 10px #ff4500, 0 0 15px #ff4500, 0 0 20px #ff4500;
    animation: fire 1s ease infinite;
}

.danmaku-style-ice {
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff;
    animation: ice 2s ease infinite;
}

/* 输入框样式 */
.input-style-rounded {
    border-radius: 20px;
}
.input-style-gradient {
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    border: none;
}
.input-style-neon {
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px #00ffff;
}
.input-style-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.input-style-metal {
    background: linear-gradient(45deg, #c0c0c0, #a9a9a9);
    border: 1px solid #808080;
}
.input-style-wood {
    background: linear-gradient(45deg, #8b4513, #a0522d);
    border: 1px solid #654321;
    color: white;
}
.input-style-tech {
    background: linear-gradient(45deg, #000, #333);
    border: 1px solid #00ffff;
    color: #00ffff;
    box-shadow: 0 0 10px #00ffff;
}
.input-style-candy {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    color: white;
}

/* 新增输入框样式 */
.input-style-space {
    background: linear-gradient(45deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    border: 1px solid #43cea2;
    animation: space 3s ease infinite;
}

.input-style-ocean {
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    color: #fff;
    border: 1px solid #00c9ff;
    animation: ocean 2s ease infinite;
}

.input-style-flame {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: #fff;
    border: 1px solid #ffd700;
    animation: flame 1s ease infinite;
}
        @keyframes messagePopup {
            from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
            to { transform: translateX(-50%) translateY(0); opacity: 1; }
        }

        /* 新增动画效果 */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }

        @keyframes slideInLeft {
            from { transform: translateX(-100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        @keyframes slideInRight {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        @keyframes slideInTop {
            from { transform: translateY(-50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        /* 吉祥物动画 */
        @keyframes mascotJump {
            0%, 100% { transform: scale(1) translateY(0); }
            50% { transform: scale(1.1) translateY(-10px); }
        }

        @keyframes mascotShake {
            0%, 100% { transform: scale(0.95) translateX(0); }
            25% { transform: scale(0.95) translateX(-2px); }
            75% { transform: scale(0.95) translateX(2px); }
        }

        @keyframes mascotSad {
            0% { transform: scale(0.9); }
            100% { transform: scale(0.9); }
        }

        @keyframes mascotHappy {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1.15); }
        }

        /* 新增动画关键帧 */
        @keyframes rainbow {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes fire {
            0%, 100% { transform: skewX(0deg); }
            25% { transform: skewX(5deg); }
            75% { transform: skewX(-5deg); }
        }

        @keyframes ice {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.8; }
        }

        @keyframes space {
            0%, 100% { box-shadow: 0 0 5px #43cea2; }
            50% { box-shadow: 0 0 20px #43cea2; }
        }

        @keyframes ocean {
            0%, 100% { box-shadow: 0 0 5px #00c9ff; }
            50% { box-shadow: 0 0 20px #00c9ff; }
        }

        @keyframes flame {
            0%, 100% { box-shadow: 0 0 5px #ffd700; }
            50% { box-shadow: 0 0 20px #ffd700; }
        }


        /* 应用动画到特定元素 */
        .privilege-card {
            animation: fadeIn 0.3s ease-out;
        }

        .privilege-card:hover {
            animation: pulse 0.5s ease-in-out;
        }

        .mascot {
            animation: bounce 2s infinite;
        }

        .temporary-message {
            animation: slideInTop 0.3s ease-out;
        }

        .achievement-list-item {
            animation: fadeIn 0.3s ease-out;
        }

        .quest-list-item {
            animation: fadeIn 0.3s ease-out;
        }

        .shop-item {
            animation: fadeIn 0.3s ease-out;
        }

        .customization-item {
            animation: fadeIn 0.3s ease-out;
        }

        /* 增强按钮悬停效果 */
        .tab-btn:hover, .theme-button:hover, .mode-button:hover, 
        .answer-button:hover, .restart-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
            transition: all 0.3s ease;
        }

        /* 增强弹幕动画 */
        .floating-danmaku-item {
            animation: slideInRight 0.5s ease-out;
        }

        @media (max-width: 1200px) {
             .theme-picker span { display: block; }
             .theme-picker { flex-direction: column; }
             .music-container { width: 280px; }
             .playlist-grid { grid-template-columns: repeat(2, 1fr); }
             .custom-playlist-area form { flex-direction: column; }
             .custom-playlist-area label { margin-bottom: 5px; }
        }
        @media (max-width: 1080px) {
            .page-container {
                grid-template-columns: 1fr; grid-template-areas: "main" "danmaku" "music";
                padding: 0; gap: 0; max-width: 100%;
            }
             #confirmationPopup {
                 top: 40%;
                 transform: translate(-50%, -40%) scale(0.9);
             }
            #confirmationPopup.visible { transform: translate(-50%, -40%) scale(1); }

            #achievementListPopup {
                align-items: flex-start;
                justify-content: flex-start;
                padding: 1rem;
                padding-top: 1rem;
            }

            .music-container, .danmaku-section, .main-content > .container, .main-content > .guesses-box {
                position: static; width: auto; max-width: 650px;
                margin: 1rem auto; align-self: stretch; height: auto;
                border-radius: 20px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
            }
             .top-controls-container {
                 max-width: 650px;
                 padding: 0 1rem;
             }
            .music-container { height: auto; max-height: none; }
            .playlist-selector-grid { margin: 15px; }
            .music-container iframe { min-height: 450px; height: 450px; }
            .danmaku-section { height: 50vh; }
            .main-content { padding: 0; gap: 0; }
            .main-content > .container, .main-content > .guesses-box { margin: 0 auto 1rem auto; }
            .container, .guesses-box { border-radius: 20px; }
            #floatingDanmakuOverlay { top: 60px; bottom: 120px; position: fixed; }
            .guesses-box ul { justify-content: flex-start; }
             .guesses-box li .guess-hover-image {
                 width: 160px; height: 160px;
                 transform: translate(-50%, -100%) translateY(-8px);
            }
             .guesses-box li:hover .guess-hover-image {
                 transform: translate(-50%, -100%) translateY(-12px);
             }
             
             /* 移动端弹窗优化 */
             .data-tabs {
                 flex-wrap: wrap;
                 justify-content: center;
             }
             .tab-btn {
                 flex: 1 1 auto;
                 min-width: 80px;
                 font-size: 0.9rem;
                 padding: 8px 5px;
             }
        }
        @media (max-width: 768px) {
             .container { padding: 1.2rem 1rem; border-radius: 16px; }
             .guesses-box { padding: 1rem 1.2rem; border-radius: 16px; }
             .answer-button { max-width: calc(50% - 0.5rem); flex-basis: calc(50% - 0.5rem); }
             .mode-button { width: calc(50% - 0.5rem); flex-basis: calc(50% - 0.5rem); max-width: none;}
             .music-container, .danmaku-section, .main-content > .container, .main-content > .guesses-box {
                 margin: 0.8rem auto; max-width: calc(100% - 1.5rem); border-radius: 16px;
             }
             .top-controls-container { flex-direction: row; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }
             .top-controls-container > * { margin: 0.1rem; }
             #showAchievementsButton { gap: 2px; padding: 4px 8px; font-size: 0.75rem; }
             #showAchievementsButton .level-badge { width: 16px; height: 16px; font-size: 0.6rem; margin-right: 1px; }
             #showAchievementsButton { gap: 3px; padding: 5px 10px; font-size: 0.8rem; }
             #showAchievementsButton .level-badge { width: 18px; height: 18px; font-size: 0.65rem; margin-right: 2px; }
             .top-controls-container > * { margin: 0.1rem; }
             .theme-picker .buttons-container { width: 100%; justify-content: center; gap: 0.3rem; flex-wrap: nowrap; overflow-x: auto; padding: 2px 0; }
             .danmaku-section { height: 45vh; }
             .music-container iframe { min-height: 450px; height: 450px; }
             .playlist-selector-grid { margin: 10px; padding: 10px; border-radius: 16px;}
             .playlist-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding-bottom: 10px; margin-bottom: 10px;}
             .playlist-btn { min-height: 60px; font-size: 1rem; }
             .custom-playlist-area label { font-size: 0.9rem; }
             .custom-playlist-area input[type="text"], .custom-playlist-area button[type="submit"] { font-size: 0.9rem; padding: 3px 8px; }
             .music-container iframe { margin-top: 0; border-radius: 16px; }
             .question-display { font-size: clamp(1.2rem, 4vw, 1.5rem); min-height: 100px; padding: 1.2rem 1rem; border-radius: 16px; }
             .guessed-image { width: 180px; height: 180px; border-radius: 20px; }
             .guesses-box li { min-width: 70px; font-size: 0.8rem; }
             .guesses-box li a { padding: 0.4rem 0.5rem; }

             .popup-buttons { flex-direction: column; gap: 0.8rem; align-items: center; }
             .popup-button { width: 80%; max-width: 280px; }
             #confirmationPopup {
                 padding: 2rem 1.5rem; border-radius: 20px;
                 top: 35%;
                 transform: translate(-50%, -40%) scale(0.9);
             }
             #confirmationPopup.visible { transform: translate(-50%, -35%) scale(1); }
             #confirmationPopup p { font-size: 1.2rem; }
             .checkbox-container { font-size: 0.9rem; margin-bottom: 1.2rem; }
             .popup-buttons { gap: 0.8rem; }
             #floatingDanmakuOverlay { top: 50px; bottom: 100px; position: fixed; }
             .floating-danmaku-item { font-size: 14px; padding: 4px 12px; }
             .guesses-box .guesses-header { flex-wrap: wrap; justify-content: center; }
             #refreshGuessesButton { order: 1; }
             .guesses-box h2 { order: 2; flex-basis: 100%; text-align: center; margin-top: 0.5rem; }

             .guesses-box li .guess-hover-image {
                 width: 140px; height: 140px;
                 transform: translate(-50%, -100%) translateY(-6px);
            }
             .guesses-box li:hover .guess-hover-image {
                 transform: translate(-50%, -100%) translateY(-10px);
             }

             .mascot { right: 10px; bottom: 10px; width: 100px; height: 100px; }
             .mascot-speech-bubble { top: -50px; }

             #achievementNotificationPopup { padding: 2rem 1.5rem; border-radius: 16px; }
             #achievementNotificationTitle { font-size: 1.6rem; }
             #achievementNotificationMessage { font-size: 1.1rem; }
             .achievement-notification-icon { font-size: 3rem; }

             .achievement-list-content { padding: 1.5rem; border-radius: 16px; max-width: calc(100% - 2rem); max-height: 85vh; margin-top: 0.5rem; }
             .achievement-list-close-button { top: 10px; right: 15px; font-size: 1.6rem; }
             .tab-btn { font-size: 1rem; padding: 8px 12px;}
             .achievement-list { gap: 10px; }
             .achievement-list-item { padding: 10px; gap: 10px; border-radius: 10px; }
             .achievement-item-icon { font-size: 2rem; }
             .achievement-item-title { font-size: 1rem; }
             .achievement-item-description { font-size: 0.85rem; }
             
             /* 移动端弹窗优化 */
             .data-tabs {
                 flex-wrap: wrap;
                 justify-content: center;
             }
             .tab-btn {
                 flex: 1 1 auto;
                 min-width: 70px;
                 font-size: 0.9rem;
                 padding: 6px 4px;
             }
             .privileges-grid {
                 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
                 gap: 0.8rem;
             }
             .privilege-card {
                 padding: 0.8rem;
             }
        }
         @media (max-width: 480px) {
             body { padding-top: 0.5rem; }
             .page-container { gap: 0; padding: 0 0.5rem; }
             .container { padding: 1rem 0.8rem; border-radius: 12px;}
             .guesses-box { padding: 0.8rem 1rem; border-radius: 12px;}
             .mode-button, .answer-button, .restart-button { padding: 0.7rem 1.2rem; font-size: 0.9rem; flex-basis: calc(50% - 0.5rem); max-width: calc(50% - 0.5rem); min-height: 42px; }
             .modes-row, .answer-buttons-row { gap: 0.8rem; margin-bottom: 1rem;}
             .question-display { font-size: 1.1rem; padding: 1rem 0.8rem; min-height: 90px; border-radius: 12px; margin-bottom: 1rem;}
             .start-text { font-size: 1.6rem; margin-bottom: 1.5rem;}
             .guessed-image { width: 140px; height: 140px; border-radius: 16px; }
             .progress-text { font-size: 1rem; margin-bottom: 1rem; } .result-text { font-size: 1.8rem; }
             .music-container, .danmaku-section, .main-content > .container, .main-content > .guesses-box {
                 margin: 0.6rem auto; max-width: calc(100% - 1rem); border-radius: 12px;
             }
             .theme-picker .buttons-container { gap: 0.2rem; flex-wrap: nowrap; overflow-x: auto; padding: 1px 0; }
             .theme-button { width: 20px; height: 20px; }
             .danmaku-section { height: 40vh; }
             .music-container iframe { min-height: 430px; height: 430px; }
             #presetDanmakuContainer { gap: 5px; padding: 8px; }
             .preset-danmaku-button { padding: 4px 8px; font-size: 10px; }
             #danmakuInputRight { padding: 8px 14px; font-size: 12px;}
             .guesses-box ul { gap: 0.5rem; }
             .guesses-box li { min-width: 60px; font-size: 0.8rem; }
             .guesses-box li a { padding: 0.4rem 0.5rem; }
             .container { background-position: center 10%; }
             #confirmationPopup {
                 width: calc(100% - 1.5rem); padding: 1.5rem 1rem; border-radius: 16px;
                 top: 30%;
                 transform: translate(-50%, -40%) scale(0.9);
            }
             #confirmationPopup.visible { transform: translate(-50%, -30%) scale(1); }
             #confirmationPopup p { font-size: 1.1rem; margin-bottom: 0.8rem; }
             .checkbox-container { font-size: 0.85rem; margin-bottom: 1.2rem; }
             .popup-buttons { gap: 0.6rem; }
             #floatingDanmakuOverlay { top: 40px; bottom: 80px; }
             .floating-danmaku-item { font-size: 12px; padding: 3px 10px; animation-duration: 10s; }
             #refreshGuessesButton { width: 28px; height: 28px; font-size: 1rem; line-height: 26px; }
             .guesses-box h2 { font-size: 1.1rem; }
             .guesses-box h2:before, .guesses-box h2:after { font-size: 1rem; margin: 0 8px;}
             .guesses-box li .guess-hover-image {
                 width: 100px; height: 100px;
                 transform: translate(-50%, -100%) translateY(-5px);
            }
             .guesses-box li:hover .guess-hover-image {
                 transform: translate(-50%, -100%) translateY(-8px);
             }

             .mascot { right: 5px; bottom: 5px; width: 80px; height: 80px; }
             .mascot-speech-bubble { top: -40px; padding: 6px 10px; font-size: 0.8rem;}
             .mascot-speech-bubble::after { bottom: -8px; border-top: 8px solid var(--theme-secondary); border-left: 8px solid transparent; border-right: 8px solid transparent; }

             #achievementNotificationPopup { padding: 1.5rem 1rem; border-radius: 12px;}
             #achievementNotificationTitle { font-size: 1.4rem; }
             #achievementNotificationMessage { font-size: 1rem; }
             .achievement-notification-icon { font-size: 2.5rem; }

             .achievement-list-content { padding: 1.2rem; border-radius: 12px; max-width: calc(100% - 1.5rem); max-height: 85vh; margin-top: 0.3rem; }
             .achievement-list-close-button { top: 8px; right: 10px; font-size: 1.4rem; }
             .achievement-list { gap: 8px; }
             .achievement-list-item { padding: 8px; gap: 8px; border-radius: 8px; }
             .achievement-item-icon { font-size: 1.8rem; }
             .achievement-item-title { font-size: 0.95rem; }
             .achievement-item-description { font-size: 0.8rem; }
             
             /* 小屏幕弹窗优化 */
             .data-tabs {
                 flex-wrap: wrap;
                 justify-content: center;
             }
             .tab-btn {
                 flex: 1 1 auto;
                 min-width: 60px;
                 font-size: 0.8rem;
                 padding: 5px 3px;
             }
             .privileges-grid {
                 grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
                 gap: 0.6rem;
             }
             .privilege-card {
                 padding: 0.6rem;
             }
             .privilege-name {
                 font-size: 0.9rem;
             }
             .privilege-description {
                 font-size: 0.7rem;
             }
         }
         #leaderboard-content { padding: 1rem; }
/* 新增排行榜标签页样式 */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.leaderboard-tab {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--theme-text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.leaderboard-tab:hover {
    background-color: var(--theme-secondary);
    color: white;
    transform: translateY(-2px);
}

.leaderboard-tab.active {
    background-color: var(--theme-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.leaderboard-tab-content {
    display: none;
}

.leaderboard-tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* 排行榜表格样式 */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-table thead {
    background-color: var(--theme-primary);
    color: white;
}

.leaderboard-table th {
    padding: 15px 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.leaderboard-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tr:nth-child(even) {
    background-color: rgba(245, 245, 245, 0.5);
}

.leaderboard-table tr:hover {
    background-color: rgba(214, 93, 177, 0.1);
}

.leaderboard-table .rank {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--theme-primary);
}

.leaderboard-table .current-player {
    background-color: rgba(214, 93, 177, 0.2) !important;
    font-weight: bold;
}

.leaderboard-table .current-player .rank {
    color: #ff4081;
}

.leaderboard-table .nickname {
    font-weight: bold;
    color: var(--theme-text-strong);
    cursor: pointer;
    transition: color 0.2s;
}

.leaderboard-table .nickname:hover {
    color: var(--theme-primary);
    text-decoration: underline;
}

.leaderboard-table .level,
.leaderboard-table .score,
.leaderboard-table .coins,
.leaderboard-table .mascot-level,
.leaderboard-table .mascot-affection,
.leaderboard-table .accuracy {
    font-weight: bold;
    color: var(--theme-primary);
}

/* 排行榜加载和错误状态 */
.leaderboard-loading,
.leaderboard-error {
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
    color: var(--theme-text-main);
}

.leaderboard-error {
    color: var(--theme-error-text);
    background-color: var(--theme-error-bg);
    border-radius: 12px;
    margin-top: 1rem;
}

/* 排行榜同步按钮样式 */
.sync-container {
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--theme-guesses-bg);
    border-radius: 12px;
    text-align: center;
    border: 1px dashed var(--theme-secondary);
}

.sync-data-button {
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    background-color: var(--theme-primary);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.sync-data-button:hover {
    filter: brightness(1.1);
}

.sync-data-button:active {
    transform: scale(0.98);
}

.sync-data-button:disabled {
    background-color: var(--theme-secondary);
    cursor: not-allowed;
}

.sync-status-text {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--theme-text-main);
    min-height: 1.2em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .leaderboard-tabs {
        gap: 5px;
    }
    
    .leaderboard-tab {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 8px 5px;
        font-size: 0.9rem;
    }
    
    .leaderboard-table .rank {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .leaderboard-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 6px 3px;
        font-size: 0.8rem;
    }
    
    .leaderboard-table .rank {
        font-size: 0.9rem;
    }
}

/* 玩家资料信息项样式 */
.profile-info-item {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--theme-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-info-item h3 {
    color: var(--theme-text-strong);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
    border-bottom: 1px solid var(--theme-secondary);
    padding-bottom: 0.5rem;
}

.profile-info-item p {
    color: var(--theme-text-main);
    font-size: 1.1rem;
    margin: 0.8rem 0;
    padding: 0.5rem;
    background: var(--theme-guesses-bg);
    border-radius: 8px;
    border: 1px solid var(--theme-secondary);
}

.profile-info-item p strong {
    color: var(--theme-primary);
}

#nickname-section {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--theme-secondary);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 1rem 0 1rem;
    text-align: center;
}
#nickname-display { display: flex; align-items: center; justify-content: center; gap: 10px; }
#nickname-display .label { font-size: 1rem; color: var(--theme-text-main); }
#nickname-display .value { font-size: 1.2rem; font-weight: bold; color: var(--theme-primary); }
#nickname-edit-btn {
    font-size: 0.8rem; padding: 3px 8px; border-radius: 6px; background: var(--theme-secondary);
    color: var(--theme-text-main); border: none; cursor: pointer;
}
#nickname-edit-area { display: none; margin-top: 10px; gap: 8px; justify-content: center; }
#nickname-input {
    border: 1px solid var(--theme-secondary); border-radius: 8px; padding: 6px 10px;
    font-size: 1rem; text-align: center; width: 180px;
}
#nickname-save-btn {
    padding: 6px 12px; border-radius: 8px; background: var(--theme-primary);
    color: #fff; border: none; cursor: pointer;
}
        .input-modal-backdrop {
            position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 400; display: none; align-items: center; justify-content: center;
        }
        .input-modal-backdrop.visible { display: flex; }
        .input-modal {
            background: var(--theme-bg-soft); border: 1px solid var(--theme-secondary); padding: 1rem 1.2rem; border-radius: 12px; width: 92%; max-width: 520px;
            box-shadow: 0 10px 30px var(--theme-shadow-popup-color); text-align: left;
        }
        .input-modal h4 { margin: 0 0 0.6rem 0; color: var(--theme-text-strong); }
        .input-modal .modal-row { display:flex; gap:8px; align-items:center; }
        .input-modal input[type="text"] { flex:1; padding:8px 10px; border-radius:8px; border:1px solid var(--theme-secondary); font-size:1rem; }
        .input-modal .modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:10px; }
        .input-modal .modal-button { padding:8px 12px; border-radius:8px; border:none; cursor:pointer; }
        .input-modal .modal-button.primary { background:var(--theme-primary); color:#fff; }
        .input-modal .modal-button.ghost { 
            background: transparent; 
            border: 1px solid var(--theme-secondary); 
            color: var(--theme-text-main); 
        }

/* 吉祥物道具商店样式 */
#mascot-shop-area {
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid var(--theme-secondary);
}

#mascot-shop-area h3 {
    color: var(--theme-text-strong);
    text-align: center;
    margin-bottom: 0.5rem;
}

#mascot-shop-area p {
    text-align: center;
    color: var(--theme-text-main);
    margin-bottom: 1rem;
}

.mascot-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--theme-guesses-bg);
    border-radius: 12px;
}

.mascot-stat-item {
    text-align: center;
}

.mascot-stat-item .label {
    display: block;
    font-size: 0.9rem;
    color: var(--theme-text-main);
    margin-bottom: 0.3rem;
}

.mascot-stat-item .value {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--theme-primary);
}

.mascot-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.mascot-item {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--theme-secondary);
}

.mascot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.mascot-item-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--theme-primary);
}

.mascot-item-name {
    font-weight: bold;
    color: var(--theme-text-strong);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.mascot-item-price {
    font-size: 0.9rem;
    color: #ff9800;
    font-weight: bold;
    margin-bottom: 8px;
}

.mascot-item-description {
    font-size: 0.8rem;
    color: var(--theme-text-main);
    margin-bottom: 10px;
    line-height: 1.3;
}

.mascot-item-button {
    padding: 6px 12px;
    font-size: 0.85rem;
    border: none;
    border-radius: 20px;
    background-color: var(--theme-primary);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-weight: bold;
}

.mascot-item-button:hover {
    background-color: #c34c9d;
    transform: scale(1.05);
}

.mascot-item-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mascot-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .mascot-item {
        padding: 10px 8px;
    }
    
    .mascot-item-icon {
        font-size: 1.5rem;
    }
    
    .mascot-item-name {
        font-size: 0.8rem;
    }
    
    .mascot-item-price {
        font-size: 0.8rem;
    }
    
    .mascot-item-description {
        font-size: 0.7rem;
    }
    
    .mascot-item-button {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .mascot-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .mascot-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 8px;
    }
    
    .mascot-item {
        padding: 8px 6px;
    }
    
    .mascot-item-icon {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }
    
    .mascot-item-name {
        font-size: 0.75rem;
    }
    
    .mascot-item-price {
        font-size: 0.75rem;
    }
    
    .mascot-item-description {
        font-size: 0.65rem;
    }
    
    .mascot-item-button {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

#data-sync-area {
    padding: 1rem;
    text-align: center;
    color: var(--theme-text-main);
}

#data-sync-area p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
#data-sync-area hr {
    border: none;
    border-top: 1px solid var(--theme-secondary);
    margin: 1.5rem 0;
}
.sync-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}
#exportDataBtn, #importDataBtn {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background-color: var(--theme-primary);
    color: white;
    transition: background-color 0.2s, transform 0.1s;
    min-width: 180px;
}
#exportDataBtn:hover, #importDataBtn:hover {
    filter: brightness(1.1);
}
#exportDataBtn:disabled, #importDataBtn:disabled {
    background-color: var(--theme-secondary);
    cursor: not-allowed;
    opacity: 0.7;
}
#importKeyInput {
    padding: 0.5rem;
    border: 1px solid var(--theme-secondary);
    border-radius: 8px;
    width: 80%;
    max-width: 300px;
    text-align: center;
    font-size: 1rem;
}
#exportKeyDisplay {
    margin-top: 0.5rem;
    padding: 0.8rem;
    background-color: var(--theme-guesses-bg);
    border: 1px dashed var(--theme-primary);
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--theme-primary);
    letter-spacing: 2px;
    cursor: copy;
    user-select: all;
}
#importStatusDisplay {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    min-height: 1.2em;
    font-weight: 500;
}
