/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    background: #000;
    color: #fff;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.screen.overlay {
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
}

/* 启动画面 */
#startScreen {
    background: linear-gradient(180deg, #001233 0%, #001845 50%, #000 100%);
    position: relative;
    overflow: hidden;
}

.bg-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #fff, transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 160px 30px, #fff, transparent);
    background-size: 200px 200px;
    background-repeat: repeat;
    animation: starScroll 60s linear infinite;
    opacity: 0.6;
}

@keyframes starScroll {
    from { background-position: 0 0; }
    to { background-position: -200px 600px; }
}

.title-container {
    text-align: center;
    z-index: 10;
    margin-bottom: 40px;
}

.game-title {
    font-size: 96px;
    font-weight: 900;
    letter-spacing: 12px;
    background: linear-gradient(180deg, #fff 0%, #4dabf7 50%, #1971c2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(77, 171, 247, 0.5);
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.game-subtitle {
    font-size: 24px;
    letter-spacing: 8px;
    color: #4dabf7;
    margin-top: 10px;
}

.game-desc {
    font-size: 18px;
    color: #aaa;
    margin-top: 16px;
    letter-spacing: 4px;
}

.menu {
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4dabf7;
    color: #fff;
    padding: 12px 40px;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
    min-width: 200px;
    font-family: inherit;
}

.btn:hover {
    background: rgba(77, 171, 247, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(77, 171, 247, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #1971c2, #4dabf7);
    border-color: #74c0fc;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1864ab, #339af0);
}

.btn-sound {
    background: rgba(255, 255, 255, 0.05);
    border-color: #888;
    color: #ccc;
    font-size: 16px;
    padding: 10px 30px;
    min-width: 180px;
}

.btn-sound:hover {
    border-color: #4dabf7;
    color: #fff;
}

.level-select {
    margin-top: 30px;
    text-align: center;
}

.level-select h3 {
    margin-bottom: 16px;
    color: #aaa;
    font-weight: normal;
    letter-spacing: 4px;
}

.level-buttons {
    display: flex;
    gap: 16px;
}

.btn-level {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #555;
    color: #fff;
    padding: 16px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1.6;
    font-family: inherit;
}

.btn-level:hover {
    border-color: #4dabf7;
    background: rgba(77, 171, 247, 0.2);
    transform: scale(1.05);
}

.btn-level span {
    color: #888;
    font-size: 12px;
    letter-spacing: 2px;
}

.highscore-box {
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ffd43b;
    border-radius: 6px;
    padding: 16px 24px;
    min-width: 400px;
    max-width: 500px;
    text-align: left;
}

/* 颜色选择器 */
.color-picker {
    margin: 16px 0;
    text-align: center;
}

.color-picker h3 {
    color: #aaa;
    font-weight: normal;
    letter-spacing: 4px;
    margin-bottom: 12px;
    font-size: 14px;
}

.color-options {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #555;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: #fff;
}

.color-option.active {
    border-color: #ffd43b;
    box-shadow: 0 0 12px rgba(255, 212, 59, 0.6);
    transform: scale(1.1);
}

.highscore-box h3 {
    text-align: center;
    color: #ffd43b;
    margin-bottom: 12px;
    letter-spacing: 3px;
    font-size: 16px;
}

#highscoreList {
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #fff;
}

.highscore-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    border-bottom: 1px dashed rgba(255, 212, 59, 0.2);
}

.highscore-item:last-child {
    border-bottom: none;
}

.highscore-item .rank {
    color: #ffd43b;
    width: 30px;
}

.highscore-item .name {
    color: #4dabf7;
}

.highscore-item .score {
    color: #51cf66;
    font-weight: bold;
}

.highscore-item .date {
    color: #888;
    font-size: 12px;
}

.instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 18, 51, 0.95);
    border: 1px solid #4dabf7;
    border-radius: 8px;
    padding: 40px;
    z-index: 20;
    min-width: 500px;
}

.instructions h3 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 24px;
    color: #4dabf7;
}

.instructions ul {
    list-style: none;
    line-height: 2;
}

.instructions b {
    color: #ffd43b;
    background: rgba(255, 212, 59, 0.1);
    padding: 2px 8px;
    border-radius: 3px;
}

/* 游戏主界面 */
#gameScreen {
    background: #000;
    cursor: crosshair;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* HUD */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    font-family: 'Consolas', 'Courier New', monospace;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
}

