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

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

    .container {
      max-width: 550px;
      width: 100%;
    }

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

    .title-section h1 {
      font-size: 64px;
      font-weight: 700;
      color: white;
      line-height: 1;
      text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    }

    .subtitle {
      color: rgba(255, 255, 255, 0.9);
      font-size: 14px;
      margin-top: 5px;
    }

    .score-section {
      display: flex;
      gap: 10px;
    }

    .score-box {
      background: rgba(255, 255, 255, 0.2);
      backdrop-filter: blur(10px);
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-radius: 12px;
      padding: 12px 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      min-width: 90px;
    }

    .label {
      color: rgba(255, 255, 255, 0.8);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 1px;
    }

    .score {
      color: white;
      font-size: 24px;
      font-weight: 700;
      margin-top: 4px;
    }

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

    .btn-new {
      background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
      color: white;
      border: none;
      padding: 14px 32px;
      border-radius: 12px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
      font-family: 'Space Grotesk', sans-serif;
    }

    .btn-new:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
    }

    .instructions {
      color: rgba(255, 255, 255, 0.9);
      font-size: 13px;
    }

    .game-container {
      position: relative;
      background: rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(10px);
      border: 3px solid rgba(255, 255, 255, 0.3);
      border-radius: 20px;
      padding: 15px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
      margin-bottom: 30px;
    }

    .grid-container {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 15px;
      position: relative;
      z-index: 1;
    }

    .grid-cell {
      aspect-ratio: 1;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 12px;
    }

    .tile-container {
      position: absolute;
      top: 15px;
      left: 15px;
      right: 15px;
      bottom: 15px;
      z-index: 2;
    }

    .tile {
      position: absolute;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 32px;
      font-weight: 700;
      border-radius: 12px;
      transition: all 0.15s ease;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .tile-new {
      animation: appear 0.2s ease;
    }

    .tile-merged {
      animation: pop 0.2s ease;
    }

    @keyframes appear {
      from {
        transform: scale(0);
      }
      to {
        transform: scale(1);
      }
    }

    @keyframes pop {
      0% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.1);
      }
      100% {
        transform: scale(1);
      }
    }

    .tile-2 { background: #eee4da; color: #776e65; }
    .tile-4 { background: #ede0c8; color: #776e65; }
    .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: 28px; }
    .tile-256 { background: #edcc61; color: #f9f6f2; font-size: 28px; }
    .tile-512 { background: #edc850; color: #f9f6f2; font-size: 28px; }
    .tile-1024 { background: #edc53f; color: #f9f6f2; font-size: 24px; }
    .tile-2048 { background: #edc22e; color: #f9f6f2; font-size: 24px; }
    .tile-super { background: #3c3a32; color: #f9f6f2; font-size: 20px; }

    .game-message {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(5px);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1000;
      animation: fadeIn 0.3s ease;
    }

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

    @keyframes fadeIn {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }

    .message-content {
      background: white;
      padding: 50px;
      border-radius: 20px;
      text-align: center;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
      animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
      from {
        transform: translateY(50px);
        opacity: 0;
      }
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    #messageTitle {
      font-size: 48px;
      color: #776e65;
      margin-bottom: 15px;
    }

    #messageText {
      font-size: 18px;
      color: #776e65;
      margin-bottom: 30px;
    }

    .btn-try {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      padding: 16px 40px;
      border-radius: 12px;
      font-size: 18px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
      font-family: 'Space Grotesk', sans-serif;
    }

    .btn-try:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    }

    footer {
      background: rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(10px);
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-radius: 12px;
      padding: 20px;
      text-align: center;
      color: white;
      font-size: 14px;
      line-height: 1.6;
    }

    @media (max-width: 600px) {
      .title-section h1 {
        font-size: 48px;
      }

      header {
        flex-wrap: wrap;
      }

      .controls {
        flex-direction: column;
        gap: 15px;
      }

      .tile {
        font-size: 24px;
      }

      .tile-128, .tile-256, .tile-512 {
        font-size: 20px;
      }

      .tile-1024, .tile-2048 {
        font-size: 18px;
      }
    }
