/* styles/game.css */
/* 全局样式 */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background: #f0f0f0;
    font-family: 'Arial', sans-serif;
    touch-action: manipulation;
}

/* 游戏主容器 */
.game-container {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 8px 8px 16px #d1d1d1, 
               -8px -8px 16px #ffffff;
}

/* 头部区域 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

#scoreDisplay {
    font-size: 1.5em;
    background: linear-gradient(145deg, #e0e0e0, #ffffff);
    padding: 8px 25px;
    border-radius: 30px;
    box-shadow: 5px 5px 10px #d1d1d1,
               -5px -5px 10px #ffffff;
}

/* 画布样式 */
#gameCanvas {
    border: 3px solid #4CAF50;
    border-radius: 10px;
    background: #ffffff;
    margin: 10px 0;
    transition: all 0.3s;
}

/* 控制面板 */
.control-panel {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

#startBtn, #pauseBtn {
    width: 120px;
    height: 45px;
    font-size: 1.1em;
    background: linear-gradient(145deg, #e0e0e0, #ffffff);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 5px 5px 10px #d1d1d1,
               -5px -5px 10px #ffffff;
    transition: all 0.2s;
}

/* 方向控制按钮 */
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.row {
  display: flex;
  gap: 20px;
}

.control-btn {
    width: 70px;
    height: 70px;
    font-size: 1.5em;
    background: linear-gradient(145deg, #e0e0e0, #ffffff);
    border-radius: 50%;
    box-shadow: 5px 5px 10px #d1d1d1,
               -5px -5px 10px #ffffff;
    transition: all 0.2s;
}

/* 设置模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: 10vh auto;
    padding: 25px;
    background: #f0f0f0;
    border-radius: 20px;
    box-shadow: 20px 20px 60px #d1d1d1,
               -20px -20px 60px #ffffff;
}

/* 设置选项卡 */
.settings-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.setting-option {
    padding: 12px;
    text-align: center;
    background: linear-gradient(145deg, #e0e0e0, #ffffff);
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.settings-tab {
    display: none;
    padding: 15px;
    background: rgba(255,255,255,0.8);
    border-radius: 15px;
    margin-top: 15px;
}

/* 高级设置样式 */
.map-size-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    margin: 15px 0;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
}

input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
}

.sub-options {
    padding: 10px;
    margin: 10px 0;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .game-container {
        transform: scale(0.9);
    }
    
    .controls {
        gap: 10px;
    }
    
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.2em;
    }
    
    .settings-menu {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 动态效果 */
button:active, .control-btn:active {
    transform: translateY(2px);
    box-shadow: inset 2px 2px 4px #d1d1d1,
                inset -2px -2px 4px #ffffff;
}

.setting-option:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 6px #d1d1d1,
               -3px -3px 6px #ffffff;
}

#applyMapSize {
    grid-column: span 2;
    background: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

#applyMapSize:hover {
    background: #45a049;
}

/* 特殊状态 */
.god-mode-active {
    animation: godGlow 1s infinite alternate;
}

@keyframes godGlow {
    from { filter: drop-shadow(0 0 5px #ffeb3b); }
    to { filter: drop-shadow(0 0 15px #ffc107); }
}