.hud-left, .hud-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hud-right {
    text-align: right;
}

.hud-item {
    font-size: 18px;
    color: #fff;
    text-shadow: 0 0 4px rgba(77, 171, 247, 0.8), 0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 4px;
    border-left: 2px solid #4dabf7;
}

.hud-right .hud-item {
    border-left: none;
    border-right: 2px solid #ffd43b;
}

.hud-item span {
    color: #ffd43b;
    font-weight: bold;
}

.hud-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-message {
    font-size: 36px;
    color: #ff6b6b;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
    opacity: 0;
    transition: opacity 0.5s;
    letter-spacing: 4px;
    font-weight: bold;
}

.hud-message.show {
    opacity: 1;
    animation: messagePulse 0.5s ease-out;
}

@keyframes messagePulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.hud-bottom {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 500px;
}

.health-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #4dabf7;
    border-radius: 6px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffd43b 50%, #51cf66 100%);
    width: 100%;
    transition: width 0.3s;
}

.boss-hp {
    margin-top: 16px;
    text-align: center;
}

.boss-name {
    color: #ff6b6b;
    font-weight: bold;
    letter-spacing: 4px;
    margin-bottom: 6px;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
}

.boss-bar {
    border-color: #ff6b6b;
    height: 16px;
}

.boss-fill {
    background: linear-gradient(90deg, #c92a2a, #ff6b6b);
    transition: width 0.3s;
}

.powerup-indicators {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 12px;
    height: 24px;
}

.powerup-icon {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 14px;
    color: #fff;
    font-family: 'Consolas', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
}

.powerup-icon.damage {
    border-color: #ffd43b;
    color: #ffd43b;
}

.powerup-icon.shield {
    border-color: #4dabf7;
    color: #4dabf7;
}

/* 准星 */
.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 5;
    opacity: 0.5;
}

.crosshair::before,
.crosshair::after {
    content: '';
    position: absolute;
    background: #ff6b6b;
}

.crosshair::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.crosshair::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

/* 暂停与结束面板 */
.panel {
    background: rgba(0, 18, 51, 0.95);
    border: 1px solid #4dabf7;
    border-radius: 8px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 0 40px rgba(77, 171, 247, 0.3);
    min-width: 400px;
}

.panel h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #4dabf7;
    letter-spacing: 6px;
}

.end-stats {
    margin: 20px 0 30px;
    line-height: 2;
    font-size: 18px;
}

.end-stats span {
    color: #ffd43b;
    font-weight: bold;
    font-size: 22px;
    margin-left: 10px;
}

.panel .btn {
    display: block;
    margin: 10px auto;
    min-width: 220px;
}

/* 受伤效果 */
.damage-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(255, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 8;
    opacity: 0;
}

.damage-flash.flash {
    animation: damageFlash 0.3s ease-out;
}

@keyframes damageFlash {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* 屏幕震动 */
.shake {
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-8px, 4px); }
    40% { transform: translate(6px, -6px); }
    60% { transform: translate(-4px, 6px); }
    80% { transform: translate(4px, -2px); }
}

/* 触屏控制 */
.touch-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9;
}

.touch-pad {
    position: absolute;
    bottom: 80px;
    left: 30px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.touch-row {
    display: flex;
    gap: 50px;
}

.touch-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(77, 171, 247, 0.6);
    color: #fff;
    font-size: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    font-family: inherit;
}

.touch-btn:active {
    background: rgba(77, 171, 247, 0.4);
    transform: scale(0.95);
}

.touch-btn.touch-fire {
    position: absolute;
    bottom: 100px;
    right: 30px;
    width: 90px;
    height: 90px;
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.8);
    font-size: 16px;
    border-radius: 50%;
    pointer-events: auto;
}

.touch-btn.touch-pause {
    position: absolute;
    top: 80px;
    right: 30px;
    width: 50px;
    height: 50px;
    font-size: 22px;
    pointer-events: auto;
}

@media (max-width: 768px), (pointer: coarse) {
    .touch-controls { display: block !important; }
    .hud-item { font-size: 14px; }
}

/* 伤害数字 */
.damage-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
    overflow: hidden;
}

.damage-number {
    position: absolute;
    font-family: 'Consolas', monospace;
    font-weight: bold;
    font-size: 24px;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 1px;
}

