/* 像素水管工 - 8位像素风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 100%);
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    width: 100%;
    max-width: 400px;
    padding: 10px;
}

#status-bar {
    display: flex;
    justify-content: space-around;
    background: #333;
    color: #4FC3F7;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 4px solid #222;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    background: #263238;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.cell {
    background: #37474F;
    border: 2px solid #455A64;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    color: #4FC3F7;
    transition: all 0.2s;
}

.cell:hover {
    background: #455A64;
}

.cell.start {
    background: #4CAF50;
    color: white;
}

.cell.end {
    background: #FF5722;
    color: white;
}

.cell.water {
    color: #2196F3;
}

.cell.connected {
    border-color: #4FC3F7;
}

#pipe-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pipe-option {
    background: #455A64;
    color: #4FC3F7;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid #37474F;
    transition: all 0.2s;
}

.pipe-option:hover {
    background: #546E7A;
}

.pipe-option.selected {
    border-color: #4FC3F7;
    background: #37474F;
}

#controls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#controls button {
    background: #455A64;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

#controls button:hover {
    background: #546E7A;
}

#complete-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #EEE;
    padding: 20px;
    border-radius: 8px;
    border: 4px solid #333;
    z-index: 100;
    text-align: center;
}

#complete-modal.hidden {
    display: none;
}

/* 响应式 */
@media (max-width: 400px) {
    .cell {
        height: 40px;
        font-size: 20px;
    }
    .pipe-option {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
}