* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0c0e2a, #1a1b3a);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 20px;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 95vh;
    gap: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 22, 55, 0.8);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 120, 255, 0.2);
}

.game-header h1 {
    font-size: 28px;
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-selector {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 10px 20px;
    background: rgba(30, 33, 75, 0.8);
    border: 2px solid rgba(100, 120, 255, 0.3);
    color: #a0a8ff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.control-btn.active {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border-color: #4cc9f0;
    color: white;
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
}

.game-main {
    display: flex;
    flex: 1;
    gap: 20px;
}

.game-info {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-level, .game-instructions, .upcoming-levels {
    background: rgba(20, 22, 55, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 120, 255, 0.2);
}

.player-level h3, .game-instructions h3, .upcoming-levels h3 {
    color: #4cc9f0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
}

.level-name {
    font-size: 28px;
    font-weight: 800;
    color: #f72585;
    text-align: center;
    margin: 10px 0 20px;
    text-shadow: 0 0 10px rgba(247, 37, 133, 0.5);
}

.level-progress {
    background: rgba(30, 33, 75, 0.8);
    height: 25px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f72585, #4361ee);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 12px;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.level-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(100, 120, 255, 0.2);
}

.stat:last-child {
    border-bottom: none;
}

.game-instructions p {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #c0c8ff;
}

.key {
    display: inline-block;
    background: rgba(67, 97, 238, 0.3);
    padding: 2px 8px;
    border-radius: 5px;
    font-family: monospace;
    font-weight: bold;
    color: #4cc9f0;
    border: 1px solid #4361ee;
}

.next-level {
    padding: 10px;
    background: rgba(30, 33, 75, 0.8);
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #f72585;
    color: #c0c8ff;
}

.next-level:first-child {
    border-left-color: #4cc9f0;
}

.game-canvas-container {
    flex: 1;
    position: relative;
    background: rgba(10, 12, 35, 0.9);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(100, 120, 255, 0.2);
}

#game-canvas {
    display: block;
    background: #0a0c23;
    width: 100%;
    height: 100%;
}

.touch-controls {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    display: none;
}

.joystick-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.joystick-base {
    width: 120px;
    height: 120px;
    background: rgba(30, 33, 75, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(76, 201, 240, 0.5);
    box-shadow: 0 0 20px rgba(76, 201, 240, 0.3);
}

.joystick-thumb {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #4cc9f0;
}

.joystick-label {
    margin-top: 10px;
    color: #c0c8ff;
    font-size: 14px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
    transition: all 0.3s;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.6);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 35, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay-content {
    text-align: center;
    background: rgba(20, 22, 55, 0.95);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    border: 2px solid rgba(76, 201, 240, 0.5);
    box-shadow: 0 0 40px rgba(76, 201, 240, 0.3);
}

.overlay-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #4cc9f0;
}

.overlay-content p {
    font-size: 18px;
    color: #c0c8ff;
    margin-bottom: 30px;
    line-height: 1.6;
}

.start-btn, .continue-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #f72585, #4361ee);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(247, 37, 133, 0.4);
}

.start-btn:hover, .continue-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(247, 37, 133, 0.6);
}

.game-footer {
    background: rgba(20, 22, 55, 0.8);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 120, 255, 0.2);
}

.level-evolution h3 {
    color: #4cc9f0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
}

.evolution-path {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
}

.evolution-stage {
    padding: 10px 15px;
    background: rgba(30, 33, 75, 0.8);
    border-radius: 8px;
    white-space: nowrap;
    color: #c0c8ff;
    border: 1px solid rgba(100, 120, 255, 0.3);
    font-size: 14px;
}

.evolution-stage.current {
    background: linear-gradient(135deg, #f72585, #3a0ca3);
    color: white;
    border-color: #4cc9f0;
    box-shadow: 0 0 10px rgba(247, 37, 133, 0.5);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .game-main {
        flex-direction: column;
    }
    
    .game-info {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .player-level, .game-instructions, .upcoming-levels {
        flex: 1;
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-info {
        flex-direction: column;
    }
    
    .evolution-path {
        flex-wrap: wrap;
        justify-content: center;
    }
}