    :root {
      --bg-main: #f8fafc;
      --panel-bg: #ffffff;
      --text-main: #0f172a;
      --text-muted: #64748b;
      --brand-primary: #2563eb;
      --brand-hover: #1d4ed8;
      --success: #10b981;
      --success-bg: #f0fdf4;
      --danger: #ef4444;
      --danger-bg: #fef2f2;
      --warning: #f59e0b;
      --warning-bg: #fffbeb;
      --border-color: #e2e8f0;
      --radius-lg: 16px;
      --radius-md: 10px;
    }

    body {
      font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background-color: var(--bg-main); color: var(--text-main); margin: 0; padding: 0;
      min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box;
      padding-bottom: 3.5rem; 
    }

    /* NAVIGATION / UTILITY HEADER */
    .utility-header {
      width: 100%;
      max-width: 600px;
      margin-bottom: 1rem;
      padding: 0 1rem;
      box-sizing: border-box;
      display: none; 
      justify-content: space-between;
      align-items: center;
    }
    .back-hub-btn {
      background: transparent;
      border: none;
      color: var(--brand-primary);
      font-weight: 700;
      font-size: 0.95rem;
      cursor: pointer;
      padding: 0.5rem 0;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      transition: color 0.2s ease;
    }
    .back-hub-btn:hover {
      color: var(--brand-hover);
    }
    
    /* RIGHT CORNER USER BADGE INDICATOR */
    .header-user-badge {
      font-size: 0.85rem;
      font-weight: 700;
      font-family: monospace;
      background: #e2e8f0;
      color: #334155;
      padding: 0.35rem 0.65rem;
      border-radius: 6px;
      border: 1px solid var(--border-color);
    }

    /* CORE CARD STRUCTURE */
    .workspace-card {
      background: var(--panel-bg); padding: 2.5rem; border-radius: var(--radius-lg);
      border: 1px solid var(--border-color); width: 100%; max-width: 600px; box-sizing: border-box;
      box-shadow: 0 10px 25px rgba(0,0,0,0.02); display: none;
    }
    .workspace-card.active-panel { display: block; }
    h2 { margin-top: 0; margin-bottom: 1.5rem; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }

    /* SEPARATED LINK GRID SYSTEM */
    #pane-gateway-start {
      background: transparent; border: none; box-shadow: none; padding: 0; max-width: 600px; width: 100%;
    }
    .gateway-wrapper {
      display: flex; flex-direction: column; gap: 1rem; width: 100%; padding: 0 1rem; box-sizing: border-box;
    }
    .gateway-card {
      display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1.75rem;
      background: var(--panel-bg); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
      cursor: pointer; text-decoration: none; color: inherit; transition: all 0.2s ease;
      box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); width: 100%; box-sizing: border-box;
    }
    .gateway-card:hover { border-color: var(--brand-primary); transform: translateY(-2px); box-shadow: 0 10px 15px rgba(37, 99, 235, 0.06); }
    .gateway-icon { font-size: 2.2rem; }
    .gateway-title { font-weight: 800; font-size: 1.2rem; color: var(--text-main); }

    /* FILTERS & MULTI-CHIP SETUP */
    .filter-section { margin-bottom: 1.5rem; }
    .filter-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; margin-bottom: 0.75rem; }
    .filter-header h3 { margin: 0; font-size: 1rem; color: var(--text-main); }
    .select-all-toggle { font-size: 0.85rem; font-weight: 600; color: var(--brand-primary); cursor: pointer; }
    .checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.5rem; }
    .checkbox-item { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; padding: 0.5rem; background: var(--bg-main); border-radius: 6px; border: 1px solid var(--border-color); }

    /* PROFILE MODULE */
    .profile-item { display: flex; flex-direction: column; padding: 1rem; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-md); margin-bottom: 0.75rem; }
    .profile-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; margin-bottom: 0.25rem; }
    .profile-val { font-size: 1.1rem; font-weight: 700; word-break: break-all; }
    
    /* ANALYTICS HIGHLIGHT LAYERS */
    .stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
    .mini-stat-box { padding: 0.75rem; border-radius: 8px; border: 1px solid var(--border-color); font-size: 0.85rem; font-weight: 700; }
    .mini-stat-box.correct { background: var(--success-bg); border-color: #bbf7d0; color: #15803d; }
    .mini-stat-box.incorrect { background: var(--danger-bg); border-color: #fecaca; color: #b91c1c; }
    .mini-stat-box.unattempted { background: var(--warning-bg); border-color: #fde68a; color: #b45309; }

    /* ACTIVE ARENA CONTROLS */
    .arena-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
    .tag-group { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
    .badge { font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.5rem; border-radius: 4px; }
    .badge-id { background: #f3e8ff; color: #6b21a8; }
    .badge-level { background: #fef3c7; color: #d97706; }
    .badge-topic { background: #e0f2fe; color: #0369a1; }
    .bookmark-trigger { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; padding: 0.35rem 0.6rem; font-size: 1rem; color: var(--text-muted); transition: all 0.2s; }
    .bookmark-trigger.active { background: var(--warning-bg); color: var(--warning); border-color: #fcd34d; }

    .question-prompt { font-size: 1.35rem; font-weight: 700; line-height: 1.4; margin: 1.5rem 0; }
    .input-box { width: 100%; padding: 0.85rem; border: 2px solid var(--border-color); border-radius: var(--radius-md); font-size: 1.05rem; box-sizing: border-box; margin-bottom: 1rem; outline: none; background: var(--bg-main); }
    .input-box:focus { border-color: var(--brand-primary); background: #fff; }
    
    .feedback-msg { font-weight: 700; margin-bottom: 1rem; min-height: 1.2rem; }
    .btn-prime { background-color: var(--brand-primary); color: white; border: none; padding: 0.85rem; font-size: 1rem; font-weight: 700; border-radius: var(--radius-md); cursor: pointer; width: 100%; transition: background 0.2s; }
    .btn-prime:hover { background-color: var(--brand-hover); }
    .btn-sec { background: var(--bg-main); color: var(--text-main); border: 1px solid var(--border-color); padding: 0.6rem; font-size: 0.9rem; font-weight: 600; border-radius: 6px; cursor: pointer; }
    
    .btn-danger-outline { background: transparent; color: var(--danger); border: 1px dashed var(--danger); padding: 0.75rem; font-size: 0.9rem; font-weight: 700; border-radius: var(--radius-md); cursor: pointer; width: 100%; margin-top: 1.5rem; transition: all 0.2s; }
    .btn-danger-outline:hover { background: var(--danger-bg); }

    /* SEARCH FUNCTIONALITY GROUP */
    .search-control-group { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
    .search-control-group .input-box { margin-bottom: 0; }
    .search-control-group .btn-prime { width: auto; white-space: nowrap; padding: 0 1.5rem; }
    .search-results-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; max-height: 380px; overflow-y: auto; }
    .search-item-card { padding: 1.25rem; background: var(--panel-bg); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: 0 2px 4px rgba(0,0,0,0.01); }

    /* OVERLAY MODAL FOR REGISTRATION */
    .auth-overlay { position: fixed; top:0; left:0; right:0; bottom:0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 9999; }
    .auth-modal { background: white; padding: 2.5rem; border-radius: var(--radius-lg); width: 90%; max-width: 460px; border: 1px solid var(--border-color); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
    .modal-divider { display: flex; align-items: center; text-align: center; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; margin: 1.25rem 0; }
    .modal-divider::before, .modal-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-color); }
    .modal-divider:not(:empty)::before { margin-right: .5em; }
    .modal-divider:not(:empty)::after { margin-left: .5em; }

    /* TELEMETRY FOOTER BAR */
    .status-telemetry-bar {
      position: fixed; bottom: 0; left: 0; right: 0; height: 32px;
      background: #0f172a; border-top: 1px solid #1e293b; color: #94a3b8;
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 1.25rem; font-size: 0.75rem; font-weight: 600; z-index: 99999;
      font-family: monospace; box-sizing: border-box;
    }
    .status-pill { display: flex; align-items: center; gap: 0.4rem; }
    .dot-indicator { width: 7px; height: 7px; border-radius: 50%; display: inline-block; transition: background-color 0.2s ease; }
    .dot-online { background-color: var(--success); box-shadow: 0 0 8px var(--success); }
    .dot-offline { background-color: var(--danger); box-shadow: 0 0 8px var(--danger); }
    .dot-connecting { background-color: var(--warning); box-shadow: 0 0 8px var(--warning); }

    @media (max-width: 550px) {
      body { justify-content: flex-start; padding: 2rem 0 4rem 0; }
    }