* { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      background: radial-gradient(circle at 50% 0%, #17090d 0%, #050407 75%);
      color: #ebe6da;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      display: flex;
      flex-direction: column;
      align-items: center;
      min-height: 100vh;
      padding: 16px;
      gap: 12px;
    }
    header {
      width: 100%;
      max-width: 960px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      background: rgba(18, 17, 27, 0.92);
      border: 1px solid rgba(150, 30, 48, 0.38);
      padding: 11px 18px;
      border-radius: 10px;
      box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
    }
    header h1 {
      font-size: 1.08rem;
      font-weight: 600;
      letter-spacing: 0.6px;
      color: #e8a0a0;
    }
    .hud-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      font-size: 0.84rem;
      align-items: center;
    }
    .badge {
      background: rgba(28, 27, 41, 0.9);
      border: 1px solid rgba(160, 154, 180, 0.22);
      padding: 5px 11px;
      border-radius: 7px;
      color: #dcd7cc;
    }
    .badge.active {
      border-color: rgba(110, 214, 170, 0.55);
      color: #9bf2cb;
      background: rgba(25, 52, 43, 0.55);
    }
    button {
      background: linear-gradient(180deg, #2b171f 0%, #160d13 100%);
      color: #e8a0a0;
      border: 1px solid rgba(170, 35, 55, 0.55);
      padding: 6px 12px;
      border-radius: 7px;
      cursor: pointer;
      font-size: 0.8rem;
      font-weight: 500;
      transition: transform 0.12s, border-color 0.15s, background 0.15s;
    }
    button:hover {
      background: linear-gradient(180deg, #421b27 0%, #241017 100%);
      border-color: rgba(255, 95, 115, 0.8);
      transform: translateY(-1px);
    }
    .game-wrapper {
      position: relative;
      width: 100%;
      max-width: 960px;
      aspect-ratio: 640 / 368;
      background: #06060a;
      border: 1px solid rgba(212, 175, 95, 0.28);
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0 18px 50px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(0, 0, 0, 0.65);
    }
    canvas {
      width: 100%;
      height: 100%;
      display: block;
    }
    .controls-info {
      width: 100%;
      max-width: 960px;
      background: rgba(15, 14, 23, 0.9);
      border: 1px solid rgba(160, 154, 180, 0.16);
      border-radius: 10px;
      padding: 10px 18px;
      font-size: 0.82rem;
      color: #b7b2a6;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 8px;
    }
    .controls-info span strong { color: #e8a0a0; }
    #toast {
      position: fixed;
      bottom: 22px;
      right: 22px;
      background: rgba(20, 19, 31, 0.96);
      color: #ffd0d0;
      border: 1px solid rgba(190, 40, 60, 0.65);
      padding: 10px 16px;
      border-radius: 8px;
      font-size: 0.85rem;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.25s, transform 0.25s;
      pointer-events: none;
      z-index: 50;
    }
    #toast.show { opacity: 1; transform: translateY(0); }