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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

h1 {
    color: white;
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 0 0 20px #ff4500, 0 0 40px #ff1493;
}

.score-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.score-box {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 30px;
    border-radius: 10px;
    border: 2px solid #ff1493;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
}

.score-label {
    color: #ff1493;
    font-size: 0.9em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.score-value {
    color: white;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 0 0 10px #ff4500;
}

.game-board {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 20px;
    border: 3px solid #ff1493;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
    display: inline-block;
    margin-bottom: 20px;
}

#gameCanvas {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    display: block;
    cursor: pointer;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

button {
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    color: white;
    border: 2px solid #ff1493;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.6);
    transition: all 0.3s ease;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.8);
}

.back-button {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ff1493;
}

.instructions {
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #ff1493;
    margin-top: 20px;
    text-shadow: 0 0 5px #ff1493;
}

.game-over {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over.show {
    display: flex;
}

.game-over-content {
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid white;
    box-shadow: 0 0 50px rgba(255, 20, 147, 0.8);
}

.game-over-content h2 {
    color: white;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #000;
}

.game-over-content p {
    color: white;
    font-size: 1.5em;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .tile {
        width: 70px;
        height: 70px;
        font-size: 1.5em;
    }

    .tile[data-value="128"],
    .tile[data-value="256"],
    .tile[data-value="512"] {
        font-size: 1.3em;
    }

    .tile[data-value="1024"],
    .tile[data-value="2048"] {
        font-size: 1.1em;
    }

    h1 {
        font-size: 2em;
    }
}

