    :root {
      --bg-dark: #090e17;
      --cyan: #00e5ff;
      --magenta: #ff007f;
      --gold: #ffc837;
      --emerald: #00f076;
      --danger: #ff3355;
      --glass-bg: rgba(14, 22, 38, 0.72);
      --glass-border: rgba(255, 255, 255, 0.16);
      --font-main: 'Outfit', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    }

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

    body,
    html {
      width: 100%;
      height: 100%;
      overflow: hidden;
      background-color: var(--bg-dark);
      font-family: var(--font-main);
      color: #ffffff;
    }

    #game-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
    }

    /* HUD Overlay Layer */
    #hud-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 10;
      pointer-events: none;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 24px;
    }

    /* Interactive elements in HUD must re-enable pointer-events */
    .interactive {
      pointer-events: auto;
    }

    /* Header Bar */
    .top-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
    }

    .brand-box {
      background: var(--glass-bg);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid var(--glass-border);
      border-radius: 14px;
      padding: 8px 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    }

    .brand-box.nest-stats-badge {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 170px;
      padding: 7px 14px;
    }

    .brand-box.nest-stats-badge .quest-row {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      font-weight: 700;
      gap: 12px;
    }

    .brand-title {
      font-size: 20px;
      font-weight: 800;
      letter-spacing: -0.5px;
      background: linear-gradient(135deg, #ffffff 30%, var(--cyan) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .brand-badge {
      font-size: 11px;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 20px;
      background: rgba(0, 229, 255, 0.15);
      color: var(--cyan);
      border: 1px solid rgba(0, 229, 255, 0.3);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .top-bar-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .action-group {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .top-bar-left .btn,
    .action-group .btn {
      padding: 7px 11px;
      font-size: 11.5px;
      border-radius: 10px;
      gap: 5px;
      white-space: nowrap;
      height: 35px;
      box-sizing: border-box;
    }

    #btn-top-exit-game {
      border-color: rgba(255, 255, 255, 0.25);
      color: rgba(255, 255, 255, 0.85);
      font-weight: 700;
    }

    #btn-top-exit-game:hover {
      border-color: rgba(255, 80, 80, 0.6);
      background: rgba(255, 60, 60, 0.18);
      color: #ff6b81;
    }

    .btn {
      background: var(--glass-bg);
      backdrop-filter: blur(12px);
      border: 1px solid var(--glass-border);
      border-radius: 12px;
      padding: 10px 18px;
      font-size: 13px;
      font-weight: 700;
      color: #ffffff;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    }

    .btn:hover {
      background: rgba(255, 255, 255, 0.15);
      border-color: rgba(255, 255, 255, 0.4);
      transform: translateY(-1px);
    }

    .btn-primary {
      background: linear-gradient(135deg, #0099ff, #00e5ff);
      border: none;
      color: #051020;
    }

    .btn-primary:hover {
      background: linear-gradient(135deg, #22aaff, #55eeff);
      box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
    }

    .btn-primary.active {
      background: linear-gradient(135deg, #00f076, #00e5ff);
      color: #052010;
    }

    /* Top Center: Sync Harmony Gauge */
    .sync-meter-box {
      position: absolute;
      top: 24px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--glass-bg);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid var(--glass-border);
      border-radius: 18px;
      padding: 8px 18px;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 280px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
      z-index: 10;
    }

    .sync-title-row {
      display: flex;
      justify-content: space-between;
      width: 100%;
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }

    .sync-bar-track {
      width: 100%;
      height: 10px;
      background: rgba(255, 255, 255, 0.12);
      border-radius: 6px;
      overflow: hidden;
      position: relative;
    }

    .sync-bar-fill {
      height: 100%;
      width: 100%;
      background: linear-gradient(90deg, #ff007f, #ffc837 50%, #00e5ff);
      border-radius: 6px;
      transition: width 0.15s ease-out;
      box-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
    }

    /* Wing Thrust Balance */
    .wing-balance-row {
      display: flex;
      justify-content: space-between;
      width: 100%;
      margin-top: 8px;
      font-size: 11px;
      color: rgba(255, 255, 255, 0.7);
    }

    .wing-indicator {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .wing-mini-bar {
      width: 45px;
      height: 5px;
      background: rgba(255, 255, 255, 0.15);
      border-radius: 3px;
      overflow: hidden;
    }

    .wing-mini-fill {
      height: 100%;
      width: 0%;
      border-radius: 3px;
      transition: width 0.1s;
    }

    #p1-wing-bar {
      background: var(--cyan);
      box-shadow: 0 0 6px var(--cyan);
    }

    #p2-wing-bar {
      background: var(--magenta);
      box-shadow: 0 0 6px var(--magenta);
    }

    /* Center Prompts & Stall Warning */
    .center-notice-area {
      align-self: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      pointer-events: none;
    }

    .stall-banner {
      background: rgba(255, 51, 85, 0.88);
      backdrop-filter: blur(10px);
      border: 2px solid #ffffff;
      border-radius: 16px;
      padding: 16px 36px;
      font-size: 20px;
      font-weight: 800;
      color: #ffffff;
      text-align: center;
      animation: pulseAlert 0.4s infinite alternate;
      display: none;
      box-shadow: 0 0 40px rgba(255, 51, 85, 0.9);
    }

    .stall-banner.show {
      display: block;
    }

    @keyframes pulseAlert {
      from {
        transform: scale(1.0);
      }

      to {
        transform: scale(1.06);
      }
    }

    .prompt-banner {
      background: var(--glass-bg);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 30px;
      padding: 10px 26px;
      font-size: 15px;
      font-weight: 700;
      display: none;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }

    .prompt-banner.show {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .prompt-banner.success {
      background: rgba(0, 240, 118, 0.82);
      color: #022010;
      border-color: #ffffff;
      box-shadow: 0 0 25px rgba(0, 240, 118, 0.6);
    }

    .prompt-banner.warning {
      background: rgba(255, 170, 0, 0.88);
      color: #201200;
      border-color: #ffffff;
      box-shadow: 0 0 25px rgba(255, 170, 0, 0.6);
    }

    /* Fullscreen Damage Vignette */
    .damage-vignette {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: 45;
      opacity: 0;
      box-shadow: inset 0 0 130px 45px rgba(255, 0, 55, 0.75);
      transition: opacity 0.2s ease-out;
    }

    .damage-vignette.active {
      opacity: 1;
    }

    /* Explosive Viewport Impact Screen Shake */
    @keyframes screen-impact {
      0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
      }

      12% {
        transform: translate3d(-14px, -10px, 0) rotate(-1.8deg);
      }

      24% {
        transform: translate3d(12px, 11px, 0) rotate(1.4deg);
      }

      38% {
        transform: translate3d(-10px, 8px, 0) rotate(-1.0deg);
      }

      52% {
        transform: translate3d(8px, -6px, 0) rotate(0.7deg);
      }

      68% {
        transform: translate3d(-5px, 4px, 0) rotate(-0.4deg);
      }

      82% {
        transform: translate3d(3px, -2px, 0) rotate(0.2deg);
      }

      100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
      }
    }

    body.screen-impact-shake #game-container,
    body.screen-impact-shake #hud-overlay {
      animation: screen-impact 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    }

    /* Floating Combat Damage Popups */
    .floating-combat-layer {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: 55;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .floating-damage-pop {
      position: absolute;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 24px;
      background: rgba(26, 4, 8, 0.90);
      border: 2px solid #ff1744;
      border-radius: 24px;
      box-shadow: 0 0 40px rgba(255, 23, 68, 0.9), inset 0 0 16px rgba(255, 0, 55, 0.5);
      backdrop-filter: blur(10px);
      font-family: 'Outfit', -apple-system, sans-serif;
      animation: damage-float-up 1.1s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
      pointer-events: none;
    }

    .damage-pop-icon {
      font-size: 28px;
    }

    .damage-pop-label {
      font-size: 16px;
      font-weight: 800;
      color: #ffebee;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .damage-pop-num {
      font-size: 30px;
      font-weight: 900;
      color: #ff1744;
      text-shadow: 0 0 14px rgba(255, 23, 68, 0.95);
    }

    @keyframes damage-float-up {
      0% {
        opacity: 0;
        transform: translateY(25px) scale(0.6);
      }

      20% {
        opacity: 1;
        transform: translateY(-12px) scale(1.18);
      }

      40% {
        transform: translateY(-28px) scale(1.0);
      }

      100% {
        opacity: 0;
        transform: translateY(-85px) scale(0.88);
      }
    }

    /* Exhaustion Banner */
    .exhaust-banner {
      display: none;
      background: rgba(230, 110, 0, 0.92);
      backdrop-filter: blur(12px);
      border: 2px solid #ffcc00;
      border-radius: 16px;
      padding: 12px 28px;
      color: #fff;
      font-size: 17px;
      font-weight: 800;
      text-align: center;
      box-shadow: 0 0 35px rgba(255, 140, 0, 0.8);
      animation: pulse-warning 0.8s infinite alternate;
      pointer-events: none;
    }

    .exhaust-banner.show {
      display: block;
    }

    /* Threat Radar Indicator */
    .threat-radar {
      display: none;
      background: rgba(20, 5, 25, 0.90);
      backdrop-filter: blur(14px);
      border: 2px solid #ff0055;
      border-radius: 20px;
      padding: 10px 22px;
      box-shadow: 0 0 32px rgba(255, 0, 85, 0.75);
      animation: pulse-threat 0.7s infinite alternate;
      pointer-events: none;
    }

    .threat-radar.show {
      display: flex;
    }

    @keyframes pulse-threat {
      0% {
        transform: scale(1.0);
        box-shadow: 0 0 20px rgba(255, 0, 85, 0.5);
      }

      100% {
        transform: scale(1.04);
        box-shadow: 0 0 35px rgba(255, 0, 85, 0.95);
      }
    }

    .threat-radar-content {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .threat-arrow {
      font-size: 24px;
      color: #ff0055;
      font-weight: 900;
      transition: transform 0.12s linear;
      text-shadow: 0 0 12px #ff0055;
      transform-origin: center center;
    }

    .threat-text-box {
      display: flex;
      flex-direction: column;
    }

    .threat-title-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .threat-badge {
      font-size: 12px;
      font-weight: 800;
      color: #ff3366;
      letter-spacing: 0.5px;
    }

    .threat-dist {
      font-size: 13px;
      font-weight: 800;
      color: #ffd700;
      font-family: 'Outfit', sans-serif;
    }

    .threat-name {
      font-size: 15px;
      font-weight: 800;
      color: #ffffff;
    }

    /* Flight Status Column & Survival Card */
    .flight-status-column {
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: auto;
    }

    .survival-card {
      background: var(--glass-bg);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid var(--glass-border);
      border-radius: 18px;
      padding: 12px 18px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 250px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    }

    .vital-row {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .vital-label-box {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.5px;
      color: rgba(255, 255, 255, 0.85);
    }

    .vital-icon {
      font-size: 13px;
      margin-right: 4px;
    }

    .vital-name {
      text-transform: uppercase;
      flex: 1;
    }

    .vital-num {
      font-family: 'Outfit', sans-serif;
      font-size: 13px;
      font-weight: 800;
      color: #fff;
    }

    .vital-track {
      width: 100%;
      height: 9px;
      background: rgba(255, 255, 255, 0.12);
      border-radius: 6px;
      overflow: hidden;
      position: relative;
    }

    .vital-fill {
      height: 100%;
      width: 100%;
      border-radius: 6px;
      transition: width 0.15s cubic-bezier(0.2, 0.9, 0.3, 1);
    }

    .hp-fill {
      background: linear-gradient(90deg, #ff0055, #ff3366 50%, #00ffaa);
      box-shadow: 0 0 10px rgba(255, 0, 85, 0.6);
    }

    .stamina-fill {
      background: linear-gradient(90deg, #ffaa00, #ffdd00 60%, #00e5ff);
      box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
    }

    .stamina-fill.exhausted {
      background: #ff3300 !important;
      box-shadow: 0 0 14px rgba(255, 51, 0, 0.9) !important;
      animation: pulse-exhaust 0.6s infinite alternate;
    }

    @keyframes pulse-exhaust {
      0% {
        opacity: 0.6;
      }

      100% {
        opacity: 1.0;
      }
    }

    /* Bottom Row: Telemetry, WebCam PiP, Feet Status */
    .bottom-bar {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      width: 100%;
    }

    .telemetry-card {
      background: var(--glass-bg);
      backdrop-filter: blur(14px);
      border: 1px solid var(--glass-border);
      border-radius: 18px;
      padding: 16px 22px;
      display: flex;
      gap: 24px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    }

    .telem-item {
      display: flex;
      flex-direction: column;
    }

    .telem-label {
      font-size: 11px;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.6);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin-bottom: 2px;
    }

    .telem-value {
      font-size: 26px;
      font-weight: 800;
      font-family: 'Outfit', sans-serif;
      letter-spacing: -0.5px;
    }

    /* Foot Claw Status Cards */
    .claw-status-group {
      display: flex;
      gap: 12px;
    }

    .badge {
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 12px;
      padding: 8px 16px;
      font-size: 12px;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.7);
      transition: all 0.2s;
    }

    .badge.active {
      background: rgba(0, 240, 118, 0.25);
      border-color: var(--emerald);
      color: var(--emerald);
      box-shadow: 0 0 14px rgba(0, 240, 118, 0.4);
    }

    /* Inventory Slot Cards (Held Items in Foot Claws) */
    .claw-status-group {
      display: flex;
      gap: 12px;
    }

    .claw-card {
      background: var(--glass-bg);
      backdrop-filter: blur(14px);
      border: 1px solid var(--glass-border);
      border-radius: 16px;
      padding: 10px 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
      min-width: 170px;
      transition: all 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
    }

    .claw-card.holding {
      background: rgba(15, 30, 45, 0.9);
      border-color: var(--gold);
      box-shadow: 0 0 18px rgba(255, 200, 50, 0.35);
      transform: translateY(-2px);
    }

    .claw-card.dual-holding {
      background: rgba(30, 20, 45, 0.95);
      border-color: #ffaa00;
      box-shadow: 0 0 24px rgba(255, 170, 0, 0.5);
    }

    .claw-icon {
      font-size: 24px;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
      transition: transform 0.15s ease;
    }

    .claw-icon .bird-foot-svg {
      transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .claw-card.active .claw-icon .bird-foot-svg {
      transform: scale(1.15) translateY(2px);
      filter: drop-shadow(0 0 6px #00f076);
    }

    .claw-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .claw-label {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: rgba(255, 255, 255, 0.6);
    }

    .claw-item-name {
      font-size: 13px;
      font-weight: 800;
      color: #fff;
    }

    .claw-item-name.empty {
      color: rgba(255, 255, 255, 0.4);
      font-weight: 600;
    }

    .pip-container {
      background: rgba(10, 15, 25, 0.85);
      backdrop-filter: blur(16px);
      border: 2px solid rgba(0, 229, 255, 0.35);
      border-radius: 18px;
      overflow: hidden;
      width: 280px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.2);
      display: flex;
      flex-direction: column;
    }

    .pip-header {
      background: rgba(0, 0, 0, 0.4);
      padding: 8px 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.5px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .pip-indicator {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #00f076;
      box-shadow: 0 0 8px #00f076;
    }

    #pip-canvas {
      width: 100%;
      height: 190px;
      display: block;
      background: #060911;
    }

    #webcam-video {
      display: none;
    }

    /* Sanctuary Quest Card (Top Right, flush with top margin) */
    .quest-card {
      position: absolute;
      top: 24px;
      right: 24px;
      background: var(--glass-bg);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid var(--glass-border);
      border-radius: 16px;
      padding: 12px 18px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      width: 220px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
      z-index: 15;
    }

    .quest-title {
      font-size: 12px;
      font-weight: 800;
      color: var(--gold);
      text-transform: uppercase;
      letter-spacing: 0.6px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .quest-row {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.85);
    }

    /* Crash & Game Over Overlay */
    .crash-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(10, 5, 12, 0.85);
      backdrop-filter: blur(20px);
      display: none;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 100;
      pointer-events: auto;
    }

    .crash-overlay.show {
      display: flex;
    }

    .crash-box {
      background: rgba(25, 15, 25, 0.9);
      border: 2px solid var(--danger);
      border-radius: 24px;
      padding: 40px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      max-width: 480px;
      box-shadow: 0 0 60px rgba(255, 51, 85, 0.6);
      animation: popIn 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
    }

    @keyframes popIn {
      from {
        transform: scale(0.8);
        opacity: 0;
      }

      to {
        transform: scale(1.0);
        opacity: 1;
      }
    }

    .crash-icon {
      font-size: 54px;
      margin-bottom: 12px;
    }

    .crash-title {
      font-size: 28px;
      font-weight: 800;
      color: var(--danger);
      margin-bottom: 8px;
    }

    .crash-desc {
      font-size: 15px;
      line-height: 1.5;
      color: rgba(255, 255, 255, 0.8);
      margin-bottom: 24px;
    }

    /* Help & Guide Modal */
    .help-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(5, 10, 20, 0.9);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 500;
      pointer-events: auto;
      overflow-y: auto;
      padding: 30px 16px;
      box-sizing: border-box;
    }

    .help-modal.hidden {
      display: none !important;
    }

    .help-content {
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: 24px;
      padding: 36px;
      max-width: 680px;
      width: 90%;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    }

    .help-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
    }

    .help-header h2 {
      font-size: 22px;
      font-weight: 800;
      color: var(--cyan);
    }

    .help-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-bottom: 24px;
    }

    .help-card {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 16px;
      padding: 16px;
    }

    .help-card h3 {
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .help-card.p1 h3 {
      color: var(--cyan);
    }

    .help-card.p2 h3 {
      color: var(--magenta);
    }

    .help-card p {
      font-size: 12px;
      line-height: 1.6;
      color: rgba(255, 255, 255, 0.8);
    }

    .rules-list {
      background: rgba(255, 200, 50, 0.08);
      border: 1px solid rgba(255, 200, 50, 0.25);
      border-radius: 16px;
      padding: 16px 20px;
      margin-bottom: 24px;
      font-size: 13px;
      line-height: 1.7;
    }

    .rules-list li {
      margin-left: 18px;
      margin-bottom: 6px;
    }

    .btn-close {
      width: 100%;
      padding: 12px;
      background: var(--cyan);
      color: #051020;
      border: none;
      border-radius: 12px;
      font-size: 15px;
      font-weight: 800;
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-close:hover {
      background: #33eeff;
      box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
    }

    /* 3D Graphics Settings Modal Styles */
    .graphics-modal-content {
      max-width: 740px !important;
      max-height: 88vh;
      display: flex;
      flex-direction: column;
      padding: 28px !important;
      overflow: hidden;
    }

    .gfx-scroll-body {
      overflow-y: auto;
      max-height: calc(88vh - 160px);
      padding-right: 8px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .gfx-scroll-body::-webkit-scrollbar {
      width: 6px;
    }

    .gfx-scroll-body::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 3px;
    }

    .gfx-scroll-body::-webkit-scrollbar-thumb {
      background: rgba(0, 229, 255, 0.4);
      border-radius: 3px;
    }

    .gfx-section {
      background: rgba(255, 255, 255, 0.035);
      border: 1px solid rgba(255, 255, 255, 0.09);
      border-radius: 16px;
      padding: 16px 18px;
    }

    .settings-quick-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .settings-action-card {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 14px;
      padding: 12px 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      transition: all 0.2s ease;
    }

    .settings-action-card:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.25);
    }

    .settings-card-info {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .settings-card-title {
      font-size: 13px;
      font-weight: 700;
      color: #ffffff;
    }

    .settings-card-desc {
      font-size: 11px;
      color: rgba(255, 255, 255, 0.65);
    }

    .settings-ctrl-btn {
      padding: 8px 16px !important;
      font-size: 12px !important;
      border-radius: 10px !important;
      white-space: nowrap;
      min-width: 115px;
      justify-content: center;
    }

    .exit-ctrl-btn {
      border-color: rgba(255, 80, 80, 0.5) !important;
      color: #ff6b81 !important;
      background: rgba(255, 80, 80, 0.12) !important;
    }

    .exit-ctrl-btn:hover {
      border-color: rgba(255, 80, 80, 0.85) !important;
      background: rgba(255, 80, 80, 0.25) !important;
      color: #ff8599 !important;
      box-shadow: 0 0 14px rgba(255, 80, 80, 0.4) !important;
    }

    @media (max-width: 680px) {
      .settings-quick-grid {
        grid-template-columns: 1fr;
      }
    }

    .gfx-section-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--gold);
      letter-spacing: 0.5px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .gfx-preset-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .gfx-preset-btn {
      font-size: 12px;
      padding: 8px 14px;
      font-weight: 700;
      background: rgba(0, 229, 255, 0.08);
      border: 1px solid rgba(0, 229, 255, 0.35);
      color: #fff;
      cursor: pointer;
    }

    .gfx-preset-btn:hover {
      background: rgba(0, 229, 255, 0.25);
      border-color: var(--cyan);
      box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
    }

    .gfx-control-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 8px;
    }

    .gfx-label-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.9);
    }

    .gfx-val-badge {
      background: rgba(0, 229, 255, 0.15);
      border: 1px solid var(--cyan);
      border-radius: 6px;
      padding: 2px 8px;
      font-size: 11px;
      font-weight: 800;
      color: var(--cyan);
      letter-spacing: 0.5px;
    }

    .gfx-slider {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, 0.15);
      border-radius: 3px;
      outline: none;
      cursor: pointer;
      margin: 4px 0;
    }

    .gfx-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--cyan);
      cursor: pointer;
      box-shadow: 0 0 10px var(--cyan);
      transition: transform 0.1s ease;
    }

    .gfx-slider::-webkit-slider-thumb:hover {
      transform: scale(1.2);
    }

    .gfx-chip-row {
      display: flex;
      gap: 6px;
      margin-top: 4px;
      flex-wrap: wrap;
    }

    .gfx-chip {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 8px;
      padding: 3px 10px;
      font-size: 11px;
      color: rgba(255, 255, 255, 0.75);
      cursor: pointer;
      transition: all 0.15s;
    }

    .gfx-chip:hover {
      background: rgba(255, 255, 255, 0.18);
      color: #fff;
    }

    .gfx-chip.active {
      background: rgba(0, 229, 255, 0.25);
      border-color: var(--cyan);
      color: #fff;
      font-weight: 700;
      box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
    }

    .gfx-time-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
    }

    .gfx-time-card {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 12px;
      padding: 12px 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 6px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .gfx-time-card:hover {
      background: rgba(255, 255, 255, 0.1);
      transform: translateY(-2px);
    }

    .gfx-time-card.active {
      background: rgba(0, 229, 255, 0.18);
      border-color: var(--cyan);
      box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
      transform: translateY(-2px);
    }

    .gfx-time-icon {
      font-size: 24px;
    }

    .gfx-time-info strong {
      font-size: 12px;
      color: #fff;
      display: block;
    }

    .gfx-time-info span {
      font-size: 10px;
      color: rgba(255, 255, 255, 0.6);
      display: block;
      margin-top: 2px;
      line-height: 1.3;
    }

    .gfx-toggle-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 14px;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 12px;
      cursor: pointer;
      margin-top: 6px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      transition: background 0.2s;
    }

    .gfx-toggle-row:hover {
      background: rgba(255, 255, 255, 0.09);
    }

    .gfx-switch {
      width: 20px;
      height: 20px;
      cursor: pointer;
      accent-color: var(--cyan);
    }

    /* ==========================================================================
       BRIGHT & FUN ARCADE LOBBY & MULTIPLAYER ROOM STYLES
       ========================================================================== */
    .lobby-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      /* Bright cheerful arcade gradient with subtle retro dot pattern */
      background: radial-gradient(circle at 50% 20%, #1a3375 0%, #0d1e4c 45%, #08102b 100%);
      background-image: 
        radial-gradient(circle at 50% 20%, rgba(26, 75, 180, 0.4) 0%, transparent 65%),
        radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, transparent 1.5px),
        radial-gradient(rgba(0, 229, 255, 0.08) 1.5px, transparent 1.5px);
      background-size: 100% 100%, 32px 32px, 16px 16px;
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      z-index: 150;
      pointer-events: auto;
      overflow-y: auto;
      padding: 30px 20px 60px;
      box-sizing: border-box;
      animation: fadeInLobby 0.35s ease-out;
    }

    .lobby-overlay.hidden {
      display: none !important;
    }

    @keyframes fadeInLobby {
      from {
        opacity: 0;
        transform: scale(0.97);
      }
      to {
        opacity: 1;
        transform: scale(1.0);
      }
    }

    /* Top Arcade Marquee Ticker (Bright, glowing, playful) */
    .arcade-marquee-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      max-width: 1060px;
      width: 100%;
      margin-bottom: 24px;
      padding: 10px 22px;
      background: linear-gradient(135deg, #ffe600, #ff9500);
      border: 3px solid #fff;
      border-radius: 18px;
      box-shadow: 0 8px 0 #cc6600, 0 14px 28px rgba(255, 170, 0, 0.45);
      color: #3b1d00;
      font-weight: 800;
      font-size: 13px;
      z-index: 2;
    }

    .marquee-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.88);
      padding: 4px 12px;
      border-radius: 20px;
      box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
      font-size: 12px;
    }

    .marquee-center-title {
      font-family: 'Press Start 2P', monospace;
      font-size: 11px;
      letter-spacing: 1px;
      color: #2b1100;
      animation: marqueeBounce 2s infinite ease-in-out;
    }

    @keyframes marqueeBounce {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-2px); }
    }

    .lobby-header {
      text-align: center;
      margin-bottom: 28px;
      max-width: 820px;
    }

    .arcade-badge-tag {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 20px;
      background: linear-gradient(135deg, #00f0ff, #0077ff);
      border: 3px solid #ffffff;
      border-radius: 30px;
      color: #ffffff;
      font-family: 'Fredoka', 'Outfit', sans-serif;
      font-size: 13px;
      font-weight: 800;
      letter-spacing: 1px;
      text-transform: uppercase;
      box-shadow: 0 6px 0 #004bbb, 0 10px 20px rgba(0, 119, 255, 0.4);
      margin-bottom: 14px;
      transform: rotate(-1deg);
    }

    .lobby-title {
      font-family: 'Bungee', 'Fredoka', 'Outfit', sans-serif;
      font-size: 46px;
      line-height: 1.15;
      font-weight: 900;
      letter-spacing: 1px;
      background: linear-gradient(180deg, #ffffff 0%, #fffae0 30%, #ffd000 70%, #ff8c00 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      filter: drop-shadow(0 4px 0 #8f3600) drop-shadow(0 8px 20px rgba(255, 140, 0, 0.5));
      margin-bottom: 10px;
      text-transform: uppercase;
    }

    .lobby-subtitle {
      font-size: 15px;
      font-weight: 600;
      color: #e4eeff;
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
      line-height: 1.6;
    }

    /* Lobby Main Action Cards Grid (Bright Arcade Cabinets - Compact Half-Height) */
    .lobby-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 16px;
      max-width: 1060px;
      width: 100%;
      margin-bottom: 20px;
    }

    .arcade-card {
      background: linear-gradient(165deg, rgba(25, 45, 95, 0.92) 0%, rgba(14, 25, 60, 0.95) 100%);
      border: 3px solid var(--card-border, #4da3ff);
      border-radius: 18px;
      padding: 14px 18px;
      box-shadow: 0 6px 0 var(--card-shadow, #184694), 0 12px 24px rgba(0, 0, 0, 0.35);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
      position: relative;
      overflow: hidden;
    }

    .arcade-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 35px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 100%);
      pointer-events: none;
    }

    .arcade-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 9px 0 var(--card-shadow, #184694), 0 16px 30px rgba(0, 0, 0, 0.45);
    }

    .arcade-card:active {
      transform: translateY(2px);
      box-shadow: 0 4px 0 var(--card-shadow, #184694), 0 8px 14px rgba(0, 0, 0, 0.35);
    }

    /* Card Themes */
    .arcade-card.card-solo {
      --card-border: #00f076;
      --card-shadow: #007a3c;
    }
    .arcade-card.card-host {
      --card-border: #ffcc00;
      --card-shadow: #997000;
    }
    .arcade-card.card-join {
      --card-border: #ff3399;
      --card-shadow: #990050;
    }

    .arcade-card-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 6px;
    }

    .arcade-icon-bubble {
      font-size: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border-radius: 12px;
      background: #ffffff;
      border: 2px solid currentColor;
      box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(255,255,255,0.8);
      flex-shrink: 0;
    }

    .arcade-card-title {
      font-family: 'Fredoka', 'Outfit', sans-serif;
      font-size: 18px;
      font-weight: 800;
      color: #ffffff;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .arcade-mini-pill {
      font-family: 'Press Start 2P', monospace;
      font-size: 7px;
      padding: 3px 6px;
      border-radius: 6px;
      color: #fff;
      font-weight: 700;
      letter-spacing: 0.5px;
      box-shadow: 0 2px 0 rgba(0,0,0,0.3);
    }

    .arcade-card-desc {
      font-size: 12px;
      font-weight: 500;
      color: #d1e2ff;
      line-height: 1.4;
      margin-bottom: 8px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* 3D Push Button Styles (Arcade Feel - Compact) */
    .arcade-push-btn {
      position: relative;
      font-family: 'Fredoka', 'Outfit', sans-serif;
      font-size: 13.5px;
      font-weight: 800;
      letter-spacing: 0.5px;
      padding: 9px 14px;
      border-radius: 12px;
      border: 2px solid #ffffff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      text-transform: uppercase;
      transition: all 0.12s ease;
      color: #ffffff;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    }

    .arcade-push-btn:hover {
      filter: brightness(1.1);
      transform: translateY(-1px);
    }

    .arcade-push-btn:active {
      transform: translateY(3px) !important;
      box-shadow: 0 2px 0 var(--btn-shadow, #000) !important;
    }

    .btn-arcade-green {
      background: linear-gradient(180deg, #00f076 0%, #00ba58 100%);
      --btn-shadow: #006630;
      box-shadow: 0 4px 0 var(--btn-shadow), 0 6px 14px rgba(0, 240, 118, 0.3);
      color: #032b13;
      text-shadow: none;
    }

    .btn-arcade-yellow {
      background: linear-gradient(180deg, #ffcc00 0%, #ff9900 100%);
      --btn-shadow: #995500;
      box-shadow: 0 4px 0 var(--btn-shadow), 0 6px 14px rgba(255, 170, 0, 0.35);
      color: #2b1600;
      text-shadow: none;
    }

    .btn-arcade-pink {
      background: linear-gradient(180deg, #ff3399 0%, #d9006c 100%);
      --btn-shadow: #80003f;
      box-shadow: 0 4px 0 var(--btn-shadow), 0 6px 14px rgba(255, 51, 153, 0.35);
      color: #ffffff;
    }

    .btn-arcade-blue {
      background: linear-gradient(180deg, #00e5ff 0%, #0099cc 100%);
      --btn-shadow: #005573;
      box-shadow: 0 4px 0 var(--btn-shadow), 0 6px 14px rgba(0, 229, 255, 0.3);
      color: #002b3a;
      text-shadow: none;
    }

    /* Room List Container (Arcade Hall Board) */
    .room-list-box {
      background: linear-gradient(165deg, rgba(20, 38, 80, 0.9) 0%, rgba(10, 20, 50, 0.95) 100%);
      border: 3px solid #ffcc00;
      border-radius: 24px;
      padding: 24px;
      max-width: 1060px;
      width: 100%;
      box-shadow: 0 10px 0 #997000, 0 20px 40px rgba(0, 0, 0, 0.45);
    }

    .room-list-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
      padding-bottom: 14px;
      border-bottom: 2px dashed rgba(255, 204, 0, 0.35);
    }

    .room-list-title {
      font-family: 'Fredoka', 'Outfit', sans-serif;
      font-size: 20px;
      font-weight: 800;
      color: #ffd000;
      display: flex;
      align-items: center;
      gap: 10px;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    }

    .room-items-table {
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-height: 270px;
      overflow-y: auto;
      padding-right: 6px;
    }

    .room-item-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgba(255, 255, 255, 0.08);
      border: 2px solid rgba(255, 255, 255, 0.16);
      border-radius: 16px;
      padding: 14px 18px;
      transition: all 0.2s;
    }

    .room-item-row:hover {
      background: rgba(255, 204, 0, 0.15);
      border-color: #ffd000;
      transform: translateX(4px);
    }

    .room-item-meta {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .room-badge-lock {
      padding: 5px 10px;
      border-radius: 10px;
      font-size: 11px;
      font-weight: 800;
      box-shadow: 0 2px 0 rgba(0,0,0,0.2);
    }

    .room-badge-lock.public {
      background: #00f076;
      color: #023315;
    }

    .room-badge-lock.private {
      background: #ffd000;
      color: #332000;
    }

    .room-empty-text {
      text-align: center;
      padding: 34px 14px;
      font-size: 14px;
      font-weight: 600;
      color: #d1e2ff;
      line-height: 1.8;
    }

    /* Modal Forms (Arcade Style) */
    .form-group {
      margin-bottom: 18px;
    }

    .form-label {
      display: block;
      font-family: 'Fredoka', 'Outfit', sans-serif;
      font-size: 13.5px;
      font-weight: 800;
      color: #ffde59;
      margin-bottom: 8px;
      letter-spacing: 0.5px;
      text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    }

    .form-input {
      width: 100%;
      background: #ffffff;
      border: 3px solid #ffd000;
      border-radius: 14px;
      color: #1a2a48;
      padding: 12px 16px;
      font-size: 15px;
      font-weight: 700;
      font-family: inherit;
      box-sizing: border-box;
      outline: none;
      box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.15);
      transition: all 0.2s;
    }

    .form-input:focus {
      border-color: #00f0ff;
      box-shadow: 0 0 14px rgba(0, 240, 255, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .form-segmented {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
      gap: 10px;
    }

    .segmented-btn {
      padding: 12px 10px;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.12);
      border: 2px solid rgba(255, 255, 255, 0.25);
      color: #e1edff;
      font-size: 13px;
      font-weight: 800;
      text-align: center;
      cursor: pointer;
      box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
      transition: all 0.15s;
    }

    .segmented-btn:hover {
      background: rgba(255, 255, 255, 0.2);
      transform: translateY(-2px);
    }

    .segmented-btn.active {
      background: linear-gradient(180deg, #ffdd00 0%, #ffaa00 100%);
      border-color: #ffffff;
      color: #2e1700;
      box-shadow: 0 5px 0 #995c00;
      transform: translateY(-1px);
    }

    /* Room Waiting Screen Player Cards */
    .room-players-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
      margin-bottom: 24px;
    }

    .player-slot-card {
      background: rgba(255, 255, 255, 0.08);
      border: 3px dashed rgba(255, 255, 255, 0.3);
      border-radius: 22px;
      padding: 22px 18px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      transition: all 0.3s;
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    }

    .player-slot-card.occupied {
      background: linear-gradient(165deg, rgba(20, 50, 110, 0.95), rgba(10, 30, 80, 0.98));
      border-style: solid;
      border-color: #00f0ff;
      box-shadow: 0 8px 0 #006b99, 0 14px 28px rgba(0, 240, 255, 0.25);
    }

    .player-slot-card.p2-slot.occupied {
      border-color: #ff3399;
      box-shadow: 0 8px 0 #990050, 0 14px 28px rgba(255, 51, 153, 0.25);
    }

    .player-avatar-circle {
      width: 72px;
      height: 72px;
      border-radius: 50%;
      background: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 36px;
      margin-bottom: 12px;
      border: 3px solid #ffd000;
      box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2), inset 0 2px 6px rgba(255,255,255,0.8);
    }

    .player-slot-card.occupied .player-avatar-circle {
      border-color: #00f0ff;
    }

    .player-slot-card.p2-slot.occupied .player-avatar-circle {
      border-color: #ff3399;
    }

    .player-status-tag {
      font-family: 'Fredoka', 'Outfit', sans-serif;
      font-size: 12px;
      font-weight: 800;
      padding: 6px 14px;
      border-radius: 20px;
      margin-top: 10px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      box-shadow: 0 3px 0 rgba(0,0,0,0.25);
    }

    .player-status-tag.ready {
      background: #00f076;
      color: #023616;
    }

    .player-status-tag.waiting {
      background: #ffd000;
      color: #382100;
      animation: marqueeBounce 1.5s infinite ease-in-out;
    }

    /* Responsive HUD adjustments to prevent overlapping on any screen size */
    @media (max-width: 1240px) {
      .sync-meter-box {
        top: 76px;
      }

      .quest-card {
        top: 172px;
      }
    }

    @media (max-width: 860px) {
      .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
      }

      .action-group {
        flex-wrap: wrap;
      }

      .sync-meter-box {
        top: 130px;
      }

      .quest-card {
        top: 225px;
      }
    }

    /* Stage Cinematic Intro Banner */
    .stage-intro-banner {
      position: absolute;
      top: 16%;
      left: 50%;
      transform: translateX(-50%);
      z-index: 100;
      pointer-events: none;
      transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .stage-intro-banner.hidden {
      opacity: 0;
      transform: translate(-50%, -24px);
      pointer-events: none;
    }

    .stage-intro-content {
      background: rgba(8, 14, 28, 0.85);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(0, 255, 204, 0.35);
      border-radius: 24px;
      padding: 24px 38px;
      text-align: center;
      min-width: 360px;
      max-width: 540px;
      box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), 0 0 35px rgba(0, 255, 204, 0.2);
    }

    .stage-intro-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(0, 255, 204, 0.12);
      border: 1px solid rgba(0, 255, 204, 0.3);
      border-radius: 20px;
      padding: 4px 14px;
      font-size: 12px;
      font-weight: 800;
      color: #00ffcc;
      letter-spacing: 2px;
      text-transform: uppercase;
      margin-bottom: 8px;
    }

    .stage-intro-title {
      font-size: 28px;
      font-weight: 900;
      color: #fff;
      margin: 0 0 4px 0;
      letter-spacing: 0.5px;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .stage-intro-subtitle {
      font-size: 13px;
      font-weight: 800;
      color: var(--gold);
      letter-spacing: 3px;
      text-transform: uppercase;
      margin-bottom: 12px;
    }

    .stage-intro-desc {
      font-size: 14px;
      color: rgba(255, 255, 255, 0.85);
      line-height: 1.5;
      margin: 0 0 14px 0;
    }

    .stage-intro-goal-box {
      background: rgba(255, 200, 50, 0.12);
      border: 1px solid rgba(255, 200, 50, 0.35);
      border-radius: 12px;
      padding: 8px 16px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
    }

    .stage-intro-goal-box .goal-label {
      font-weight: 800;
      color: var(--gold);
    }

    .stage-intro-goal-box .goal-text {
      color: #fff;
      font-weight: 600;
    }

    .quest-stage-badge {
      font-size: 11px;
      font-weight: 800;
      color: #00ffcc;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 4px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* ==========================================================================
       Mission Box (Quest Card) Tutorial Integration & Floating Tooltip Styles
       ========================================================================== */
    .quest-card {
      position: absolute;
      top: 24px;
      right: 24px;
      background: var(--glass-bg);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid var(--glass-border);
      border-radius: 16px;
      padding: 12px 18px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      width: 250px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
      z-index: 15;
      transition: all 0.3s ease;
    }

    .quest-card.tutorial-active {
      border: 2px solid rgba(0, 240, 118, 0.6);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 25px rgba(0, 240, 118, 0.2);
    }

    .quest-tutorial-content {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .tut-mission-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .tut-step-badge {
      background: linear-gradient(135deg, #00f076, #00e5ff);
      color: #021a10;
      font-size: 11px;
      font-weight: 900;
      padding: 2.5px 8px;
      border-radius: 10px;
      letter-spacing: 0.8px;
      box-shadow: 0 2px 6px rgba(0, 240, 118, 0.35);
    }

    .tut-skip-text-btn {
      background: transparent;
      border: none;
      color: rgba(255, 255, 255, 0.65);
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      padding: 2px 4px;
      transition: color 0.2s ease;
    }

    .tut-skip-text-btn:hover {
      color: #00e5ff;
      text-decoration: underline;
    }

    .tut-mission-title {
      font-size: 13.5px;
      font-weight: 800;
      color: #ffffff;
      line-height: 1.35;
      letter-spacing: 0.2px;
    }

    .tut-mission-progress-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11.5px;
    }

    .tut-goal-label {
      font-weight: 800;
      color: var(--gold);
    }

    .tut-progress-text {
      font-weight: 800;
      color: #00f076;
    }

    .tut-progress-track {
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, 0.12);
      border-radius: 8px;
      overflow: hidden;
    }

    .tut-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #00c853, #00f076, #00e5ff);
      border-radius: 8px;
      transition: width 0.35s cubic-bezier(0.3, 1.2, 0.4, 1);
      box-shadow: 0 0 10px rgba(0, 240, 118, 0.6);
    }

    .tut-checklist {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-top: 2px;
    }

    .tut-check-item {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 6px;
      padding: 3px 8px;
      font-size: 11px;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.7);
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: all 0.25s ease;
    }

    .tut-check-item.done {
      background: rgba(0, 240, 118, 0.15);
      border-color: #00f076;
      color: #00f076;
      font-weight: 800;
      box-shadow: 0 0 10px rgba(0, 240, 118, 0.2);
    }

    /* Floating Tooltip Style Guide: Positioned directly underneath the Mission Box */
    .tut-guide-tooltip {
      position: absolute;
      top: calc(100% + 12px);
      right: 0;
      width: 100%;
      min-width: 250px;
      background: rgba(11, 19, 36, 0.95);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(0, 229, 255, 0.5);
      border-radius: 14px;
      padding: 12px 14px;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 229, 255, 0.2);
      pointer-events: auto;
      animation: tutTooltipFloat 0.3s ease-out;
      z-index: 100;
    }

    /* Tooltip Upward Arrow pointing up towards the mission box */
    .tut-guide-tooltip::after {
      content: '';
      position: absolute;
      top: -7px;
      right: 28px;
      width: 12px;
      height: 12px;
      background: rgba(11, 19, 36, 0.95);
      border-top: 1px solid rgba(0, 229, 255, 0.5);
      border-left: 1px solid rgba(0, 229, 255, 0.5);
      transform: rotate(45deg);
    }

    @keyframes tutTooltipFloat {
      from {
        opacity: 0;
        transform: translateY(-8px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Webcam PiP Wrapper & External Actions Row */
    .pip-wrapper {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 6px;
      pointer-events: auto;
    }

    .pip-actions-row {
      display: flex;
      justify-content: flex-end;
      width: 100%;
    }

    /* Settings Button outside Webcam Box */
    .pip-settings-btn {
      background: rgba(10, 15, 25, 0.85);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid rgba(0, 229, 255, 0.4);
      color: #00e5ff;
      border-radius: 8px;
      padding: 5px 12px;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
      transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .pip-settings-btn:hover {
      background: rgba(0, 229, 255, 0.22);
      border-color: #00e5ff;
      color: #ffffff;
      box-shadow: 0 0 14px rgba(0, 229, 255, 0.5);
      transform: translateY(-1px);
    }

    .tut-tooltip-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      padding-bottom: 6px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .tut-tooltip-tag {
      font-size: 11.5px;
      font-weight: 800;
      color: #00e5ff;
      letter-spacing: 0.4px;
    }

    .tut-tooltip-sub {
      font-size: 10.5px;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.55);
    }

    .tut-tooltip-body {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .tut-inst-row {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      padding: 6px 8px;
    }

    .tut-inst-desc {
      font-size: 11.5px;
      line-height: 1.45;
      color: rgba(255, 255, 255, 0.88);
    }

    .tut-inst-desc strong {
      color: #fff;
    }

    .tut-inst-desc em {
      font-size: 10.5px;
      color: rgba(255, 255, 255, 0.6);
      font-style: normal;
    }

    .tut-key {
      display: inline-block;
      background: rgba(255, 255, 255, 0.18);
      border: 1px solid rgba(255, 255, 255, 0.4);
      border-bottom: 2px solid #00e5ff;
      border-radius: 5px;
      padding: 1px 6px;
      font-size: 11px;
      font-weight: 900;
      font-family: var(--font-main);
      color: #fff;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
      vertical-align: baseline;
    }

    .tut-tooltip-tip {
      font-size: 11px;
      line-height: 1.4;
      color: rgba(255, 200, 50, 0.95);
      background: rgba(255, 200, 50, 0.08);
      border: 1px solid rgba(255, 200, 50, 0.25);
      border-radius: 7px;
      padding: 6px 8px;
      margin-top: 2px;
    }

