:root {
    --primary-color: #ec4899;
    /* Pink */
    --secondary-color: #f472b6;
    --accent-color: #facc15;
    --background-color: #fdf2f8;
    --text-color: #831843;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    max-height: 600px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#game-header {
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    margin-left: 10px;
}

.icon-btn:hover {
    opacity: 0.8;
}

#game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #fdf4ff;
    gap: 20px;
}

.canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-canvas {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: repeat(16, 1fr);
    width: 320px;
    /* 16 * 20px */
    height: 320px;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.pixel {
    border: 1px solid #eee;
    cursor: pointer;
}

.pixel:hover {
    border-color: #888;
}

.palette {
    display: flex;
    gap: 10px;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.color {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
}

.color.selected {
    border-color: #831843;
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}