/**
 * Zhoumetry - Game Styles
 * 游戏样式定义
 */

body {
    font-family: Arial, sans-serif;
    background: #111;
    color: #eee;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    height: 100vh;
    overflow: hidden;
}

#left-panel, #right-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 200px;
    flex-shrink: 0;
}

#board {
    position: relative;
    display: grid;
    gap: 2px;
    background: #000;
    border: 3px solid #333;
    border-radius: 8px;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
}

.cell {
    width: 100%;
    height: 100%;
    background: #222;
    border-radius: 2px;
    min-width: 0;
    min-height: 0;
}

.ghost {
    position: absolute;
    box-sizing: border-box;
    background: none;
    border-radius: 2px;
    pointer-events: none;
    border: 2px dashed #fff;
}

.panel-section {
    background: #222;
    padding: 10px;
    border-radius: 5px;
    min-width: 0;
}

.panel-section h3 {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #aaa;
}

.hold, .next {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-board {
    position: relative;
    width: 50px;
    height: 50px;
    background: transparent;
    margin: 0 auto;
}

.stats div {
    margin: 3px 0;
    font-size: 11px;
}

.control-setting {
    margin: 10px 0;
}

.control-setting label {
    display: block;
    margin: 5px 0;
    font-size: 12px;
}

.control-setting input[type="range"] {
    width: 100%;
}

button {
    background: #4a4;
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    width: 100%;
    margin: 3px 0;
}

button:hover {
    background: #5b5;
}

button:disabled {
    background: #555;
    cursor: not-allowed;
}

#level-info {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    color: #4a4;
}

#target-status {
    font-size: 14px;
    color: #f88;
    text-align: center;
    margin: 10px 0;
}

/* Combo特效 */
.combo-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #ff0;
    text-shadow: 2px 2px 4px #000;
    pointer-events: none;
    z-index: 1000;
    animation: comboFade 1s ease-out;
}

@keyframes comboFade {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

/* All Clear特效 */
.all-clear-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    font-weight: bold;
    color: #0ff;
    text-shadow: 3px 3px 6px #000;
    pointer-events: none;
    z-index: 1000;
    animation: allClearFade 2s ease-out;
}

@keyframes allClearFade {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* 关卡完成UI */
.level-complete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.level-complete-box {
    background: #222;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.level-complete-box h2 {
    color: #0ff;
    font-size: 36px;
    margin: 0 0 20px 0;
}

.level-complete-box button {
    margin: 10px;
    padding: 15px 30px;
    font-size: 16px;
}

/* 关卡选择UI */
.level-select-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

.level-select-box {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    width: 90vw;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
}

.level-select-box h2 {
    color: #4a4;
    margin: 0 0 15px 0;
    text-align: center;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-bottom: 15px;
    width: 100%;
}

.level-button {
    padding: 6px 4px;
    background: #333;
    border: 2px solid #555;
    color: #eee;
    cursor: pointer;
    border-radius: 5px;
    font-size: 10px;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
}

.level-button:hover {
    background: #444;
    border-color: #4a4;
}

.level-button.current {
    border-color: #4a4;
    background: #2a4;
}

.level-button.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 移动端控制 */
#mobileControls {
    display: none;
}