.damage-number.critical {
    font-size: 32px;
    animation: criticalPulse 0.3s ease-out;
}

@keyframes criticalPulse {
    0% { transform: translate(-50%, -50%) scale(0.5); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* 新纪录横幅 */
.new-record-banner {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    pointer-events: none;
}

.new-record-text {
    font-size: 72px;
    font-weight: 900;
    background: linear-gradient(180deg, #ffd43b 0%, #ff922b 50%, #fa5252 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(255, 212, 59, 0.6);
    letter-spacing: 8px;
    animation: newRecordAnim 1.5s ease-out;
    white-space: nowrap;
}

@keyframes newRecordAnim {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }
    30% {
        transform: scale(1.3) rotate(10deg);
        opacity: 1;
    }
    50% {
        transform: scale(1) rotate(-5deg);
    }
    70% {
        transform: scale(1.05) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 音量控制 */
.volume-controls {
    margin-top: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
}

.vol-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    color: #fff;
}

.vol-row label {
    width: 100px;
    text-align: right;
    font-size: 14px;
    color: #4dabf7;
}

.vol-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.vol-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #4dabf7;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

.vol-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4dabf7;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

.vol-row span {
    width: 50px;
    color: #ffd43b;
    font-family: 'Consolas', monospace;
    font-size: 14px;
}

/* 成就列表 */
.ach-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ach-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border-left: 3px solid #555;
    transition: all 0.2s;
}

.ach-row.unlocked {
    border-left-color: #ffd43b;
    background: rgba(255, 212, 59, 0.1);
}

.ach-row .ach-icon {
    font-size: 18px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.ach-row.unlocked .ach-icon {
    opacity: 1;
}

.ach-row .ach-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ach-row .ach-info .name {
    font-size: 13px;
    color: #888;
    font-weight: bold;
}

.ach-row.unlocked .ach-info .name {
    color: #ffd43b;
}

.ach-row .ach-info .desc {
    font-size: 11px;
    color: #666;
}

.ach-row .ach-date {
    font-size: 10px;
    color: #888;
    font-family: monospace;
}

/* 难度选择器 */
.difficulty-picker {
    margin: 16px 0;
    text-align: center;
}

.difficulty-picker h3 {
    color: #aaa;
    font-weight: normal;
    letter-spacing: 4px;
    margin-bottom: 12px;
    font-size: 14px;
}

.difficulty-options {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.diff-option {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #555;
    border-radius: 8px;
    padding: 12px 18px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    min-width: 100px;
}

.diff-option:hover {
    border-color: #4dabf7;
    background: rgba(77, 171, 247, 0.2);
    transform: translateY(-2px);
}

.diff-option.active {
    border-color: #ffd43b;
    background: rgba(255, 212, 59, 0.15);
    box-shadow: 0 0 12px rgba(255, 212, 59, 0.4);
}

.diff-icon {
    font-size: 32px;
    margin-bottom: 4px;
}

.diff-name {
    font-size: 16px;
    font-weight: bold;
    color: #4dabf7;
    margin-bottom: 4px;
    letter-spacing: 2px;
}

.diff-option.active .diff-name {
    color: #ffd43b;
}

.diff-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
}

/* 关于页面 */
.about-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 18, 51, 0.98);
    border: 2px solid #4dabf7;
    border-radius: 12px;
    padding: 40px 50px;
    width: 500px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 150;
    box-shadow: 0 0 60px rgba(77, 171, 247, 0.3);
}

.about-panel h2 {
    color: #4dabf7;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 4px;
}

.about-content {
    text-align: left;
    color: #fff;
}

.about-content h3 {
    text-align: center;
    font-size: 28px;
    color: #ffd43b;
    margin-bottom: 8px;
    letter-spacing: 4px;
}

.about-tagline {
    text-align: center;
    color: #aaa;
    font-size: 14px;
    margin-bottom: 4px;
}

.about-version {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-bottom: 24px;
}

.about-section {
    margin: 20px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-left: 3px solid #4dabf7;
}

.about-section h4 {
    color: #4dabf7;
    margin-bottom: 8px;
    letter-spacing: 2px;
    font-size: 14px;
}

.about-section ul {
    list-style: none;
    line-height: 1.8;
}

.about-section li {
    padding-left: 16px;
    position: relative;
    font-size: 14px;
    color: #ddd;
}

.about-section li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #4dabf7;
}

