/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gold-gradient: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    --neon-gold: linear-gradient(135deg, #FFE259 0%, #FFA751 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --dark-overlay: rgba(0, 0, 0, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-gold: #ffd700;
    --accent-red: #ff4757;
    --accent-blue: #2ed573;
    --shadow-neon: 0 0 20px rgba(102, 126, 234, 0.5);
    --shadow-gold: 0 0 30px rgba(255, 215, 0, 0.4);
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #1a1a2e);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

/* 动态背景效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(245, 87, 108, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(240, 147, 251, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

#gameCanvas {
    display: block;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 100%);
    cursor: crosshair;
}

/* ==================== HUD 界面 ==================== */
.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 100;
    padding: 15px;
}

.hud.hidden {
    display: none;
}

.hud-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hud-section.stats {
    flex-direction: row;
    gap: 15px;
}

/* 血条和经验条容器 */
.health-bar-container,
.exp-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    padding: 10px 15px;
    background: rgba(15, 12, 41, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.health-bar-container:hover,
.exp-bar-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.bar-label {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 13px;
    min-width: 40px;
    letter-spacing: 1px;
    text-shadow: 0 0 10px currentColor;
}

.health-bar,
.exp-bar {
    flex: 1;
    height: 14px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4757 0%, #ff6b81 50%, #ff4757 100%);
    background-size: 200% 100%;
    animation: healthGlow 2s ease infinite;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.6);
    position: relative;
}

.health-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s ease infinite;
}

.exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ed573 0%, #7bed9f 50%, #2ed573 100%);
    background-size: 200% 100%;
    animation: expGlow 2s ease infinite;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(46, 213, 115, 0.6);
    position: relative;
}

.exp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s ease infinite 1s;
}

@keyframes healthGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes expGlow {
    0%, 100% { background-position: 100% 50%; }
    50% { background-position: 0% 50%; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.bar-text {
    color: var(--text-primary);
    font-size: 12px;
    min-width: 80px;
    text-align: right;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 统计数据项 */
.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 12, 41, 0.85);
    padding: 12px 18px;
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.4);
}

.stat-icon {
    font-size: 22px;
    filter: drop-shadow(0 0 8px currentColor);
}

.stat-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
    min-width: 50px;
    text-shadow: 0 0 10px currentColor;
    letter-spacing: 1px;
}

/* 天气显示 */
.weather-display {
    border-color: rgba(102, 126, 234, 0.5);
    padding: 12px 14px;
}

.weather-name {
    min-width: 60px;
}

.weather-effect {
    font-size: 14px;
    min-width: auto;
    font-weight: 600;
    opacity: 0.8;
}

/* ==================== 屏幕界面通用样式 ==================== */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at center, rgba(15, 12, 41, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
    z-index: 200;
    backdrop-filter: blur(20px);
    animation: fadeInScreen 0.5s ease;
}

.screen.hidden {
    display: none;
}

@keyframes fadeInScreen {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.screen-content {
    text-align: center;
    max-width: 700px;
    padding: 50px 60px;
    background: rgba(20, 18, 45, 0.9);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(102, 126, 234, 0.1);
    animation: contentFloat 0.6s ease;
}

@keyframes contentFloat {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 开始界面 ==================== */
.game-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.3));
    letter-spacing: 2px;
    animation: titlePulse 2s ease-in-out infinite;
    flex-wrap: nowrap;
}

.title-emoji {
    font-size: 56px;
    line-height: 1;
    filter: none;
}

.title-text {
    background: linear-gradient(135deg, #FFE259 0%, #FFA751 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.game-subtitle {
    font-size: 22px;
    color: var(--text-secondary);
    margin-bottom: 35px;
    font-weight: 500;
    letter-spacing: 1px;
}

.controls-info {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 25px 30px;
    border-radius: 20px;
    margin-bottom: 35px;
    text-align: left;
    backdrop-filter: blur(10px);
}

.controls-info h3 {
    color: var(--accent-gold);
    margin-bottom: 18px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.controls-info p {
    color: var(--text-primary);
    margin: 12px 0;
    font-size: 15px;
    line-height: 1.6;
    transition: color 0.2s ease;
}

.controls-info p:hover {
    color: var(--accent-gold);
}

.controls-info strong {
    color: var(--accent-gold);
    font-weight: 700;
}

.controls-info .emoji {
    font-size: 18px;
    margin-right: 5px;
    filter: none;
}

.game-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 18px 60px;
    font-size: 22px;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4), 0 0 0 rgba(102, 126, 234, 0);
    position: relative;
    overflow: hidden;
    letter-spacing: 2px;
}

