* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #7986CB 0%, #3F51B5 100%);
            min-height: 100vh;
            color: #fff;
            overflow-x: hidden;
            user-select: none;
        }

        .game-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .game-header {
            text-align: center;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .game-header h1 {
            font-size: 2.5rem;
            font-weight: 300;
            margin-bottom: 10px;
            letter-spacing: 3px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        .game-subtitle {
            font-size: 1rem;
            opacity: 0.8;
            letter-spacing: 1px;
        }

        .game-interface {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 20px;
        }

        .game-board-container {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        #gameCanvas {
            background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
            border-radius: 15px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            cursor: crosshair;
            display: block;
            margin: 0 auto;
        }

        .control-panel {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .game-stats {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .game-stats h3 {
            text-align: center;
            margin-bottom: 15px;
            font-weight: 300;
            font-size: 1.2rem;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .stat-item {
            text-align: center;
            padding: 10px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
        }

        .stat-value {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 5px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .stat-label {
            font-size: 0.8rem;
            opacity: 0.8;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .tower-shop {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .tower-shop h3 {
            text-align: center;
            margin-bottom: 15px;
            font-weight: 300;
            font-size: 1.2rem;
        }

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

        .tower-btn {
            padding: 15px 10px;
            border: none;
            border-radius: 15px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            border: 2px solid transparent;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
        }

        .tower-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }

        .tower-btn.selected {
            background: rgba(76, 175, 80, 0.3);
            border-color: rgba(76, 175, 80, 0.5);
        }

        .tower-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .tower-icon {
            font-size: 1.5rem;
            margin-bottom: 5px;
        }

        .tower-name {
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .tower-cost {
            font-size: 0.7rem;
            opacity: 0.8;
        }

        .wave-info {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .wave-info h3 {
            text-align: center;
            margin-bottom: 15px;
            font-weight: 300;
            font-size: 1.2rem;
        }

        .wave-progress {
            margin-bottom: 15px;
        }

        .progress-bar {
            width: 100%;
            height: 10px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 5px;
            overflow: hidden;
            margin-bottom: 10px;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #F44336, #FF9800);
            border-radius: 5px;
            transition: width 0.3s ease;
            width: 0;
        }

        .wave-text {
            text-align: center;
            font-size: 0.9rem;
            opacity: 0.9;
        }

        .game-controls {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

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

        .btn {
            padding: 12px 20px;
            border: none;
            border-radius: 25px;
            background: #303F9F;
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            box-shadow: 0 4px 15px rgba(48, 63, 159, 0.3);
        }

        .btn:hover {
            background: #283593;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(48, 63, 159, 0.4);
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .btn.start-btn {
            background: #4CAF50;
            box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
        }

        .btn.start-btn:hover {
            background: #43A047;
        }

        .btn.danger {
            background: #F44336;
            box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
        }

        .btn.danger:hover {
            background: #E53935;
        }

        .btn.secondary {
            background: rgba(255, 255, 255, 0.2);
            box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
        }

        .btn.secondary:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        /* 弹窗样式 */
        .popup {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .popup.show {
            display: flex;
        }

        .popup-content {
            background: linear-gradient(135deg, #7986CB 0%, #3F51B5 100%);
            border-radius: 25px;
            padding: 40px;
            text-align: center;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.2);
            max-height: 80vh;
            overflow-y: auto;
        }

        .popup-content h2 {
            font-size: 2rem;
            margin-bottom: 25px;
            font-weight: 300;
        }

        .final-stats {
            display: grid;
            gap: 15px;
            margin-bottom: 25px;
        }

        .stat-display {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
        }

        .stat-icon {
            font-size: 2rem;
            width: 50px;
            text-align: center;
        }

        .popup-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .game-container {
                padding: 15px;
                gap: 15px;
            }
            
            .game-header h1 {
                font-size: 2rem;
            }
            
            .game-interface {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            #gameCanvas {
                width: 100% !important;
                height: 300px !important;
            }
            
            .control-panel {
                order: -1;
            }
            
            .stats-grid {
                grid-template-columns: repeat(4, 1fr);
            }
            
            .tower-grid {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        @media (max-width: 480px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .tower-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }