        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            }
        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            color: #776e65;
        }
        .container {
            max-width: 500px;
            width: 100%;
            margin: 0 auto;
            padding: 20px;
        }
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        .title {
            font-size: 60px;
            font-weight: bold;
            color: #776e65;
        }
        .scores-container {
            display: flex;
            gap: 10px;
        }
        .score-box {
            background: #bbada0;
            color: white;
            padding: 10px 15px;
            border-radius: 6px;
            text-align: center;
            min-width: 80px;
        }
        .score-title {
            font-size: 14px;
            text-transform: uppercase;
            font-weight: bold;
        }
        .score-value {
            font-size: 22px;
            font-weight: bold;
        }
        .game-intro {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .description {
            font-size: 16px;
            line-height: 1.4;
            max-width: 60%;
        }
        .restart-button {
            background: #8f7a66;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 10px 20px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s;
        }
        .restart-button:hover {
            background: #7c6a58;
            transform: scale(1.05);
        }
        .game-container {
            position: relative;
            background: #bbada0;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }
        .grid-container {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-gap: 10px;
            background: rgba(119, 110, 101, 0.35);
            border-radius: 6px;
            padding: 10px;
            position: relative;
        }
        .grid-cell {
            width: 100%;
            height: 0;
            padding-bottom: 100%;
            background: rgba(238, 228, 218, 0.35);
            border-radius: 5px;
        }
        .tile-container {
            position: absolute;
            top: 10px;
            left: 10px;
            right: 10px;
            bottom: 10px;
        }
        .tile {
            position: absolute;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
            font-size: 35px;
            background: #eee4da;
            color: #776e65;
            border-radius: 5px;
            transition: all 0.15s ease;
            /* 添加过渡效果 */
            z-index: 10;
            transform: scale(1);
            /* 确保默认缩放为1 */
        }
        /* 其他tile颜色样式保持不变 */
        .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;
            font-size: 30px;
        }
        .tile-256 {
            background: #edcc61;
            color: #f9f6f2;
            font-size: 30px;
        }
        .tile-512 {
            background: #edc850;
            color: #f9f6f2;
            font-size: 30px;
        }
        .tile-1024 {
            background: #edc53f;
            color: #f9f6f2;
            font-size: 25px;
        }
        .tile-2048 {
            background: #edc22e;
            color: #f9f6f2;
            font-size: 25px;
        }
        .game-message {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(238, 228, 218, 0.73);
            border-radius: 10px;
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 100;
        }
        .game-message.game-won,
        .game-message.game-over {
            display: flex;
        }
        .game-message p {
            font-size: 40px;
            font-weight: bold;
            margin-bottom: 20px;
        }
        .lower {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }
        .controls {
            display: flex;
            flex-direction: column;
            gap: 10px;
            align-items: center;
        }
        .directions {
            display: grid;
            grid-template-columns: repeat(3, 60px);
            grid-template-rows: repeat(3, 60px);
            gap: 5px;
        }
        .dir-btn {
            background: #8f7a66;
            color: white;
            border: none;
            border-radius: 6px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 24px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .dir-btn:hover {
            background: #7c6a58;
            transform: scale(1.05);
        }
        .dir-btn.up {
            grid-column: 2;
            grid-row: 1;
        }
        .dir-btn.down {
            grid-column: 2;
            grid-row: 3;
        }
        .dir-btn.left {
            grid-column: 1;
            grid-row: 2;
        }
        .dir-btn.right {
            grid-column: 3;
            grid-row: 2;
        }
        .instructions {
            flex: 1;
            background: #f8f5f0;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        }
        .instructions h3 {
            margin-bottom: 15px;
            color: #776e65;
        }
        .instructions p {
            margin-bottom: 10px;
            line-height: 1.6;
        }
        .key {
            display: inline-block;
            background: #e9e6e2;
            padding: 3px 8px;
            border-radius: 4px;
            font-weight: bold;
            margin: 0 3px;
            box-shadow: 0 2px 0 #d8d4ce;
        }
        .more-games {
            display: block;
            width: 100%;
            text-align: center;
            background: #8f7a66;
            color: white;
            padding: 15px;
            border-radius: 6px;
            font-weight: bold;
            text-decoration: none;
            margin-top: 20px;
            transition: all 0.3s;
        }
        .more-games:hover {
            background: #7c6a58;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        .mobile-swipe {
            display: none;
            text-align: center;
            margin-top: 15px;
            font-size: 14px;
            color: #776e65;
        }
        footer {
            text-align: center;
            margin-top: 30px;
            color: #776e65;
            font-size: 14px;
        }
        @media (max-width: 520px) {
            .title {
                font-size: 40px;
            }
            .game-intro {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
            .description {
                max-width: 100%;
            }
            .tile {
                font-size: 24px;
            }
            .tile-128,
            .tile-256,
            .tile-512 {
                font-size: 22px;
            }
            .tile-1024,
            .tile-2048 {
                font-size: 18px;
            }
            .lower {
                flex-direction: column;
            }
            .controls {
                width: 100%;
            }
            .mobile-swipe {
                display: block;
            }
        }