    /* Full height dashboard container */
    .app-container {
      max-width: 1360px;
      margin: 16px auto 48px;
      padding: 0 16px;
    }

    /* Auth Gate Card (When logged out) */
    .auth-gate {
      text-align: center;
      padding: 56px 24px;
      background: linear-gradient(180deg, rgba(255,189,90,.07) 0%, rgba(20,24,35,.85) 100%);
      border: 2px dashed rgba(255,189,90,.3);
      border-radius: 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      max-width: 820px;
      margin: 40px auto;
    }
    .auth-gate-icon {
      width: 72px;
      height: 72px;
      background: rgba(255,189,90,.12);
      border: 1px solid rgba(255,189,90,.4);
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: var(--gold);
      font-size: 32px;
      box-shadow: 0 0 28px rgba(255,189,90,.25);
    }
    .auth-gate h2 {
      font-family: var(--display);
      font-size: clamp(24px, 4vw, 32px);
      color: var(--ink);
      margin: 0;
    }
    .auth-gate p {
      max-width: 600px;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.6;
      margin: 0;
    }
    .auth-perks {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 12px;
      max-width: 740px;
      width: 100%;
      margin: 12px 0;
      text-align: left;
    }
    .perk-item {
      background: var(--surface-2);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 12px 14px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
    }
    .perk-ico { font-size: 20px; line-height: 1; }
    .perk-text b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 2px; }
    .perk-text span { font-size: 12px; color: var(--dim); line-height: 1.35; display: block; }

    .btn-google-login {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      background: #ffffff;
      color: #1f2937;
      padding: 14px 28px;
      border-radius: 10px;
      font: 700 15px/1 var(--body);
      border: none;
      cursor: pointer;
      box-shadow: 0 4px 16px rgba(0,0,0,.35), 0 0 0 2px rgba(255,255,255,.15);
      transition: all .2s ease;
    }
    .btn-google-login:hover {
      background: #f3f4f6;
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 2px var(--gold);
    }
    .btn-google-login svg { width: 20px; height: 20px; }

    /* 3-Column Console Hub Shell (Logged in) */
    .dashboard-layout {
      display: grid;
      grid-template-columns: 255px minmax(0, 1fr) 260px;
      gap: 16px;
      align-items: start;
    }
    @media (max-width: 1200px) {
      .dashboard-layout:not(.in-game) {
        grid-template-columns: 240px minmax(0, 1fr) 245px;
        gap: 14px;
      }
    }
    @media (max-width: 960px) {
      .dashboard-layout:not(.in-game) {
        grid-template-columns: 220px minmax(0, 1fr);
      }
      .dashboard-layout:not(.in-game) .right-sidebar {
        grid-column: 1 / -1;
        order: 3;
      }
    }
    @media (max-width: 680px) {
      .dashboard-layout:not(.in-game) {
        grid-template-columns: 1fr;
      }
    }

    /* In-Game Mode: Keep Left Sidebar visible for persistent console navigation */
    .dashboard-layout.in-game {
      grid-template-columns: 255px minmax(0, 1fr) 260px;
      gap: 16px;
    }
    .dashboard-layout.in-game .right-sidebar {
      position: sticky;
      top: 80px;
    }
    @media (max-width: 1200px) {
      .dashboard-layout.in-game {
        grid-template-columns: 240px minmax(0, 1fr) 245px;
        gap: 14px;
      }
    }
    @media (max-width: 960px) {
      .dashboard-layout.in-game {
        grid-template-columns: 220px minmax(0, 1fr);
      }
      .dashboard-layout.in-game .right-sidebar {
        grid-column: 1 / -1;
        order: 3;
      }
    }
    @media (max-width: 680px) {
      .dashboard-layout.in-game {
        grid-template-columns: 1fr;
      }
    }

    /* Left Menu (Sidebar) */
    .sidebar {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 16px;
      box-shadow: 0 10px 30px rgba(0,0,0,.35);
      position: sticky;
      top: 80px;
    }
    .sidebar-add-btn {
      width: 100%;
      background: var(--gold);
      color: #10131b;
      font: 700 14.5px/1 var(--display);
      padding: 14px 16px;
      border-radius: 10px;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 4px 14px rgba(255,189,90,.3);
      transition: all .15s ease;
      margin-bottom: 20px;
    }
    .sidebar-add-btn:hover {
      background: var(--gold-2);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(255,189,90,.45);
    }

    .sidebar-section-title {
      font: 700 11px/1 var(--display);
      text-transform: uppercase;
      letter-spacing: .08em;
      color: var(--dim);
      padding: 0 8px 8px;
      margin-top: 10px;
    }

    .nav-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .nav-item-btn {
      width: 100%;
      background: transparent;
      border: 1px solid transparent;
      color: var(--text);
      font: 600 12.5px/1.3 var(--body);
      padding: 9px 10px;
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      transition: all .15s ease;
      text-align: left;
    }
    .nav-item-btn:hover {
      background: var(--surface-2);
      color: var(--ink);
    }
    .nav-item-btn.active {
      background: rgba(255,189,90,.15);
      border-color: var(--gold);
      color: var(--gold);
      font-weight: 700;
    }
    .nav-item-left {
      display: flex;
      align-items: center;
      gap: 8px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .nav-item-badges {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }
    .nav-live-player-badge {
      display: none;
      align-items: center;
      gap: 4px;
      background: rgba(34, 197, 94, 0.12);
      border: 1px solid rgba(34, 197, 94, 0.32);
      color: #4ade80;
      font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
      padding: 3px 6px;
      border-radius: 999px;
      box-shadow: 0 0 8px rgba(34, 197, 94, 0.12);
      transition: all .2s ease;
      white-space: nowrap;
      user-select: none;
    }
    .nav-live-player-badge .live-dot-pulse {
      width: 6px;
      height: 6px;
      background: #22c55e;
      border-radius: 50%;
      display: inline-block;
      box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
      animation: navPulseGreen 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    }
    @keyframes navPulseGreen {
      0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.75);
      }
      70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
      }
      100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
      }
    }
    .nav-item-btn.active .nav-live-player-badge {
      background: rgba(34, 197, 94, 0.22);
      border-color: rgba(34, 197, 94, 0.55);
    }
    .nav-badge-count {
      background: rgba(255,255,255,.08);
      font: 700 11px/1 ui-monospace,monospace;
      padding: 2px 7px;
      border-radius: 10px;
      color: var(--muted);
    }
    .nav-item-btn.active .nav-badge-count {
      background: var(--gold);
      color: #10131b;
    }
    .nav-hot-pill {
      background: #ef4444;
      color: #fff;
      font: 800 9.5px/1 var(--display);
      padding: 2px 5px;
      border-radius: 4px;
      letter-spacing: 0.02em;
    }

    /* Room Chat Module Styling */
    .quick-chat-chip {
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      color: #cbd5e1;
      font-size: 10.5px;
      font-weight: 600;
      padding: 3px 7px;
      border-radius: 999px;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      transition: all .15s ease;
      line-height: 1.2;
    }
    .quick-chat-chip:hover {
      background: rgba(255,189,90,0.2);
      border-color: var(--gold);
      color: var(--gold);
      transform: translateY(-1px);
    }
    #room-chat-messages::-webkit-scrollbar {
      width: 4px;
    }
    #room-chat-messages::-webkit-scrollbar-thumb {
      background: rgba(255,189,90,0.3);
      border-radius: 4px;
    }

    /* User Profile in Sidebar */
    .sidebar-user {
      margin-top: 24px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .sidebar-user-info {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .sidebar-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--gold);
      color: #10131b;
      display: grid;
      place-items: center;
      font-weight: 700;
      font-size: 14px;
      overflow: hidden;
      flex-shrink: 0;
    }
    .sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .sidebar-username {
      font-size: 13px;
      font-weight: 700;
      color: var(--ink);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .btn-icon-signout {
      background: transparent;
      border: 1px solid var(--line);
      color: var(--dim);
      border-radius: 6px;
      padding: 5px 8px;
      cursor: pointer;
      font-size: 12px;
      transition: all .15s;
    }
    .btn-icon-signout:hover {
      border-color: #f87171;
      color: #f87171;
    }

    /* Right Sidebar (Controls & Gamepad Menu) */
    .right-sidebar {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 16px;
      box-shadow: 0 10px 30px rgba(0,0,0,.35);
      position: sticky;
      top: 80px;
    }
    .right-section-title {
      font: 700 12px/1 var(--display);
      text-transform: uppercase;
      letter-spacing: .08em;
      color: var(--gold);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .gp-status-card {
      background: var(--bg-2);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px 12px;
      font-size: 12.5px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
    }
    .key-guide-table {
      width: 100%;
      font-size: 12px;
      border-collapse: collapse;
      margin-bottom: 14px;
    }
    .key-guide-table tr {
      border-bottom: 1px solid rgba(255,255,255,.05);
    }
    .key-guide-table tr:last-child {
      border-bottom: none;
    }
    .key-guide-table td {
      padding: 5px 0;
      color: var(--muted);
    }
    .key-guide-table td:last-child {
      text-align: right;
    }
    .kbd-btn {
      display: inline-block;
      background: #090c12;
      border: 1px solid #3d465c;
      border-bottom-width: 2px;
      color: #fff;
      padding: 1px 6px;
      border-radius: 4px;
      font: 700 11px monospace;
    }
    .hardware-tip {
      font-size: 12px;
      color: var(--dim);
      line-height: 1.5;
      background: rgba(255,189,90,.05);
      border: 1px dashed rgba(255,189,90,.2);
      border-radius: 8px;
      padding: 10px;
    }

    /* Main Area */
    .content-area {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 20px 24px;
      min-height: 600px;
      box-shadow: 0 10px 30px rgba(0,0,0,.35);
      position: relative;
    }

    /* Main Top Bar */
    .main-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--line);
      flex-wrap: wrap;
    }
    .main-title {
      font: 700 20px/1.2 var(--display);
      color: var(--ink);
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 0;
    }
    .main-search-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1;
      max-width: 320px;
    }
    .main-search {
      width: 100%;
      background: var(--bg-2);
      border: 1px solid var(--line);
      color: var(--ink);
      padding: 8px 12px;
      border-radius: 8px;
      font: 13.5px var(--body);
      outline: none;
      transition: border-color .15s;
    }
    .main-search:focus {
      border-color: var(--gold);
    }

    /* Games List - Streamlined Horizontal Row Layout */
    .games-grid {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .game-card {
      background: var(--bg-2);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 12px 18px;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      transition: all .2s ease;
      position: relative;
      overflow: hidden;
    }
    .game-card:hover {
      border-color: rgba(255, 189, 90, 0.5);
      background: var(--surface-2);
      transform: translateX(3px);
      box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    }
    .game-row-left {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
      flex: 1;
    }
    .game-thumb-box {
      width: 48px;
      height: 48px;
      min-width: 48px;
      border-radius: 9px;
      background: #090d16;
      border: 1px solid var(--line);
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      flex-shrink: 0;
    }
    .game-thumb-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      image-rendering: auto;
    }
    .game-thumb-icon {
      font-size: 24px;
      opacity: 0.85;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .game-row-info {
      display: flex;
      flex-direction: column;
      gap: 5px;
      min-width: 0;
      flex: 1;
    }
    .game-row-title-line {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .game-name {
      font: 700 15px/1.3 var(--display);
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .game-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 12.5px;
      color: var(--dim);
    }
    .game-row-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .btn-play-single {
      background: var(--gold);
      color: #0d121f;
      font-weight: 700;
      font-size: 13px;
      padding: 7px 16px;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all .15s ease;
    }
    .btn-play-single:hover {
      background: #e69d27;
      transform: translateY(-1px);
    }
    .btn-play-lan {
      background: rgba(59, 130, 246, 0.15);
      border: 1px solid rgba(59, 130, 246, 0.4);
      color: #60a5fa;
      font-weight: 700;
      font-size: 13px;
      padding: 7px 14px;
      border-radius: 8px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all .15s ease;
    }
    .btn-play-lan:hover {
      background: rgba(59, 130, 246, 0.25);
      border-color: #60a5fa;
      transform: translateY(-1px);
    }
    .btn-trash {
      background: transparent;
      border: none;
      color: #f43f5e;
      opacity: 0.6;
      font-size: 15px;
      cursor: pointer;
      padding: 6px 8px;
      border-radius: 6px;
      transition: all .15s ease;
    }
    .btn-trash:hover {
      opacity: 1;
      background: rgba(244, 63, 94, 0.15);
    }
    @media (max-width: 640px) {
      .game-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
      }
      .game-row-actions {
        width: 100%;
        justify-content: flex-end;
      }
    }

    .card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
    }
    .sys-pill {
      font: 800 11px/1 ui-monospace,monospace;
      padding: 3px 8px;
      border-radius: 6px;
      text-transform: uppercase;
      letter-spacing: .05em;
    }
    .sys-pill.gba { background: rgba(168,85,247,.2); color: #c084fc; border: 1px solid rgba(168,85,247,.4); }
    .sys-pill.snes { background: rgba(99,102,241,.2); color: #818cf8; border: 1px solid rgba(99,102,241,.4); }
    .sys-pill.nes { background: rgba(239,68,68,.2); color: #f87171; border: 1px solid rgba(239,68,68,.4); }
    .sys-pill.gb { background: rgba(16,185,129,.2); color: #34d399; border: 1px solid rgba(16,185,129,.4); }
    .sys-pill.segaMD { background: rgba(59,130,246,.2); color: #60a5fa; border: 1px solid rgba(59,130,246,.4); }
    .sys-pill.nds { background: rgba(245,158,11,.2); color: #fbbf24; border: 1px solid rgba(245,158,11,.4); }
    .sys-pill.psx { background: rgba(56,189,248,.2); color: #38bdf8; border: 1px solid rgba(56,189,248,.4); }
    .sys-pill.mame { background: rgba(245,158,11,.2); color: #f59e0b; border: 1px solid rgba(245,158,11,.4); }
    .sys-pill.neogeo { background: rgba(239,68,68,.2); color: #ef4444; border: 1px solid rgba(239,68,68,.4); }

    .btn-trash {
      background: transparent;
      border: none;
      color: var(--dim);
      cursor: pointer;
      font-size: 15px;
      padding: 2px 6px;
      border-radius: 4px;
      transition: all .15s;
    }
    .btn-trash:hover {
      color: #f87171;
      background: rgba(239,68,68,.15);
    }
    .game-name {
      font: 700 14.5px/1.35 var(--display);
      color: var(--ink);
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    .game-meta {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 11.5px;
      color: var(--muted);
    }
    .game-actions {
      display: flex;
      gap: 8px;
    }
    .btn-play-single {
      flex: 1;
      background: var(--gold);
      color: #10131b;
      border: none;
      padding: 9px 12px;
      border-radius: 8px;
      font: 700 13px/1 var(--body);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all .15s;
    }
    .btn-play-single:hover {
      background: var(--gold-2);
      transform: translateY(-1px);
    }
    .btn-play-lan {
      background: rgba(99,102,241,.18);
      border: 1px solid rgba(99,102,241,.4);
      color: #a5b4fc;
      padding: 9px 10px;
      border-radius: 8px;
      font: 600 12px/1 var(--body);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: all .15s;
    }
    .btn-play-lan:hover {
      background: #6366f1;
      color: #ffffff;
      border-color: #6366f1;
    }

    /* Empty Games State */
    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--muted);
      border: 2px dashed var(--line);
      border-radius: 14px;
    }
    .empty-state-ico { font-size: 40px; margin-bottom: 10px; }
    .empty-state h3 { font: 700 17px/1 var(--display); color: var(--ink); margin-bottom: 6px; }
    .empty-state p { font-size: 14px; max-width: 420px; margin: 0 auto 16px; }

    /* LAN / Netplay Lobby Screen */
    .lan-lobby {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    .lan-banner {
      background: linear-gradient(135deg, rgba(99,102,241,.15) 0%, rgba(168,85,247,.12) 100%);
      border: 1px solid rgba(99,102,241,.35);
      border-radius: 12px;
      padding: 18px 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }
    .lan-banner h3 { font-size: 18px; margin: 0 0 4px; color: var(--ink); }
    .lan-banner p { font-size: 13.5px; color: var(--muted); margin: 0; max-width: 580px; }

    .lan-actions-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 16px;
    }
    .lan-card {
      background: var(--bg-2);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 18px;
    }
    .lan-card h4 {
      font: 700 15px/1 var(--display);
      color: var(--ink);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .lan-card p {
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 14px;
      line-height: 1.5;
    }
    .lan-input-row {
      display: flex;
      gap: 8px;
    }
    .lan-input {
      flex: 1;
      background: var(--surface);
      border: 1px solid var(--line);
      color: var(--ink);
      padding: 10px 12px;
      border-radius: 8px;
      font: 700 14px ui-monospace,monospace;
      text-transform: uppercase;
      outline: none;
    }
    .lan-input:focus { border-color: var(--gold); }
    .btn-lan-action {
      background: var(--gold);
      color: #10131b;
      font: 700 13.5px/1 var(--body);
      padding: 10px 16px;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      white-space: nowrap;
      transition: all .15s;
    }
    .btn-lan-action:hover { background: var(--gold-2); }
    .btn-lan-action:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      pointer-events: none;
    }
    :root {
      --accent: #ffbd5a;
    }
    /* Dedicated Gold / Emerald Hero Button for Room Lobby Start */
    .btn-lobby-start {
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
      color: #ffffff !important;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
      font: 900 15px/1.2 var(--display), system-ui, sans-serif !important;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      padding: 13px 28px !important;
      border-radius: 10px !important;
      border: 2px solid #fbbf24 !important;
      cursor: pointer !important;
      white-space: nowrap !important;
      transition: all .2s cubic-bezier(0.4, 0, 0.2, 1) !important;
      box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 8px !important;
    }
    .btn-lobby-start:hover:not(:disabled) {
      background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
      color: #ffffff !important;
      transform: translateY(-2px);
      box-shadow: 0 6px 26px rgba(245, 158, 11, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    }
    .btn-lobby-start.ready {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
      border-color: #6ee7b7 !important;
      color: #ffffff !important;
      box-shadow: 0 4px 24px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
      animation: pulse-ready 2s infinite !important;
    }
    .btn-lobby-start.ready:hover:not(:disabled) {
      background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 6px 28px rgba(16, 185, 129, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    }
    .btn-lobby-start:active:not(:disabled) {
      transform: translateY(1px);
      box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4) !important;
    }
    .btn-lobby-start:disabled {
      background: #181c28 !important;
      color: #64748b !important;
      border: 1px solid rgba(255, 255, 255, 0.12) !important;
      cursor: not-allowed !important;
      box-shadow: none !important;
      transform: none !important;
      text-shadow: none !important;
    }

    /* Active Rooms List */
    .lan-rooms-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 10px;
    }
    .lan-room-row {
      background: var(--surface-2);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 12px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      transition: border-color .15s;
    }
    .lan-room-row:hover { border-color: #6366f1; }
    .lan-room-code {
      font: 800 14px/1 ui-monospace,monospace;
      color: var(--gold);
      background: rgba(255,189,90,.12);
      padding: 4px 8px;
      border-radius: 6px;
    }
    .lan-room-game { font-weight: 700; color: var(--ink); font-size: 14px; }
    .lan-room-host { font-size: 12px; color: var(--dim); }

    /* In-Game Emulator Wrapper */
    #game-container-wrapper {
      display: none;
      width: 100%;
      background: #000;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid var(--line-2);
      box-shadow: 0 10px 30px rgba(0,0,0,.7);
      position: relative;
    }
    #game-player {
      width: 100%;
      height: 620px;
      max-height: 80vh;
      background: #000;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }
    #game {
      height: 100%;
      max-height: 100%;
      max-width: 100%;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    @media (max-width: 768px) {
      #game-player { height: 420px; }
    }

    /* True Fullscreen Styles */
    #game-container-wrapper:fullscreen,
    #game-container-wrapper:-webkit-full-screen,
    #game-container-wrapper:-moz-full-screen {
      width: 100vw !important;
      height: 100vh !important;
      max-width: 100vw !important;
      max-height: 100vh !important;
      border-radius: 0 !important;
      border: none !important;
      background: #000 !important;
      display: flex !important;
      flex-direction: column !important;
      margin: 0 !important;
      padding: 0 !important;
      overflow: hidden !important;
      z-index: 999999 !important;
    }

    #game-container-wrapper:fullscreen .player-hud-bar,
    #game-container-wrapper:-webkit-full-screen .player-hud-bar,
    #game-container-wrapper:-moz-full-screen .player-hud-bar {
      order: 2 !important;
      flex: 0 0 auto !important;
      background: rgba(14, 18, 27, 0.95) !important;
      backdrop-filter: blur(8px) !important;
      border-top: 1px solid rgba(255,255,255,0.1) !important;
      padding: 8px 16px !important;
    }

    #game-container-wrapper:fullscreen #game-player,
    #game-container-wrapper:-webkit-full-screen #game-player,
    #game-container-wrapper:-moz-full-screen #game-player {
      order: 1 !important;
      flex: 1 1 auto !important;
      width: 100vw !important;
      height: calc(100vh - 54px) !important;
      max-height: 100vh !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      background: #000 !important;
      overflow: hidden !important;
    }

    #game-container-wrapper:fullscreen #game,
    #game-container-wrapper:-webkit-full-screen #game,
    #game-container-wrapper:-moz-full-screen #game {
      height: 100% !important;
      max-height: calc(100vh - 54px) !important;
      max-width: 100vw !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
    }

    #game-container-wrapper:fullscreen canvas,
    #game-container-wrapper:-webkit-full-screen canvas,
    #game-container-wrapper:-moz-full-screen canvas {
      max-height: calc(100vh - 54px) !important;
      max-width: 100vw !important;
      width: auto !important;
      height: 100% !important;
      object-fit: contain !important;
    }

    /* Player HUD */
    .player-hud-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 16px;
      background: var(--bg-2);
      border-top: 1px solid var(--line);
      flex-wrap: wrap;
    }
    .hud-left {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13.5px;
      color: var(--ink);
      font-weight: 600;
    }
    .hud-controls { display: flex; gap: 6px; flex-wrap: wrap; }
    .hud-btn {
      background: var(--surface);
      border: 1px solid var(--line);
      color: var(--text);
      font: 600 12px/1 var(--body);
      padding: 7px 11px;
      border-radius: 6px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: all .15s ease;
    }
    .hud-btn:hover { border-color: var(--gold); color: var(--ink); }
    .hud-btn.primary {
      background: rgba(255,189,90,.15);
      border-color: var(--gold);
      color: var(--gold);
    }
    .hud-btn.primary:hover { background: var(--gold); color: #10131b; }
    .hud-btn.screenshot {
      background: rgba(16,185,129,.15);
      border-color: rgba(16,185,129,.4);
      color: #34d399;
    }
    .hud-btn.screenshot:hover {
      background: #10b981;
      color: #10131b;
    }

    /* Dropzone Modal */
    .modal-backdrop {
      position: fixed !important;
      inset: 0 !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      background: rgba(0, 0, 0, 0.78) !important;
      backdrop-filter: blur(6px) !important;
      display: none;
      align-items: center !important;
      justify-content: center !important;
      z-index: 99999 !important;
      padding: 16px !important;
      box-sizing: border-box !important;
    }
    .modal-backdrop.open, .modal-backdrop.active,
    .modal-backdrop[style*="display: flex"],
    .modal-backdrop[style*="display: block"],
    .modal-backdrop[style*="display: grid"] {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
    }
    .modal-card {
      background: #141923 !important;
      border: 1px solid var(--line-2) !important;
      border-radius: 16px !important;
      padding: 24px 26px !important;
      max-width: 500px !important;
      width: 92% !important;
      margin: auto !important;
      position: relative !important;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 189, 90, 0.15) !important;
      box-sizing: border-box !important;
      transform: none !important;
    }
    .mode-tab-btn {
      background: var(--surface);
      border: 1px solid var(--line);
      color: var(--dim);
      padding: 9px 16px;
      border-radius: 10px;
      font: 700 13px/1 var(--body);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all .2s ease;
      touch-action: manipulation;
    }
    .mode-tab-btn:hover {
      color: var(--ink);
      border-color: var(--line-2);
    }
    .mode-tab-btn.active {
      background: rgba(255, 189, 90, 0.15);
      border-color: var(--gold);
      color: var(--gold);
      font-weight: 700;
    }
    .modal-close-btn {
      position: absolute;
      top: 16px;
      right: 16px;
      background: transparent;
      border: none;
      color: var(--muted);
      font-size: 20px;
      cursor: pointer;
    }
    .modal-close-btn:hover { color: var(--ink); }

    /* Toast */
    .retro-toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: #151a24;
      border: 1px solid var(--gold);
      color: var(--ink);
      padding: 12px 20px;
      border-radius: 10px;
      box-shadow: 0 10px 30px rgba(0,0,0,.6);
      font: 600 14px/1.4 var(--body);
      display: flex;
      align-items: center;
      gap: 10px;
      z-index: 10000;
      transform: translateY(120%);
      opacity: 0;
      transition: all .25s ease;
      pointer-events: none;
    }
    .retro-toast.show { transform: translateY(0); opacity: 1; }
  
    /* Arcade Online Netplay [BETA] Styles */
    .badge-beta {
      display: inline-block;
      font: 800 11px/1 ui-monospace,monospace;
      background: linear-gradient(135deg, #f59e0b, #d97706);
      color: #000;
      padding: 3px 7px;
      border-radius: 5px;
      letter-spacing: 0.05em;
      vertical-align: middle;
      margin-left: 6px;
      text-transform: uppercase;
      box-shadow: 0 2px 6px rgba(245,158,11,0.35);
    }
    .btn-host-new-room {
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
      color: #000 !important;
      font: 700 13px/1.2 var(--display), system-ui, sans-serif;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      padding: 9px 18px;
      border-radius: 9px;
      border: 1px solid #fbbf24;
      cursor: pointer;
      white-space: nowrap;
      transition: all .2s ease;
      box-shadow: 0 3px 12px rgba(245, 158, 11, 0.32);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
    }
    .btn-host-new-room:hover {
      transform: translateY(-1px);
      box-shadow: 0 5px 16px rgba(245, 158, 11, 0.45);
      background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    }
    .lan-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin: 12px 0 18px 0;
      padding: 10px 14px;
      background: rgba(21, 27, 43, 0.7);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
    }
    .lan-sys-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }
    .lan-sys-pill {
      background: var(--surface);
      border: 1px solid var(--line);
      color: var(--dim);
      padding: 6px 12px;
      border-radius: 999px;
      font: 600 12.5px/1 var(--body);
      cursor: pointer;
      transition: all .15s ease;
      touch-action: manipulation;
    }
    .lan-sys-pill:hover {
      color: var(--ink);
      border-color: var(--line-2);
    }
    .lan-sys-pill.active {
      background: rgba(255,189,90,0.15);
      border-color: var(--gold);
      color: var(--gold);
      font-weight: 700;
    }
    .lan-pin-join-box {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .lan-rooms-grid {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 14px;
    }
    .lan-room-row-item {
      background: linear-gradient(180deg, rgba(21, 27, 43, 0.95), rgba(15, 20, 32, 0.98));
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      padding: 12px 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      transition: all .2s ease;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }
    .lan-room-row-item:hover {
      border-color: rgba(255, 189, 90, 0.45);
      background: linear-gradient(180deg, rgba(26, 33, 52, 0.98), rgba(18, 24, 38, 0.98));
      transform: translateY(-1px);
      box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    }
    .newly-created-room {
      border-color: rgba(59, 130, 246, 0.5) !important;
      animation: highlightNewRoom 3s ease;
    }
    @keyframes highlightNewRoom {
      0% {
        background: rgba(59, 130, 246, 0.22);
        box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
      }
      100% {
        background: linear-gradient(180deg, rgba(21, 27, 43, 0.95), rgba(15, 20, 32, 0.98));
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
      }
    }
    .lan-room-col-main {
      display: flex;
      flex-direction: column;
      gap: 5px;
      min-width: 0;
      flex: 1;
    }
    .lan-room-title-line {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .lan-room-game-name {
      font: 700 15px/1.3 var(--display);
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 380px;
    }
    .lan-lock-pill {
      background: rgba(245, 158, 11, 0.15);
      color: var(--gold);
      border: 1px solid rgba(245, 158, 11, 0.35);
      font-size: 10.5px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 6px;
      display: inline-flex;
      align-items: center;
      gap: 3px;
    }
    .lan-room-sub-line {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 12px;
      color: var(--dim);
      flex-wrap: wrap;
    }
    .lan-room-pin-tag {
      font-family: monospace;
      background: rgba(255, 255, 255, 0.06);
      padding: 1px 6px;
      border-radius: 4px;
      color: #cbd5e1;
      font-size: 11px;
    }
    .lan-room-specs-tag {
      color: #94a3b8;
    }
    .lan-room-col-status {
      display: flex;
      align-items: center;
      flex-shrink: 0;
    }
    .lan-slot-badge-horizontal {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }
    .lan-slot-badge-horizontal.open {
      background: rgba(34, 197, 94, 0.12);
      border: 1px solid rgba(34, 197, 94, 0.3);
      color: #4ade80;
    }
    .lan-slot-badge-horizontal.full {
      background: rgba(239, 68, 68, 0.12);
      border: 1px solid rgba(239, 68, 68, 0.3);
      color: #f87171;
    }
    .slot-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .slot-dot.dot-green {
      background: #22c55e;
      box-shadow: 0 0 6px #22c55e;
    }
    .slot-dot.dot-red {
      background: #ef4444;
      box-shadow: 0 0 6px #ef4444;
    }
    .slot-sub {
      font-size: 11px;
      color: var(--dim);
      font-weight: 500;
    }
    .lan-room-col-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .btn-close-room-row {
      background: rgba(239, 68, 68, 0.15);
      border: 1px solid rgba(239, 68, 68, 0.4);
      color: #fca5a5;
      padding: 7px 11px;
      font-size: 12px;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 700;
      transition: all .15s ease;
    }
    .btn-close-room-row:hover {
      background: #ef4444;
      color: #fff;
    }
    .btn-join-room-row {
      padding: 8px 16px;
      font-size: 12.5px;
      font-weight: 800;
      border-radius: 8px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all .2s ease;
      white-space: nowrap;
      border: none;
    }
    .btn-join-room-row.btn-play-mode {
      background: linear-gradient(135deg, #f59e0b, #d97706);
      color: #000;
      box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
    }
    .btn-join-room-row.btn-play-mode:hover {
      filter: brightness(1.1);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    }
    .btn-join-room-row.btn-watch-mode {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: #f1f5f9;
    }
    .btn-join-room-row.btn-watch-mode:hover {
      background: rgba(255, 255, 255, 0.15);
      border-color: var(--gold);
      color: var(--gold);
    }
    @media (max-width: 680px) {
      .lan-room-row-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
      }
      .lan-room-col-actions {
        width: 100%;
      }
      .btn-join-room-row {
        flex: 1;
        justify-content: center;
      }
    }
    .lan-room-card {
      background: var(--bg-2);
      border: 1px solid var(--line);
      border-radius: 14px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
      position: relative;
      cursor: pointer;
    }
    .lan-room-card:hover {
      transform: translateY(-3px);
      border-color: rgba(255,189,90,0.4);
      box-shadow: 0 10px 24px rgba(0,0,0,0.4);
    }
    .lan-room-cover-box {
      position: relative;
      width: 100%;
      height: 164px;
      background: #090c12;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }
    .lan-room-cover-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform .3s ease;
    }
    .lan-room-card:hover .lan-room-cover-img {
      transform: scale(1.04);
    }
    .lan-room-placeholder-art {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      color: var(--gold);
      text-align: center;
      padding: 12px;
    }
    .lan-slot-badge {
      position: absolute;
      top: 10px;
      left: 10px;
      z-index: 2;
      padding: 4px 9px;
      border-radius: 999px;
      font: 700 11.5px/1 var(--body);
      backdrop-filter: blur(8px);
      box-shadow: 0 2px 8px rgba(0,0,0,0.5);
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    .lan-slot-badge.open {
      background: rgba(16, 185, 129, 0.85);
      color: #ffffff;
      border: 1px solid rgba(52, 211, 153, 0.6);
    }
    .lan-slot-badge.full {
      background: rgba(239, 68, 68, 0.85);
      color: #ffffff;
      border: 1px solid rgba(248, 113, 113, 0.6);
    }
    .lan-lock-badge {
      position: absolute;
      top: 10px;
      right: 10px;
      z-index: 2;
      background: rgba(245, 158, 11, 0.85);
      color: #000;
      font: 800 11px/1 var(--body);
      padding: 4px 8px;
      border-radius: 6px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    }
    .lan-room-body {
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      flex: 1;
      gap: 8px;
    }
    .lan-room-game-title {
      font: 700 15px/1.3 var(--display);
      color: var(--ink);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .lan-room-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 12.5px;
      color: var(--dim);
    }
    .lan-room-actions {
      margin-top: auto;
      padding-top: 10px;
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .btn-claim-slot {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
      color: #ffffff;
      border: 2px solid #34d399;
      font: 800 13px/1 var(--body);
      padding: 6px 14px;
      border-radius: 8px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      box-shadow: 0 0 12px rgba(16,185,129,0.7);
      animation: claimPulse 1.2s infinite alternate;
    }
    @keyframes claimPulse {
      0% { transform: scale(1); box-shadow: 0 0 8px rgba(16,185,129,0.5); }
      100% { transform: scale(1.06); box-shadow: 0 0 20px rgba(16,185,129,0.95); }
    }


    /* ---- v42 fixes ---- */
    /* hide inactive language spans for all 6 languages (style.css only covers vi/en/zh) */
    html[lang^="vi"] .lang-en,html[lang^="vi"] .lang-ms,html[lang^="vi"] .lang-fil,html[lang^="vi"] .lang-th,html[lang^="vi"] .lang-zh{display:none!important}
    html[lang^="en"] .lang-vi,html[lang^="en"] .lang-ms,html[lang^="en"] .lang-fil,html[lang^="en"] .lang-th,html[lang^="en"] .lang-zh{display:none!important}
    html[lang^="ms"] .lang-vi,html[lang^="ms"] .lang-en,html[lang^="ms"] .lang-fil,html[lang^="ms"] .lang-th,html[lang^="ms"] .lang-zh{display:none!important}
    html[lang^="fil"] .lang-vi,html[lang^="fil"] .lang-en,html[lang^="fil"] .lang-ms,html[lang^="fil"] .lang-th,html[lang^="fil"] .lang-zh{display:none!important}
    html[lang^="th"] .lang-vi,html[lang^="th"] .lang-en,html[lang^="th"] .lang-ms,html[lang^="th"] .lang-fil,html[lang^="th"] .lang-zh{display:none!important}
    html[lang^="zh"] .lang-vi,html[lang^="zh"] .lang-en,html[lang^="zh"] .lang-ms,html[lang^="zh"] .lang-fil,html[lang^="zh"] .lang-th{display:none!important}
    .nav-item-left { white-space: normal; line-height: 1.25; }
    .rf-bios-btn { background: transparent !important; border: 1px dashed var(--line-2) !important; color: var(--dim) !important; margin-top: 6px; font-size: 12.5px; }
    .rf-demo-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 18px auto 0; max-width: 680px; text-align: left; }
    .rf-demo-card { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; background: rgba(255,255,255,0.03); display: flex; flex-direction: column; gap: 6px; }
    .rf-demo-card b { font-size: 14px; }
    .rf-demo-card small { color: var(--dim); font-size: 11.5px; }
    .rf-demo-card button { margin-top: auto; }
    .rf-demo-note { grid-column: 1 / -1; color: var(--dim); font-size: 11.5px; text-align: center; }
    @media (max-width: 480px) {
      .brand img { width: 30px; height: 30px; }
      .brand > span { font-size: 18px; white-space: nowrap; }
      .auth-gate h2 { font-size: 20px; }
    }
    @media (max-width: 768px), (pointer: coarse) { #rf-cursor-container { display: none !important; } }
