   body {
        font-family: Arial, sans-serif;
        text-align: center;
        background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
        margin: 0;
        padding: 20px;
        min-height: 100vh;
        background-image: url('../image/bg.jpg');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        background-attachment: fixed;
    }

    #preloader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        font-size: 24px;
    }

    .game-container {
        max-width: 400px;
        margin: 60px auto 0 auto;
        /* 60px from top, auto left/right */
        background: rgba(255, 255, 255, 0.9);
        border-radius: 20px;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    h1 {
        color: #ff6b6b;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    .controls {
        margin: 20px 0;
        display: flex;
        margin-left: 13%;
        align-items: center;
    }

    .score {
        background: linear-gradient(45deg, #ff6b6b, #ff8e53);
        color: white;
        padding: 10px 15px;
        border-radius: 10px;
        font-weight: bold;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    #restart,
    #soundToggle {
        background: linear-gradient(45deg, #4ecdc4, #44a08d);
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 10px;
        cursor: pointer;
        font-weight: bold;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        transition: transform 0.2s;
        margin-left: 5px;
    }

    #restart:hover,
    #soundToggle:hover {
        transform: translateY(-2px);
    }

    #gameframe {
        position: relative;
        margin: 20px auto;
        background: #bbada0;
        border-radius: 10px;
        padding: 2px;
    }

    .bgtile {
        position: absolute;
        background: rgba(238, 228, 218, 0.35);
        border-radius: 5px;
        margin: 2px;
    }

    .bgtile2 {
        width: calc(100% - 4px);
        height: calc(100% - 4px);
        background: rgba(255, 255, 255, 0.9);
        border-radius: 3px;
        margin: 2px;
    }

    .tile {
        position: absolute;
        border-radius: 5px;
        margin: 2px;
        transition: all 0.15s ease-in-out;
    }

    .tile2 {
        width: calc(100% - 4px);
        height: calc(100% - 4px);
        border-radius: 3px;
        margin: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }

    .tile-merge {
        animation: mergeAnimation 0.4s ease-out;
    }

    @keyframes mergeAnimation {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.2);
        }

        100% {
            transform: scale(1);
        }
    }

    .tile-new {
        animation: newTileAnimation 0.3s ease-out;
    }

    @keyframes newTileAnimation {
        0% {
            transform: scale(0);
            opacity: 0;
        }

        100% {
            transform: scale(1);
            opacity: 1;
        }
    }

    .score-popup {
        position: absolute;
        color: #ff6b6b;
        font-weight: bold;
        font-size: 20px;
        pointer-events: none;
        animation: scorePopup 1s ease-out forwards;
        z-index: 1000;
        text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    }

    @keyframes scorePopup {
        0% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        100% {
            opacity: 0;
            transform: translateY(-60px) scale(1.5);
        }
    }

    .particle {
        position: absolute;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        pointer-events: none;
        z-index: 999;
        animation: particleAnimation 0.8s ease-out forwards;
    }

    @keyframes particleAnimation {
        0% {
            opacity: 1;
            transform: scale(1);
        }

        100% {
            opacity: 0;
            transform: scale(0) translateX(var(--dx)) translateY(var(--dy));
        }
    }

    #gameover {
        position: absolute;
        background: rgba(255, 255, 255, 0.95);
        color: #ff6b6b;
        font-size: 32px;
        font-weight: bold;
        padding: 40px;
        border-radius: 20px;
        visibility: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        left: 36% !important;
    }

    .instructions {
        font-size: 14px;
        color: #666;
        margin-top: 10px;
    }
    @media only screen and (max-width: 480px) {
        #gameover{left: 2% !important;}
    }