.about-section p {
    font-size: 14px;
    color: #ddd;
}

.about-section p span {
    color: #ffd43b;
    font-weight: bold;
}

.about-footer {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-top: 20px;
    letter-spacing: 1px;
}

/* 最终通关页面 */
.final-panel {
    position: relative;
    z-index: 10;
    background: linear-gradient(135deg, rgba(0, 18, 51, 0.98), rgba(30, 60, 120, 0.98));
    border: 3px solid #ffd43b;
    border-radius: 16px;
    padding: 50px 60px;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 0 100px rgba(255, 212, 59, 0.5);
    animation: finalPanelEntry 1s ease-out;
}

@keyframes finalPanelEntry {
    0% { transform: scale(0) rotate(180deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.final-title {
    margin-bottom: 30px;
}

.crown {
    font-size: 80px;
    animation: crownBounce 1s ease-out, crownGlow 2s ease-in-out infinite 1s;
    display: inline-block;
}

@keyframes crownBounce {
    0% { transform: translateY(-200px) scale(0); }
    50% { transform: translateY(20px) scale(1.2); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes crownGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 212, 59, 0.5)); }
    50% { filter: drop-shadow(0 0 30px rgba(255, 212, 59, 1)); }
}

.final-title h1 {
    font-size: 56px;
    color: #ffd43b;
    letter-spacing: 8px;
    margin: 16px 0 8px;
    text-shadow: 0 0 30px rgba(255, 212, 59, 0.6);
}

.final-title h2 {
    font-size: 20px;
    color: #4dabf7;
    letter-spacing: 6px;
    font-weight: normal;
}

.final-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.final-stat {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #4dabf7;
    border-radius: 8px;
    padding: 20px 10px;
}

.final-stat .stat-label {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.final-stat .stat-value {
    font-size: 32px;
    color: #51cf66;
    font-weight: bold;
    font-family: 'Consolas', monospace;
}

.final-message {
    color: #fff;
    font-size: 18px;
    line-height: 1.6;
    margin: 24px 0;
    letter-spacing: 2px;
}

/* 烟花 */
.fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.firework-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: firework 1.5s ease-out forwards;
}

@keyframes firework {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx), var(--dy)) scale(0);
        opacity: 0;
    }
}

/* 教程覆盖层 */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-out;
}

.tutorial-step {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 18, 51, 0.98), rgba(0, 30, 80, 0.98));
    border: 2px solid #4dabf7;
    border-radius: 12px;
    padding: 40px 50px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 0 60px rgba(77, 171, 247, 0.4);
    animation: tutorialPop 0.5s ease-out;
}

@keyframes tutorialPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

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

.tutorial-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: iconFloat 2s ease-in-out infinite;
}

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

.tutorial-step h2 {
    font-size: 32px;
    color: #4dabf7;
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.tutorial-step p {
    font-size: 18px;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 24px;
    min-height: 56px;
}

.tutorial-progress {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.tutorial-progress .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #4dabf7;
    transition: all 0.3s;
}

.tutorial-progress .dot.active {
    background: #4dabf7;
    box-shadow: 0 0 8px rgba(77, 171, 247, 0.8);
    transform: scale(1.2);
}

.tutorial-skip {
    display: block;
    margin-top: 16px;
    color: #888;
    font-size: 14px;
    cursor: pointer;
}

.tutorial-skip input {
    margin-right: 6px;
    vertical-align: middle;
}

/* 成就通知 */
.achievement-notification {
    position: fixed;
    top: 80px;
    right: -400px;
    width: 360px;
    background: linear-gradient(135deg, rgba(255, 212, 59, 0.95), rgba(250, 176, 5, 0.95));
    border: 2px solid #ffd43b;
    border-radius: 8px;
    padding: 16px 20px;
    z-index: 600;
    box-shadow: 0 4px 30px rgba(255, 212, 59, 0.5);
    transition: right 0.5s ease-out;
    pointer-events: none;
}

.achievement-notification.show {
    right: 20px;
}

.achievement-notification .ach-title {
    font-size: 12px;
    color: #5a3500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.achievement-notification .ach-name {
    font-size: 22px;
    color: #5a3500;
    font-weight: bold;
    margin: 4px 0;
}

.achievement-notification .ach-desc {
    font-size: 14px;
    color: #5a3500;
}
