* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #faf8ef;
    color: #776e65;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

select, button, input {
    padding: 8px 15px;
    font-size: 16px;
    border: 2px solid #bbada0;
    border-radius: 4px;
    background-color: white;
}

button {
    background-color: #8f7a66;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #7f6a56;
}

.game-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.player-section {
    flex: 1;
    text-align: center;
}

.timer-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#timer {
    font-size: 36px;
    font-weight: bold;
    color: #776e65;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
    background-color: #bbada0;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
}

.tile {
    width: 100%;
    aspect-ratio: 1;
    background-color: #cdc1b4;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #776e65;
    transition: all 0.15s ease;
}

.tile[data-value="2"] { background-color: #eee4da; }
.tile[data-value="4"] { background-color: #ede0c8; }
.tile[data-value="8"] { background-color: #f2b179; color: white; }
.tile[data-value="16"] { background-color: #f59563; color: white; }
.tile[data-value="32"] { background-color: #f67c5f; color: white; }
.tile[data-value="64"] { background-color: #f65e3b; color: white; }
.tile[data-value="128"] { background-color: #edcf72; color: white; font-size: 20px; }
.tile[data-value="256"] { background-color: #edcc61; color: white; font-size: 20px; }
.tile[data-value="512"] { background-color: #edc850; color: white; font-size: 20px; }
.tile[data-value="1024"] { background-color: #edc53f; color: white; font-size: 18px; }
.tile[data-value="2048"] { background-color: #edc22e; color: white; font-size: 18px; }

.score {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}

.instructions {
    background-color: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.instructions h3 {
    margin-bottom: 15px;
}

.instructions p {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }
    
    .timer-section {
        order: -1;
    }
    
    h1 {
        font-size: 36px;
    }
    
    .controls {
        flex-wrap: wrap;
    }
} 