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

    body {
      font-family: 'Inter', sans-serif;
      background: url('bg.jpg') no-repeat center center fixed;
      background-size: cover;
      min-height: 100vh;
      color: #fff;
      overflow-x: hidden;
    }

    #preloader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: url('bg.jpg') no-repeat center center fixed;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      transition: opacity 0.5s ease, visibility 0.5s ease;
    }

    #preloader.hidden {
      opacity: 0;
      visibility: hidden;
    }

    .loader-gem {
      width: 80px;
      height: 80px;
      animation: float 2s ease-in-out infinite;
    }

    .loader-gem svg {
      width: 100%;
      height: 100%;
      filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
      animation: rotate 3s linear infinite;
    }

    @keyframes float {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-20px);
      }
    }

    @keyframes rotate {
      from {
        transform: rotate(0deg);
      }

      to {
        transform: rotate(360deg);
      }
    }

    .loader-text {
      margin-top: 30px;
      font-size: 24px;
      font-weight: 600;
      letter-spacing: 2px;
      animation: pulse 1.5s ease-in-out infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 0.6;
      }

      50% {
        opacity: 1;
      }
    }

    .welcome-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.9);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      backdrop-filter: blur(10px);
      animation: fadeIn 0.5s ease;
    }

    .welcome-modal.hidden {
      display: none;
    }

    .welcome-content {
      background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
      backdrop-filter: blur(20px);
      border-radius: 24px;
      padding: 2.5rem;
      max-width: 500px;
      width: 90%;
      border: 1px solid rgba(255, 255, 255, 0.2);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
      animation: slideUp 0.5s ease;
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .welcome-title {
      font-size: 1.5rem;
      font-weight: 800;
      text-align: center;
      margin-bottom: 1rem;
      background: linear-gradient(45deg, #fff, #ffd700);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .welcome-subtitle {
      text-align: center;
      font-size: 1.125rem;
      opacity: 0.9;
      margin-bottom: 2rem;
    }

    .welcome-instructions {
      background: rgba(0, 0, 0, 0.3);
      padding: 1.5rem;
      border-radius: 16px;
      margin-bottom: 1rem;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .welcome-instructions h3 {
      font-size: 1.25rem;
      margin-bottom: 1rem;
      color: #ffd700;
      text-align: center;
    }

    .welcome-instructions ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .welcome-instructions li {
      padding: 0.75rem 0;
      padding-left: 2.5rem;
      position: relative;
      font-size: 0.95rem;
      line-height: 1.5;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .welcome-instructions li:last-child {
      border-bottom: none;
    }

    .welcome-instructions li::before {
      content: "💎";
      position: absolute;
      left: 0;
      font-size: 1.25rem;
    }

    .welcome-actions {
      display: flex;
      justify-content: center;
      gap: 1rem;
    }

    .site-header {
      text-align: center;
      padding: 1.5rem 1rem 0.75rem;
      background: rgba(0, 0, 0, 0.15);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .title {
      font-size: 2rem;
      font-weight: 800;
      margin-bottom: 0.25rem;
      background: linear-gradient(45deg, #fff, #ffd700);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .tagline {
      font-size: 0.875rem;
      opacity: 0.8;
    }

    .container {
      max-width: 600px;
      margin: 0 auto;
      padding: 1rem;
    }

    .hud {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
      gap: 0.75rem;
      margin-bottom: 1.5rem;
      background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
      padding: 1rem;
      border-radius: 16px;
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    .hud__group {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.25rem;
      padding: 0.75rem 0.5rem;
      background: rgba(0, 0, 0, 0.25);
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.05);
      transition: all 0.3s ease;
    }

    .hud__group:hover {
      background: rgba(0, 0, 0, 0.35);
      border-color: rgba(255, 255, 255, 0.15);
      transform: translateY(-2px);
    }

    .hud__label {
      font-size: 0.7rem;
      opacity: 0.7;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      font-weight: 600;
    }

    .hud__value {
      font-size: 1.75rem;
      font-weight: 800;
      background: linear-gradient(135deg, #fff, #ffd700);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .next__preview {
      display: flex;
      gap: 0.5rem;
      align-items: center;
      margin-top: 0.25rem;
    }

    .next__bubble {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      border: 2px solid rgba(255, 255, 255, 0.4);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 2px 8px rgba(255, 255, 255, 0.2);
    }

    .next__bubble--small {
      width: 28px;
      height: 28px;
    }

    .hud__controls {
      grid-column: 1 / -1;
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      justify-content: center;
      margin-top: 0.5rem;
    }

    .btn {
      padding: 0.6rem 1.2rem;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: #fff;
      border-radius: 10px;
      cursor: pointer;
      font-weight: 600;
      font-size: 0.875rem;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      backdrop-filter: blur(10px);
      position: relative;
      overflow: hidden;
    }

    .btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: left 0.5s;
    }

    .btn:hover::before {
      left: 100%;
    }

    .btn:hover {
      background: rgba(255, 255, 255, 0.2);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
      border-color: rgba(255, 255, 255, 0.4);
    }

    .btn:active {
      transform: translateY(0);
    }

    .btn--primary {
      background: linear-gradient(135deg, #667eea, #764ba2);
      border: none;
      padding: 1rem 2.5rem;
      font-size: 1.125rem;
      box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    }

    .btn--primary:hover {
      box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
      transform: translateY(-3px);
    }

    .game-root {
      position: relative;
      margin: 0 auto 2rem;
      max-width: 480px;
    }

    #game-canvas {
      width: 100%;
      height: auto;
      border-radius: 12px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
      display: block;
    }

    .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.85);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2rem;
      border-radius: 12px;
      backdrop-filter: blur(10px);
      animation: fadeIn 0.3s ease;
    }

    .overlay[hidden] {
      display: none;
    }

    .overlay__message {
      font-size: 1.75rem;
      font-weight: 700;
      text-align: center;
      padding: 0 1rem;
    }

    .howto {
      background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
      padding: 1.5rem;
      border-radius: 16px;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .howto h2 {
      margin-bottom: 1rem;
      font-size: 1.5rem;
      background: linear-gradient(45deg, #fff, #ffd700);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .howto ul {
      list-style: none;
      padding: 0;
    }

    .howto li {
      padding: 0.5rem 0;
      padding-left: 1.5rem;
      position: relative;
    }

    .howto li::before {
      content: "💎";
      position: absolute;
      left: 0;
    }

    .floatscore {
      position: fixed;
      font-weight: 700;
      font-size: 1.5rem;
      color: #ffd700;
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
      pointer-events: none;
      animation: floatUp 0.9s ease-out forwards;
      z-index: 100;
    }

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

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

   

    @media (max-width: 768px) {
      #game-canvas{height: 510px !important;}
    }
