
      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        user-select: none;
      }
      body,
      html {
        width: 100%;
        height: 100%;
        overflow: hidden;
        background: #06050a;
        font-family: "Courier New", monospace, sans-serif;
        color: #eee;
      }
      #game-container {
        position: relative;
        width: 100vw;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      canvas {
        background: #0e0a1a;
        cursor: crosshair;
      }
      #ui {
        position: absolute;
        inset: 0;
        pointer-events: none;
      }
      .hud-panel {
        position: absolute;
      }
      #hud-top-left {
        top: 16px;
        left: 20px;
      }
      .hud-sub {
        font-size: 11px;
        color: #c084fc;
        margin-top: 6px;
        display: flex;
        gap: 12px;
        align-items: center;
      }
      #hud-top-right {
        top: 16px;
        right: 20px;
      }
      #minimap {
        border: 1px solid #5a3d75;
        border-radius: 4px;
        background: rgba(10, 5, 20, 0.85);
      }
      #hud-bottom {
        bottom: 16px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 14px;
      }
      .bar-wrap {
        width: 220px;
        height: 18px;
        background: rgba(20, 10, 30, 0.8);
        border: 2px solid #5a3d75;
        border-radius: 4px;
        overflow: hidden;
        position: relative;
      }
      .bar-fill {
        height: 100%;
        width: 100%;
        background: linear-gradient(90deg, #9b30ff, #e056fd);
        transition: width 0.15s;
      }
      .bar-text {
        position: absolute;
        inset: 0;
        font-size: 11px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        text-shadow: 1px 1px 2px #000;
      }
      .skill-slot {
        width: 64px;
        height: 64px;
        background: rgba(15, 10, 25, 0.85);
        border: 2px solid #5a3d75;
        border-radius: 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
      }
      .skill-cooldown {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(180, 50, 255, 0.3);
        transition: height 0.05s linear;
      }
      .skill-key {
        font-size: 10px;
        color: #d8b4f8;
        font-weight: bold;
        position: absolute;
        top: 3px;
        left: 5px;
      }
      .skill-name {
        font-size: 8.5px;
        text-align: center;
        color: #fff;
        margin-top: 10px;
        line-height: 1.1;
      }
      #boss-hud {
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 440px;
        text-align: center;
        display: none;
      }
      #boss-bar-wrap {
        width: 100%;
        height: 14px;
        background: #1a0826;
        border: 2px solid #ffcc00;
        border-radius: 3px;
        overflow: hidden;
        margin-top: 4px;
      }
      #boss-bar-fill {
        height: 100%;
        width: 100%;
        background: linear-gradient(90deg, #ff9900, #ffea00);
        transition: width 0.1s;
      }
      #boss-name {
        font-size: 12px;
        font-weight: bold;
        color: #ffe680;
        text-shadow: 0 0 6px rgba(255, 200, 0, 0.8);
      }
      #dialogue-overlay {
        position: absolute;
        bottom: 102px;
        left: 50%;
        transform: translateX(-50%);
        width: 720px;
        max-width: 92%;
        z-index: 50;
        background: rgba(12, 8, 22, 0.95);
        border: 2px solid #a855f7;
        border-radius: 8px;
        padding: 16px 20px;
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
        display: none;
        pointer-events: auto;
        cursor: pointer;
      }
      #dialogue-speaker {
        font-size: 13px;
        font-weight: bold;
        color: #d8b4f8;
        margin-bottom: 4px;
      }
      #dialogue-text {
        font-size: 13px;
        line-height: 1.45;
        color: #f3e8ff;
        min-height: 38px;
      }
      #dialogue-prompt {
        font-size: 11px;
        color: #c084fc;
        text-align: right;
        margin-top: 6px;
      }
      #boon-overlay {
        position: absolute;
        inset: 0;
        background: rgba(4, 2, 8, 0.88);
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        pointer-events: auto;
      }
      .boon-header {
        font-size: 22px;
        font-weight: bold;
        color: #d8b4f8;
        text-shadow: 0 0 10px #9333ea;
      }
      .boon-sub {
        font-size: 12px;
        color: #a78bfa;
        margin-top: 4px;
      }
      #boon-cards {
        display: flex;
        gap: 20px;
        margin-top: 24px;
      }
      #boon-reroll {
        margin-top: 22px;
        font-size: 13px;
        color: #c084fc;
        cursor: pointer;
        border: 1px solid #7c3aed;
        border-radius: 6px;
        padding: 8px 16px;
        pointer-events: auto;
      }
      #boon-reroll:hover {
        color: #fff;
        border-color: #d8b4f8;
      }
      .boon-card {
        width: 220px;
        background: #120924;
        border: 2px solid #7c3aed;
        border-radius: 8px;
        padding: 18px;
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: center;
      }
      .boon-card:hover {
        transform: translateY(-6px);
        border-color: #d8b4f8;
        box-shadow: 0 0 20px rgba(192, 132, 252, 0.6);
      }
      .boon-title {
        font-size: 14px;
        font-weight: bold;
        color: #f3e8ff;
        margin-bottom: 8px;
      }
      .boon-desc {
        font-size: 12px;
        color: #cbd5e1;
        line-height: 1.4;
      }
      .boon-flavor {
        font-size: 10px;
        color: #9333ea;
        font-style: italic;
        margin-top: 10px;
        border-top: 1px solid #3b1d6e;
        padding-top: 6px;
      }
      #screen-overlay {
        position: absolute;
        inset: 0;
        background: rgba(5, 3, 10, 0.92);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        pointer-events: auto;
        z-index: 100;
      }
      .title-main {
        font-size: 38px;
        font-weight: 900;
        color: #d8b4f8;
        text-shadow:
          0 0 15px #a855f7,
          0 0 35px #6b21a8;
        letter-spacing: 3px;
        margin-bottom: 6px;
        text-align: center;
      }
      .title-sub {
        font-size: 14px;
        color: #c4b5fd;
        margin-bottom: 24px;
        text-align: center;
        max-width: 540px;
        line-height: 1.5;
      }
      .btn-primary {
        background: linear-gradient(135deg, #7c3aed, #4c1d95);
        color: #fff;
        border: 2px solid #c084fc;
        padding: 14px 36px;
        font-size: 15px;
        font-weight: bold;
        font-family: inherit;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s;
        box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
        pointer-events: auto;
      }
      .btn-primary:hover {
        background: linear-gradient(135deg, #9333ea, #6b21a8);
        transform: scale(1.05);
      }
      .controls-hint {
        margin-top: 18px;
        font-size: 11px;
        color: #8b5cf6;
        text-align: center;
      }
      #error-banner {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: rgba(220, 38, 38, 0.95);
        color: #fff;
        padding: 10px;
        font-size: 12px;
        display: none;
        z-index: 999;
        text-align: center;
      }
    