
        :root { --bg-color: #0d1118; --card-bg: #161e2b; --text-main: #ffffff; --text-muted: #94a3b8; --accent-start: #3b82f6; --accent-end: #ef4444; }
        body { background-color: var(--bg-color); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; margin: 0; padding: 20px; display: flex; flex-direction: column; align-items: center; min-height: 100vh; box-sizing: border-box; user-select: none; overflow-x: hidden; }
        .navbar { width: 100%; max-width: 480px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
        .nav-links { display: flex; align-items: center; gap: 15px; }
        .logo-link { font-size: 1.2rem; font-weight: bold; text-decoration: none; color: #fff; }
        .logo-link span { color: var(--accent-start); text-shadow: 0 0 10px var(--accent-start); }
        .nav-btn { text-decoration: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
        .nav-btn:hover { color: #fff; }
        .lang-select { background-color: var(--card-bg); border: 1px solid #1e293b; color: #fff; padding: 8px 14px; border-radius: 20px; cursor: pointer; font-size: 0.85rem; outline: none; }
        .game-card { background-color: var(--card-bg); border: 1px solid #1e293b; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.6); width: 100%; max-width: 480px; box-sizing: border-box; position: relative; margin-bottom: 20px; }
        #gameGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; aspect-ratio: 1; background-color: #090e15; padding: 10px; border-radius: 12px; border: 2px solid #1e293b; box-shadow: 0 5px 15px rgba(0,0,0,0.5); box-sizing: border-box; position: relative; }
        .tile { display: flex; justify-content: center; align-items: center; background-color: rgba(255, 255, 255, 0.05); border-radius: 8px; font-size: 1.6rem; font-weight: 800; color: #fff; position: relative; box-sizing: border-box; border: 1px solid transparent; transition: transform 0.1s ease-out, background 0.1s; }
        .tile.t2 { background: radial-gradient(circle at 50% 50%, var(--accent-start), #090e15); border-color: var(--accent-start); box-shadow: 0 0 10px var(--accent-start); }
        .tile.t4 { background: radial-gradient(circle at 50% 50%, #818cf8, #090e15); border-color: #818cf8; box-shadow: 0 0 10px #818cf8; }
        .tile.t8 { background: radial-gradient(circle at 50% 50%, #a78bfa, #090e15); border-color: #a78bfa; box-shadow: 0 0 10px #a78bfa; }
        .tile.t16 { background: radial-gradient(circle at 50% 50%, #f472b6, #090e15); border-color: #f472b6; box-shadow: 0 0 15px #f472b6; }
        .tile.t32 { background: radial-gradient(circle at 50% 50%, #f87171, #090e15); border-color: #f87171; box-shadow: 0 0 15px #f87171; }
        .tile.t64 { background: radial-gradient(circle at 50% 50%, var(--accent-end), #090e15); border-color: var(--accent-end); box-shadow: 0 0 15px var(--accent-end); }
        .tile.t128 { background: radial-gradient(circle at 50% 50%, var(--accent-end), var(--accent-start)); border-color: #fff; box-shadow: 0 0 20px #fff; }
        .tile.t256, .tile.t512, .tile.t1024, .tile.t2048 { background: radial-gradient(circle at 50% 50%, #fff, var(--accent-end)); border-color: #fff; box-shadow: 0 0 25px var(--accent-end); font-size: 1.4rem; color: #000; }
        #gameOverlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); border-radius: 12px; display: none; flex-direction: column; justify-content: center; align-items: center; z-index: 50; opacity: 0; transition: opacity 0.3s ease-out; }
        #gameOverlay.show { display: flex; opacity: 1; }
        #overlayText { font-size: 2.2rem; font-weight: 800; text-transform: uppercase; margin-bottom: 25px; }
        .pad-container { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 15px; width: 100%; }
        .pad-row { display: flex; gap: 12px; }
        .pad-btn { background-color: #090e15; border: 1px solid #1e293b; color: #fff; width: 44px; height: 44px; border-radius: 12px; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
        .control-panel { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 20px; align-items: center; justify-content: space-between; width: 100%; }
        .mode-selector { display: flex; background-color: var(--bg-color); padding: 4px; border-radius: 20px; border: 1px solid #1e293b; }
        .mode-btn { background: none; border: none; color: var(--text-muted); padding: 6px 14px; border-radius: 16px; cursor: pointer; font-size: 0.85rem; font-weight: bold; }
        .mode-btn.active { background-color: var(--accent-start); color: #fff; }
        .btn { background: none; border: 1px solid #1e293b; color: #fff; padding: 6px 14px; border-radius: 16px; cursor: pointer; font-size: 1rem; font-weight: bold; }
        .stat-lbl { color: var(--text-muted); font-size: 1rem; margin: 0; font-weight: 500; }
        .stat-lbl span { color: var(--accent-start); font-weight: bold; font-size: 1.2rem; }
        .history-card { background-color: var(--card-bg); border: 1px solid #1e293b; border-radius: 16px; padding: 20px; width: 100%; max-width: 480px; box-sizing: border-box; margin-bottom: 20px; }
        .history-card h3 { margin-top: 0; font-size: 1.1rem; color: #fff; margin-bottom: 12px; border-left: 3px solid var(--accent-start); padding-left: 8px; }
        .history-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
        .history-item { display: flex; justify-content: space-between; background-color: #090e15; padding: 8px 12px; border-radius: 8px; border: 1px solid #1e293b; font-size: 0.9rem; }
        .history-item .rank { color: var(--accent-start); font-weight: bold; }
        .seo-section { max-width: 480px; width: 100%; padding: 20px; background-color: var(--card-bg); border-radius: 16px; border: 1px solid #1e293b; text-align: left; line-height: 1.6; box-sizing: border-box; font-size: 0.85rem; }
    