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

body {
    font-family: Arial, sans-serif;
    background-color: #faf8ef;
    color: #776e65;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.game-logo {
    width: 100px;
    height: 100px;
    margin-right: 20px;
    transition: transform 0.3s ease;
}

.game-logo:hover {
    transform: scale(1.1);
}

h1 {
    font-size: 48px;
    font-weight: bold;
    color: #776e65;
}

.scores-container {
    display: flex;
    gap: 10px;
}

.score, .best {
    position: relative;
    background: #bbada0;
    padding: 10px 15px;
    border-radius: 3px;
    color: white;
    font-size: 18px;
}

.web3-container {
    margin-bottom: 20px;
    text-align: center;
}

.web3-button {
    background: #8f7a66;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
}

.wallet-info {
    margin-top: 10px;
    font-size: 14px;
}

.game-container {
    position: relative;
    background: #bbada0;
    padding: 15px;
    border-radius: 6px;
    width: 100%;
    height: 500px;
}

.grid-container {
    position: absolute;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 15px;
    width: calc(100% - 30px);
    height: calc(100% - 30px);
}

.grid-cell {
    background: rgba(238, 228, 218, 0.35);
    border-radius: 3px;
    position: relative;
}

.tile {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    font-weight: bold;
    border-radius: 3px;
    transition: all 0.15s ease;
}

/* Tile colors */
.tile-2 { background: #eee4da; }
.tile-4 { background: #ede0c8; }
.tile-8 { background: #f2b179; color: #f9f6f2; }
.tile-16 { background: #f59563; color: #f9f6f2; }
.tile-32 { background: #f67c5f; color: #f9f6f2; }
.tile-64 { background: #f65e3b; color: #f9f6f2; }
.tile-128 { background: #edcf72; color: #f9f6f2; }
.tile-256 { background: #edcc61; color: #f9f6f2; }
.tile-512 { background: #edc850; color: #f9f6f2; }
.tile-1024 { background: #edc53f; color: #f9f6f2; }
.tile-2048 { background: #edc22e; color: #f9f6f2; }

.game-message {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(238, 228, 218, 0.73);
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-message.game-won {
    display: flex;
    background: rgba(237, 194, 46, 0.5);
}

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

.game-message p {
    font-size: 60px;
    font-weight: bold;
    margin-bottom: 20px;
}

.retry-button {
    background: #8f7a66;
    color: white;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 18px;
}

.game-explanation {
    margin-top: 20px;
    text-align: center;
    line-height: 1.65;
}