.game-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.game-button:hover::before {
    left: 100%;
}

.game-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6), 0 0 30px rgba(102, 126, 234, 0.3);
}

.game-button:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ==================== 升级界面 ==================== */
.screen-title {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    filter: drop-shadow(0 4px 15px rgba(240, 147, 251, 0.3));
}

.level-info {
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 35px;
    font-weight: 600;
    letter-spacing: 1px;
}

.level-info span {
    color: var(--accent-gold);
    font-weight: 800;
    font-size: 24px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.upgrade-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.upgrade-option {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 20px;
    padding: 25px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.upgrade-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upgrade-option:hover {
    border-color: rgba(102, 126, 234, 0.8);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.upgrade-option:hover::before {
    opacity: 1;
}

.upgrade-option:active {
    transform: translateY(-2px) scale(1.02);
}

.upgrade-icon {
    font-size: 48px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.upgrade-name {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.upgrade-bonus {
    color: var(--accent-gold);
    font-size: 14px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ==================== 游戏结束界面 ==================== */
.game-over-screen .screen-title {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 15px rgba(255, 71, 87, 0.3));
}

.stats-summary {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 35px;
    backdrop-filter: blur(10px);
}

.stat-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    margin: 12px 0;
    background: rgba(20, 18, 45, 0.8);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.stat-summary-item:hover {
    transform: translateX(10px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.stat-summary-icon {
    font-size: 36px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.stat-summary-label {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.stat-summary-value {
    color: var(--accent-gold);
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
}

/* ==================== 移动端控制 ==================== */
.joystick {
    position: absolute;
    bottom: 100px;
    left: 40px;
    z-index: 150;
    pointer-events: auto;
}

.joystick.hidden {
    display: none;
}

.joystick-base {
    width: 140px;
    height: 140px;
    background: rgba(20, 18, 45, 0.8);
    border: 3px solid rgba(102, 126, 234, 0.5);
    border-radius: 50%;
    position: relative;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.joystick-base:active {
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.joystick-stick {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid rgba(102, 126, 234, 0.8);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    transition: transform 0.05s ease-out;
}

.joystick-stick::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.attack-button {
    position: absolute;
    bottom: 100px;
    right: 40px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    border: 3px solid rgba(245, 87, 108, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 150;
    pointer-events: auto;
    box-shadow: 0 0 30px rgba(245, 87, 108, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.attack-button.hidden {
    display: none;
}

.attack-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.attack-button:hover::before {
    opacity: 1;
}

.attack-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 40px rgba(245, 87, 108, 0.7);
}

.attack-button:active::before {
    opacity: 0.5;
}

.attack-icon {
    font-size: 42px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

/* ==================== 响应式设计 ==================== */
@media (pointer: coarse) {
    .joystick.hidden {
        display: block;
    }
    
    .attack-button.hidden {
        display: flex;
    }
}

@media (pointer: fine) {
    .joystick,
    .attack-button {
        display: none;
    }
}

@media (max-width: 768px) {
    .screen-content {
        padding: 35px 25px;
        max-width: 90%;
    }
    
    .game-title {
        font-size: 36px;
        gap: 8px;
    }
    
    .title-emoji {
        font-size: 40px;
    }
    
    .game-subtitle {
        font-size: 16px;
    }
    
    .hud {
        padding: 10px;
        flex-direction: column;
        gap: 10px;
    }
    
    .hud-section {
        width: 100%;
    }
    
    .hud-section.stats {
        flex-wrap: wrap;
    }
    
    .health-bar-container,
    .exp-bar-container {
        min-width: 100%;
    }
    
    .stat-item {
        padding: 8px 12px;
    }
    
    .stat-icon {
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 14px;
        min-width: 40px;
    }

    .weather-effect {
        font-size: 12px;
    }
    
    .upgrade-options {
        grid-template-columns: 1fr;
    }
    
    .joystick {
        bottom: 80px;
        left: 20px;
    }
    
    .joystick-base {
        width: 110px;
        height: 110px;
    }
    
    .joystick-stick {
        width: 50px;
        height: 50px;
    }
    
    .attack-button {
        bottom: 80px;
        right: 20px;
        width: 80px;
        height: 80px;
    }
    
    .attack-icon {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 22px;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .title-emoji {
        font-size: 28px;
    }

    .game-subtitle {
        font-size: 14px;
    }
    
    .controls-info {
        padding: 15px;
    }
    
    .controls-info h3 {
        font-size: 16px;
    }
    
    .controls-info p {
        font-size: 13px;
    }
    
    .game-button {
        padding: 14px 40px;
        font-size: 18px;
    }
    
    .screen-title {
        font-size: 28px;
    }
    
    .level-info {
        font-size: 16px;
    }
    
    .upgrade-option {
        padding: 20px 15px;
    }
    
    .upgrade-icon {
        font-size: 36px;
    }
    
    .upgrade-name {
        font-size: 16px;
    }
    
    .upgrade-bonus {
        font-size: 12px;
    }
    
    .stats-summary {
        padding: 20px;
    }
    
    .stat-summary-item {
        padding: 12px 15px;
    }
    
    .stat-summary-icon {
        font-size: 28px;
    }
    
    .stat-summary-label {
        font-size: 14px;
    }
    
    .stat-summary-value {
        font-size: 20px;
    }
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(20, 18, 45, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ==================== 选择文本样式 ==================== */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

/* ==================== 辅助功能 ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== 设置按钮 ==================== */
.settings-button {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    border: 2px solid rgba(102, 126, 234, 0.6);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
}

.settings-button:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    border-color: rgba(102, 126, 234, 0.8);
}

.settings-button:active {
    transform: rotate(90deg) scale(1.05);
}

/* ==================== 暂停按钮 ==================== */
.button-group {
    display: flex;
    gap: 10px;
}

.pause-button {
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.8) 0%, rgba(123, 237, 159, 0.8) 100%);
    border: 2px solid rgba(46, 213, 115, 0.6);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 213, 115, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
}

.pause-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.5);
    border-color: rgba(46, 213, 115, 0.8);
}

.pause-button:active {
    transform: scale(1.05);
}

/* ==================== 设置界面 ==================== */
.settings-screen .screen-content {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

/* 标签页导航 */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    padding-bottom: 15px;
}

.settings-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.settings-tab:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.settings-tab.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: rgba(102, 126, 234, 0.8);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.settings-tab .tab-icon {
    font-size: 18px;
}

.settings-tab .tab-text {
    letter-spacing: 0.5px;
}

/* 标签页内容 */
.settings-tab-content {
    display: none;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 10px;
    animation: fadeInTab 0.3s ease;
}

.settings-tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-tab-content::-webkit-scrollbar {
    width: 6px;
}

.settings-tab-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.settings-tab-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

/* 按键绑定按钮样式 */
.keybind-item .keybind-button {
    width: 120px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Segoe UI', sans-serif;
}

.keybind-item .keybind-button:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.8);
    transform: scale(1.05);
}

.keybind-item .keybind-button:active {
    transform: scale(0.98);
}

.keybind-item .keybind-button.listening {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.3) 0%, rgba(245, 87, 108, 0.3) 100%);
    border-color: rgba(245, 87, 108, 0.8);
    animation: pulseKeybind 1s ease infinite;
}

@keyframes pulseKeybind {
    0%, 100% {
        box-shadow: 0 0 10px rgba(245, 87, 108, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(245, 87, 108, 0.6);
    }
}

/* 移动端专属设置 */
.mobile-only {
    display: none;
}

@media (pointer: coarse) {
    .mobile-only {
        display: block;
    }
}

/* 质量设置禁用状态 */
.quality-setting:disabled,
.quality-setting.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.2);
}

.quality-setting.disabled option {
    color: var(--text-secondary);
}

.settings-container {
    max-height: 60vh;
    overflow-y: auto;
    margin: 20px 0;
    padding-right: 10px;
}

.settings-container::-webkit-scrollbar {
    width: 6px;
}

.settings-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.settings-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section-title {
    color: var(--accent-gold);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: left;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    letter-spacing: 1px;
}

.settings-options {
    margin: 30px 0;
}

.setting-item {
    margin: 12px 0;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-label:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateX(3px);
}

.setting-text {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.setting-toggle {
    appearance: none;
    width: 50px;
    height: 28px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.setting-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.setting-toggle:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(102, 126, 234, 0.6);
}

.setting-toggle:checked::before {
    left: 24px;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.setting-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.setting-input {
    width: 100px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.setting-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.setting-input:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

.settings-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.game-button.secondary {
    background: rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(102, 126, 234, 0.5);
}

.game-button.secondary:hover {
    background: rgba(102, 126, 234, 0.5);
    border-color: rgba(102, 126, 234, 0.7);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ==================== 暂停界面 ==================== */
.pause-screen .screen-title {
    background: linear-gradient(135deg, #2ed573 0%, #7bed9f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 15px rgba(46, 213, 115, 0.3));
}

.pause-status {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 35px;
    backdrop-filter: blur(10px);
}

.pause-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin: 8px 0;
    background: rgba(20, 18, 45, 0.8);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.pause-stat-item:hover {
    transform: translateX(10px);
    border-color: rgba(46, 213, 115, 0.5);
    box-shadow: 0 4px 15px rgba(46, 213, 115, 0.2);
}

.pause-stat-icon {
    font-size: 28px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.pause-stat-label {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pause-stat-value {
    color: var(--accent-gold);
    font-size: 24px;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    gap: 15px;
    width: 100%;
}

.pause-buttons .game-button {
    width: 100%;
}

.pause-buttons .game-button.primary {
    background: linear-gradient(135deg, #2ed573 0%, #7bed9f 100%);
    box-shadow: 0 8px 30px rgba(46, 213, 115, 0.4), 0 0 0 rgba(46, 213, 115, 0);
}

.pause-buttons .game-button.primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 40px rgba(46, 213, 115, 0.6), 0 0 30px rgba(46, 213, 115, 0.3);
}

.pause-buttons .game-button.primary:hover::before {
    left: 100%;
}

.pause-buttons .game-button.primary:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.5);
}

@media (max-width: 768px) {
    .pause-buttons .game-button {
        padding: 12px 30px;
        font-size: 16px;
    }

    .pause-status {
        padding: 20px;
    }

    .pause-stat-item {
        padding: 12px 15px;
    }

    .pause-stat-icon {
        font-size: 24px;
    }

    .pause-stat-label {
        font-size: 14px;
    }

    .pause-stat-value {
        font-size: 20px;
    }
}

/* ==================== 响应式优化 ==================== */
@media (max-width: 768px) {
    .settings-button {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .pause-button {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .settings-screen .screen-content {
        padding: 30px 20px;
        max-width: 95%;
        max-height: 95vh;
    }

    .settings-container {
        max-height: 50vh;
    }

    .settings-section-title {
        font-size: 16px;
    }

    .setting-label {
        padding: 10px 12px;
    }

    .setting-text {
        font-size: 13px;
    }

    .setting-toggle {
        width: 45px;
        height: 26px;
    }

    .setting-toggle::before {
        width: 18px;
        height: 18px;
    }

    .setting-toggle:checked::before {
        left: 21px;
    }

    .setting-input {
        width: 80px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .settings-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .game-button {
        width: 100%;
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* ==================== 技能系统样式 ==================== */

/* 升级界面中的技能选项 */
.skill-upgrade-section {
    margin-top: 30px;
}

.upgrade-section-title {
    color: var(--accent-gold);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 1px;
}

.skill-upgrade-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.skill-upgrade-option {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 15px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.skill-upgrade-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-upgrade-option:hover {
    border-color: rgba(102, 126, 234, 0.8);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.skill-upgrade-option:hover::before {
    opacity: 1;
}

.skill-upgrade-option:active {
    transform: translateY(-2px) scale(1.02);
}

.skill-upgrade-icon {
    font-size: 40px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.skill-upgrade-name {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.skill-upgrade-level {
    color: var(--accent-gold);
    font-size: 14px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.skill-description {
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.skill-stats {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-align: center;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.skill-upgrade-info {
    color: var(--accent-blue);
    font-size: 11px;
    text-align: center;
    margin-top: 5px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ==================== 技能栏（桌面端） ==================== */
.skill-bar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 150;
    pointer-events: auto;
}

.skill-bar.hidden {
    display: none;
}

.skill-slots {
    display: flex;
    gap: 12px;
    background: rgba(20, 18, 45, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 20px;
    padding: 12px 18px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.skill-slot {
    width: 70px;
    height: 70px;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.6);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-slot:hover {
    background: rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.skill-slot:active {
    transform: translateY(0);
}

.skill-slot-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.skill-slot-cooldown {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 10px 10px;
    transition: height 0.1s linear;
    overflow: hidden;
}

.skill-slot-cooldown-text {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

/* ==================== 移动端技能按钮 ==================== */
.mobile-skill-buttons {
    position: absolute;
    bottom: 100px;
    right: 160px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 150;
    pointer-events: auto;
}

.mobile-skill-buttons.hidden {
    display: none;
}

.mobile-skill-button {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    border: 3px solid rgba(102, 126, 234, 0.8);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.mobile-skill-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.7);
}

.mobile-skill-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.mobile-skill-cooldown {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 12px 12px;
    transition: height 0.1s linear;
    overflow: hidden;
}

.mobile-skill-cooldown-text {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

/* ==================== 响应式设计优化 ==================== */
@media (pointer: coarse) {
    .skill-bar.hidden {
        display: block;
    }
    
    .mobile-skill-buttons.hidden {
        display: flex;
    }
}

@media (pointer: fine) {
    .skill-bar {
        display: flex;
    }
    
    .mobile-skill-buttons {
        display: none;
    }
}

@media (max-width: 768px) {
    .skill-upgrade-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-bar {
        bottom: 20px;
    }

    .skill-slots {
        padding: 10px 14px;
        gap: 10px;
    }

    .skill-slot {
        width: 60px;
        height: 60px;
    }

    .skill-slot-icon {
        font-size: 28px;
    }

    .mobile-skill-buttons {
        bottom: 80px;
        right: 120px;
    }

    .mobile-skill-button {
        width: 55px;
        height: 55px;
    }

    .mobile-skill-icon {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .skill-upgrade-options {
        grid-template-columns: 1fr;
    }

    .skill-slots {
        padding: 8px 10px;
        gap: 8px;
    }

    .skill-slot {
        width: 50px;
        height: 50px;
    }

.skill-slot-icon {
        font-size: 24px;
    }
}

    .mobile-skill-buttons {
        bottom: 70px;
        right: 90px;
    }

    .mobile-skill-button {
        width: 50px;
        height: 50px;
    }

    .mobile-skill-icon {
        font-size: 22px;
    }
}

/* ==================== 图鉴界面样式 ==================== */
.button-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.bestiary-screen .screen-content {
    max-width: 1400px;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}

.bestiary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 25px;
    max-height: 65vh;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.monster-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    backdrop-filter: blur(10px);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.monster-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-gold);
}

.monster-card.locked {
    opacity: 0.5;
    filter: grayscale(0.8);
}

.monster-card-icon {
    font-size: 64px;
    margin-bottom: 10px;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    position: relative;
}

.monster-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.monster-card-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.monster-card-type {
    font-size: 12px;
    color: var(--text-secondary);
}

.monster-detail {
    display: none;
    padding: 20px;
}

.monster-detail.active {
    display: block;
}

.back-button {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--accent-gold);
    color: #000;
}

.monster-info {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.monster-preview {
    flex-shrink: 0;
    width: 220px;
    height: 220px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.monster-preview canvas {
    max-width: 100%;
    max-height: 100%;
}

.monster-details {
    flex: 1;
}

.monster-name {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.monster-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.monster-tag {
    background: var(--primary-gradient);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.monster-tag.elite {
    background: var(--gold-gradient);
}

.monster-description {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.monster-stats h4 {
    color: var(--accent-gold);
    font-size: 16px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 5px;
}

.stat-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 13px;
}

.stat-item .stat-label {
    color: var(--text-secondary);
    font-weight: bold;
}

.stat-item .stat-value {
    color: var(--accent-blue);
}

.stat-high {
    color: var(--accent-blue);
}

.stat-medium {
    color: var(--accent-gold);
}

.stat-low {
    color: var(--accent-red);
}

.bestiary-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    margin-top: 20px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .bestiary-screen .screen-content {
        max-width: 100vw;
        width: 100vw;
        padding: 0 10px;
    }

    .bestiary-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
        padding: 15px;
        max-height: 70vh;
    }

    .monster-card {
        padding: 12px;
        min-height: 160px;
    }

    .monster-card-icon {
        font-size: 48px;
    }

    .monster-card-name {
        font-size: 14px;
    }

    .monster-info {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .monster-preview {
        width: 160px;
        height: 160px;
    }

    .stat-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .bestiary-screen .screen-content {
        padding: 0 5px;
    }

    .bestiary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .monster-card {
        padding: 10px;
        min-height: 140px;
    }

    .monster-card-icon {
        font-size: 40px;
    }

    .monster-card-name {
        font-size: 12px;
    }

    .monster-card-type {
        font-size: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .bestiary-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (min-width: 1025px) and (max-width: 1400px) {
    .bestiary-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 1401px) {
    .bestiary-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* ==================== 成就界面 ==================== */
.achievement-screen .screen-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.achievement-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
}

.achievement-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.achievement-stat-icon {
    font-size: 28px;
}

.achievement-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.achievement-stat-divider {
    font-size: 20px;
    color: var(--text-secondary);
    margin: 0 5px;
}

.achievement-stat-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 成就类别筛选标签 */
.achievement-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.achievement-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.achievement-tab:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.achievement-tab.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: rgba(102, 126, 234, 0.8);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.achievement-tab .tab-icon {
    font-size: 16px;
}

.achievement-tab .tab-text {
    letter-spacing: 0.5px;
}

/* 成就网格 */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 10px;
    max-height: 60vh;
    overflow-y: auto;
}

.achievement-grid::-webkit-scrollbar {
    width: 6px;
}

.achievement-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.achievement-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

/* 成就卡片 */
.achievement-card {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.3) 0%, rgba(136, 136, 136, 0.3) 100%);
    border: 2px solid rgba(153, 153, 153, 0.4);
    border-radius: 15px;
    padding: 18px 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.3) 0%, rgba(136, 136, 136, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 102, 102, 0.3);
    border-color: rgba(153, 153, 153, 0.6);
}

.achievement-card:hover::before {
    opacity: 1;
}

.achievement-card:active {
    transform: translateY(-2px) scale(1.02);
}

/* 已获得的成就卡片 */
.achievement-card.unlocked {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    border-color: rgba(255, 215, 0, 0.6);
}

.achievement-card.unlocked::before {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 165, 0, 0.3) 100%);
}

.achievement-card.unlocked:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.8);
}

/* 成就卡片图标 */
.achievement-card-icon {
    font-size: 56px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.achievement-card:not(.unlocked) .achievement-card-icon {
    opacity: 0.3;
    filter: grayscale(100%) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.achievement-card.unlocked .achievement-card-icon {
    opacity: 1;
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.5));
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.achievement-card:hover .achievement-card-icon {
    transform: scale(1.15) rotate(5deg);
}

/* 成就卡片名称 */
.achievement-card-name {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.achievement-card:not(.unlocked) .achievement-card-name {
    opacity: 0.5;
}

.achievement-card.unlocked .achievement-card-name {
    opacity: 1;
    background: linear-gradient(135deg, #FFE259 0%, #FFA751 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 成就卡片难度标识 */
.achievement-card-tier {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    z-index: 1;
    opacity: 0.7;
}

.achievement-card:not(.unlocked) .achievement-card-tier {
    filter: grayscale(100%);
}

.achievement-card.unlocked .achievement-card-tier {
    filter: drop-shadow(0 0 5px currentColor);
}

/* 成就卡片类别标识 */
.achievement-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 14px;
    z-index: 1;
    opacity: 0.6;
}

/* 成就卡片进度 */
.achievement-card-progress {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.achievement-card-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

.achievement-card.unlocked .achievement-card-progress-bar {
    background: linear-gradient(90deg, #ffd700 0%, #ffa500 100%);
}

.achievement-card-progress-text {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

/* 成就详情面板 */
.achievement-detail {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 12, 41, 0.98);
    backdrop-filter: blur(20px);
    z-index: 10;
    padding: 20px;
}

.achievement-detail.active {
    display: block;
    animation: fadeInDetail 0.3s ease;
}

@keyframes fadeInDetail {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 10px;
    padding: 10px 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.back-button:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.8);
    transform: translateX(-5px);
}

.achievement-info {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.achievement-icon-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 150px;
}

.achievement-detail-icon {
    font-size: 100px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    animation: detailIconFloat 3s ease-in-out infinite;
}

@keyframes detailIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.achievement-detail-tier {
    font-size: 32px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
}

.achievement-details {
    flex: 1;
}

.achievement-name {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #FFE259 0%, #FFA751 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.achievement-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.achievement-description {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    border-left: 4px solid rgba(102, 126, 234, 0.5);
}

.achievement-progress-container {
    margin-bottom: 20px;
}

.achievement-progress-container h4 {
    color: var(--accent-gold);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: progressShimmer 2s ease infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-divider {
    color: var(--text-secondary);
    margin: 0 8px;
}

.achievement-unlock-time {
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
    padding: 10px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.achievement-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    margin-top: 20px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.achievement-buttons .game-button {
    pointer-events: auto;
}

/* 成就解锁动画 */
.achievement-card.just-unlocked {
    animation: unlockGlow 1s ease;
}

@keyframes unlockGlow {
    0% {
        box-shadow: 0 0 0 rgba(255, 215, 0, 0);
    }
    50% {
        box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 0 rgba(255, 215, 0, 0);
        transform: scale(1);
    }
}

/* 成就界面移动端适配 */
@media (max-width: 768px) {
    .achievement-screen .screen-content {
        max-width: 100vw;
        width: 100vw;
        padding: 0 10px;
    }

    .achievement-stats {
        padding: 10px;
    }

    .achievement-stat-icon {
        font-size: 24px;
    }

    .achievement-stat-value {
        font-size: 20px;
    }

    .achievement-tabs {
        gap: 6px;
    }

    .achievement-tab {
        padding: 6px 10px;
        font-size: 12px;
    }

    .achievement-tab .tab-icon {
        font-size: 14px;
    }

    .achievement-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 10px;
        max-height: 65vh;
    }

    .achievement-card {
        padding: 12px 10px;
        min-height: 170px;
    }

    .achievement-card-icon {
        font-size: 48px;
    }

    .achievement-card-name {
        font-size: 14px;
    }

    .achievement-card-tier {
        font-size: 14px;
    }

    .achievement-info {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .achievement-icon-display {
        min-width: auto;
    }

    .achievement-detail-icon {
        font-size: 80px;
    }

    .achievement-detail-tier {
        font-size: 24px;
    }

    .achievement-name {
        font-size: 24px;
    }

    .achievement-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .achievement-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .achievement-card {
        padding: 10px 8px;
        min-height: 150px;
    }

    .achievement-card-icon {
        font-size: 40px;
    }

    .achievement-card-name {
        font-size: 12px;
    }

    .achievement-card-tier {
        font-size: 12px;
    }
}

/* ==================== 角色选择界面 ==================== */
.character-select-screen .screen-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    max-width: 1400px;
    width: 95vw;
}

.character-select-screen .screen-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 15px rgba(102, 126, 234, 0.3));
}

.character-select-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.character-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-card:hover {
    border-color: rgba(102, 126, 234, 0.8);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.character-card:hover::before {
    opacity: 1;
}

.character-card:active {
    transform: translateY(-2px);
}

.character-card.selected {
    border-color: var(--accent-gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 10px 30px rgba(102, 126, 234, 0.3);
}

.character-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 20px;
    color: var(--accent-gold);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.character-icon {
    font-size: 56px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    transition: transform 0.3s ease;
}

.character-card:hover .character-icon {
    transform: scale(1.1);
}

.character-name {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.character-description {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    line-height: 1.4;
    text-align: center;
}

.character-stats {
    background: rgba(20, 18, 45, 0.6);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 10px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.character-stats-title {
    color: var(--accent-gold);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: left;
    letter-spacing: 0.5px;
}

.character-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 10px;
}

.character-stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.character-stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.character-ability {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2) 0%, rgba(245, 87, 108, 0.2) 100%);
    border: 1px solid rgba(240, 147, 251, 0.4);
    border-radius: 10px;
    padding: 8px;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-top: 2px;
}

.character-ability-title {
    color: var(--accent-gold);
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.character-ability-description {
    color: var(--text-primary);
    font-size: 9px;
    line-height: 1.3;
    font-weight: 500;
}

/* 角色特定颜色 */
.character-card[data-character="melee"] {
    border-color: rgba(255, 215, 0, 0.4);
}

.character-card[data-character="melee"]:hover {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.character-card[data-character="ranged"] {
    border-color: rgba(0, 191, 255, 0.4);
}

.character-card[data-character="ranged"]:hover {
    border-color: rgba(0, 191, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.3);
}

.character-card[data-character="tank"] {
    border-color: rgba(50, 205, 50, 0.4);
}

.character-card[data-character="tank"]:hover {
    border-color: rgba(50, 205, 50, 0.8);
    box-shadow: 0 10px 30px rgba(50, 205, 50, 0.3);
}

.character-card[data-character="mage"] {
    border-color: rgba(255, 105, 180, 0.4);
}

.character-card[data-character="mage"]:hover {
    border-color: rgba(255, 105, 180, 0.8);
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .character-select-screen .screen-content {
        max-width: 90%;
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .character-select-screen .screen-content {
        max-height: 95vh;
        padding: 20px;
    }

    .character-select-screen .screen-title {
        font-size: 28px;
    }

    .character-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .character-card {
        padding: 20px 15px;
    }

    .character-icon {
        font-size: 48px;
    }

    .character-name {
        font-size: 18px;
    }

    .character-description {
        font-size: 12px;
    }

    .character-select-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .character-select-screen .screen-content {
        padding: 15px;
    }

    .character-select-screen .screen-title {
        font-size: 24px;
    }

    .character-grid {
        gap: 10px;
    }

    .character-icon {
        font-size: 40px;
    }

    .character-name {
        font-size: 16px;
    }

    .character-description {
        font-size: 11px;
    }

    .character-stats {
        padding: 10px;
    }

    .character-stats-title {
        font-size: 11px;
    }

    .character-stat-item {
        font-size: 10px;
    }

    .character-ability {
        padding: 8px;
    }

    .character-ability-title {
        font-size: 10px;
    }

    .character-ability-description {
        font-size: 9px;
    }

    .character-select-subtitle {
        font-size: 13px;
    }

/* ==================== 成就解锁通知 ==================== */
.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 1000;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-notification.show {
    transform: translate(-50%, -50%) scale(1);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    border: 3px solid rgba(255, 215, 0, 0.8);
    border-radius: 20px;
    padding: 25px 40px;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.6), 0 0 100px rgba(102, 126, 234, 0.4);
    backdrop-filter: blur(20px);
    animation: notificationPulse 0.5s ease;
}

@keyframes notificationPulse {
    0% {
        box-shadow: 0 0 60px rgba(255, 215, 0, 0.6), 0 0 100px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 80px rgba(255, 215, 0, 0.8), 0 0 120px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 0 60px rgba(255, 215, 0, 0.6), 0 0 100px rgba(102, 126, 234, 0.4);
    }
}

.notification-icon {
    font-size: 64px;
    animation: iconSpin 0.5s ease;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}

@keyframes iconSpin {
    0% {
        transform: rotate(-180deg) scale(0);
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 1px;
}

.notification-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, #FFE259 0%, #FFA751 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

/* 成就通知粒子特效 */
.notification-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.3), transparent, rgba(102, 126, 234, 0.3), transparent);
    animation: notificationRotate 3s linear infinite;
    z-index: -1;
}

@keyframes notificationRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .notification-content {
        padding: 20px 30px;
    }

    .notification-icon {
        font-size: 48px;
    }

    .notification-title {
        font-size: 16px;
    }

    .notification-name {
        font-size: 18px;
    }
}

/* ==================== 确认弹窗 ==================== */
.confirm-dialog {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 9999 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.confirm-dialog.hidden {
    display: none !important;
}

.confirm-dialog:not(.hidden) {
    display: flex !important;
}

.confirm-dialog-content {
    background: linear-gradient(135deg, rgba(20, 18, 45, 0.98) 0%, rgba(15, 12, 35, 0.98) 100%);
    border: 2px solid rgba(255, 71, 87, 0.5);
    border-radius: 20px;
    padding: 40px 50px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(255, 71, 87, 0.2);
    animation: dialogAppear 0.3s ease;
}

@keyframes dialogAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirm-dialog-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-red);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

.confirm-dialog-message {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.confirm-dialog-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ==================== 危险按钮样式 ==================== */
.game-button.danger {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    border: 2px solid rgba(255, 71, 87, 0.6);
    box-shadow: 0 8px 30px rgba(255, 71, 87, 0.4), 0 0 0 rgba(255, 71, 87, 0);
    color: #fff !important;
}

.game-button.danger:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 71, 87, 0.6), 0 0 30px rgba(255, 71, 87, 0.3);
    background: linear-gradient(135deg, #ff2e3e 0%, #ff556b 100%);
}

.game-button.danger:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .confirm-dialog-content {
        padding: 30px 25px;
        max-width: 85%;
    }

    .confirm-dialog-title {
        font-size: 20px;
    }

    .confirm-dialog-message {
        font-size: 14px;
    }

    .confirm-dialog-buttons {
        flex-direction: column;
    }

    .game-button.danger {
        width: 100%;
    }
}

/* ==================== 成就通知样式 ==================== */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    animation: slideInRight 0.5s ease;
}

.achievement-notification.hidden {
    display: none;
    animation: none;
}

.achievement-notification-content {
    background: linear-gradient(135deg, rgba(20, 18, 45, 0.95) 0%, rgba(15, 12, 35, 0.95) 100%);
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 15px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
    min-width: 300px;
    max-width: 400px;
}

.achievement-notification-icon {
    font-size: 40px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    animation: bounce 1s ease infinite;
}

.achievement-notification-text {
    flex: 1;
}

.achievement-notification-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 5px;
}

.achievement-notification-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .achievement-notification {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .achievement-notification-content {
        padding: 15px 20px;
        min-width: auto;
    }

    .achievement-notification-icon {
        font-size: 32px;
    }

    .achievement-notification-title {
        font-size: 14px;
    }

    .achievement-notification-name {
        font-size: 12px;
    }
}