      :root {
        --primary-color: #1d4ed8;
        --primary-color-dark: #1e3a8a;
        --accent-color: #60a5fa;
        --accent-color-soft: rgba(96,165,250,0.22);
        --bg-color: #08101a;
        --skill-card-bg: #0f172a;
        --panel-bg: #0f172a;
        --text-color: #e6eef8;
        --highlight-color: #22c55e;
        --highlight-color-dark: #16a34a;
      }
      body {
        font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
        margin: 0;
        padding: 20px;
        background: var(--bg-color);
        color: var(--text-color);
      }
      .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
        white-space: nowrap;
      }
      body.logged-out .header-right-stack,
      body.logged-out #refresh,
      body.logged-out #logout,
      body.logged-out #dailyLimitsInfo,
      body.logged-out #appContent {
        display: none !important;
      }
      body.logged-out #status {
        color: #9fb7d8;
      }
      body.logged-in #authGate {
        display: none !important;
      }
      @media (max-width:500px) {
        body { padding: 8px; }
      }
      header { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: nowrap; }
      h1 { margin: 0; padding: 0; font-size: 36px; height: auto; line-height: 1; display: flex; align-items: center; gap: 14px; }
      .header-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
      .header-logo { width: 200px; height: 100px; flex-shrink: 0; object-fit: contain; border-radius: 10px; }
      .header-logo-fallback {
        width: 200px;
        height: 100px;
        flex-shrink: 0;
        display: none;
        align-items: center;
        justify-content: center;
        font-size: 58px;
        border-radius: 10px;
        background: #081018;
      }
      #status {
        color: #cbdff0;
        min-height: 20px;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.3;
      }
      #dailyLimitsInfo { color: #9fb7d8; font-size: 12px; min-height: 16px; }
      .auth-gate {
        min-height: calc(100vh - 180px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px 0;
      }
      .boot-state {
        position: fixed;
        inset: 0;
        z-index: 12000;
        background: rgba(3, 7, 18, 0.78);
        backdrop-filter: blur(3px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px;
      }
      .boot-card {
        width: min(540px, 94vw);
        background: var(--panel-bg);
        border: 1px solid rgba(96,165,250,0.35);
        border-radius: 14px;
        padding: 22px;
        box-shadow: 0 24px 56px rgba(2,6,23,0.5);
      }
      .boot-card h2 {
        margin: 0 0 8px 0;
        color: #eaf3ff;
      }
      .boot-card p {
        margin: 0;
        color: #9fb7d8;
      }
      #bootRetry {
        margin-top: 14px;
      }
      .auth-card {
        width: min(540px, 94vw);
        background: radial-gradient(1200px 320px at 20% -10%, rgba(96,165,250,0.28), rgba(96,165,250,0.06) 45%, transparent 60%), var(--panel-bg);
        border: 1px solid rgba(96,165,250,0.35);
        border-radius: 16px;
        padding: 28px;
        box-shadow: 0 20px 50px rgba(2,6,23,0.45);
      }
      .auth-card h2 {
        margin: 0 0 8px 0;
        font-size: 28px;
        color: #eaf3ff;
      }
      .auth-subtitle {
        margin: 0 0 18px 0;
        color: #9fb7d8;
        line-height: 1.5;
      }
      .auth-error {
        margin: 0 0 10px 0;
        color: #fda4af;
        font-size: 13px;
      }
      .auth-form {
        display: grid;
        gap: 10px;
      }
      .auth-form input {
        width: 100%;
        box-sizing: border-box;
        padding: 11px 12px;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.04);
        color: #e6eef8;
        font-size: 15px;
      }
      .auth-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 4px;
      }
      .secondary-btn {
        background: linear-gradient(180deg, #1f2937, #111827);
        border: 1px solid rgba(255,255,255,0.2);
      }
      button:focus-visible,
      input:focus-visible {
        outline: 2px solid #93c5fd;
        outline-offset: 2px;
      }
      .user-strip { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; margin-left: 8px; }
      .user-strip-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
      .header-right-stack { margin-left: auto; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
      .topbar-menu { display:flex; gap:8px; align-items:center; position:relative; }
      @media (max-width:800px) {
        .header-logo, .header-logo-fallback { width: 200px; height: 100px; }
        .header-logo-fallback { font-size: 42px; }
        header { flex-wrap: wrap; align-items: flex-start; }
        .user-strip { width: 100%; margin-left: 0; }
        .header-right-stack { margin-left: 0; width: 100%; align-items: stretch; }
        .topbar-menu { width: 100%; align-self: stretch; justify-content: flex-end; }
      }
      .controls { margin-bottom: 12px; display:flex; gap:8px; align-items:center; flex-wrap: wrap; }
      .skill-container { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:12px; margin-top:12px; }
      @media (max-width:800px) { .skill-container { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
      @media (max-width:500px) { .skill-container { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
      .shop-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:12px; margin-top:12px; }
      @media (max-width:800px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
      .shop-card { background:var(--panel-bg); padding:12px; border-radius:8px; min-height:96px; display:flex; flex-direction:column; gap:8px; }
      .shop-card h4 { margin:0; font-size:14px; }
      .shop-meta { font-size:12px; color:#9fb7d8; }
      .shop-actions { display:flex; gap:8px; margin-top:auto; }
      .res-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:8px; margin-top:12px; }
      @media (max-width:800px) { .res-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); } }
      .res-card { background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent), var(--panel-bg); padding:8px; border-radius:6px; display:flex; gap:8px; align-items:center; }
      .skill-box {
        position:relative;
        background:var(--skill-card-bg);
        color:var(--text-color);
        padding:12px;
        border-radius:8px;
        min-height:72px;
        display:flex; flex-direction:row; justify-content:flex-start; align-items:center;
        transition: transform .08s, box-shadow .12s, border-color .12s;
        border:2px solid transparent; cursor:pointer;
      }
      @media (max-width:800px) { .skill-box { flex-direction:column; align-items:flex-start; min-height:auto; } }
      .skill-box:hover { transform: translateY(-2px); box-shadow:0 6px 12px rgba(2,6,23,0.4); }
      .skill-box.active { border-color:var(--accent-color); background:linear-gradient(180deg,#0b1220,var(--skill-card-bg)); box-shadow: 0 0 0 1px var(--accent-color-soft) inset; }
      .skill-box.passive-skill {
        border-color: color-mix(in srgb, var(--highlight-color) 45%, transparent);
        box-shadow:
          0 0 0 1px color-mix(in srgb, var(--highlight-color) 24%, transparent) inset,
          0 0 calc(8px + 22px * var(--passive-glow-strength, 0.2)) color-mix(in srgb, var(--highlight-color) 34%, transparent);
      }
      .skill-box.active.passive-skill {
        border-color: var(--accent-color);
        box-shadow:
          0 0 0 1px var(--accent-color-soft) inset,
          0 0 calc(8px + 22px * var(--passive-glow-strength, 0.2)) color-mix(in srgb, var(--highlight-color) 34%, transparent);
      }
      .skill-name { font-weight:700; font-size:13px; text-transform:capitalize; }
      .skill-level { font-size:18px; margin-top:2px; }
      .skill-next { font-size:12px; color:#9fb7d8; margin-top:4px; }
      .xp-bar-container { width:160px; height:8px; background:rgba(255,255,255,0.04); border-radius:6px; margin-top:6px; overflow:hidden; }
      @media (max-width:800px) { .xp-bar-container { width:100%; } }
      .xp-bar-fill { height:100%; background:linear-gradient(90deg,var(--accent-color),#7dd3fc); width:0%; transition:width .4s linear; position: relative; }
      .xp-bar-fill.passive-xp-bar-fill::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: -40%;
        width: 40%;
        pointer-events: none;
        background: linear-gradient(90deg, transparent, rgba(200,255,200,0.85), transparent);
        mix-blend-mode: lighten;
        animation: passiveBarSweep 1s linear infinite;
      }
      @keyframes passiveBarSweep {
        0% { left: -40%; }
        100% { left: 60%; }
      }
      .tooltip {
        position:absolute; left:50%; transform:translateX(-50%); bottom:calc(100% + 8px);
        background:rgba(0,0,0,0.85); color:#fff; padding:6px 8px; border-radius:6px; font-size:13px;
        white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .12s ease;
      }
      .skill-box:hover .tooltip { opacity:1; }
      .skill-icon { font-size:20px; margin-right:12px; width:28px; text-align:center; }
      .skill-icon-col { display:flex; align-items:center; justify-content:center; width:32px; min-width:32px; margin-right:10px; }
      .skill-meta { display:flex; flex-direction:column; }
      .skill-tool { background: var(--accent-color-soft); color:var(--accent-color); padding:4px 8px; border-radius:6px; font-size:12px; margin-left:auto; }
      @media (max-width:800px) { .skill-tool { margin-left:0; margin-top:6px; } }
      .skill-resource { font-size:12px; color:#9fb7d8; margin-left:auto; padding-left:8px; }
      @media (max-width:800px) { .skill-resource { margin-left:0; margin-top:4px; padding-left:0; } }
      @media (max-width:500px) {
        .skill-container { gap: 8px; margin-top: 8px; }
        .skill-box { padding: 8px; }
        .skill-icon-col { display: none; }
      }
      
      /* Mastery animations */
      @keyframes skillFlash {
        0% { box-shadow: 0 0 20px rgba(96,165,250,0.8); background: rgba(96,165,250,0.2); }
        50% { box-shadow: 0 0 40px rgba(96,165,250,1); background: rgba(96,165,250,0.3); }
        100% { box-shadow: 0 0 0 rgba(96,165,250,0.8); background: #0f172a; }
      }
      .skill-box.mastery-flash { animation: skillFlash 5s ease-out; }
      
      @keyframes skillFlashElite {
        0% { box-shadow: 0 0 30px rgba(96,165,250,1), 0 0 60px rgba(168,85,247,0.8); background: rgba(96,165,250,0.3); }
        25% { box-shadow: 0 0 50px rgba(96,165,250,1), 0 0 100px rgba(168,85,247,1); background: rgba(96,165,250,0.4); }
        50% { box-shadow: 0 0 60px rgba(96,165,250,1), 0 0 120px rgba(168,85,247,1); background: rgba(96,165,250,0.35); }
        100% { box-shadow: 0 0 0 rgba(96,165,250,0.8); background: #0f172a; }
      }
      .skill-box.mastery-flash.mastery-flash-elite { animation: skillFlashElite 7s ease-out; }

      @keyframes slideIn {
        0% { transform: translateX(400px); opacity: 0; }
        100% { transform: translateX(0); opacity: 1; }
      }

      @keyframes pulseGlow {
        0%, 100% { transform: scale(1); box-shadow: 0 0 20px color-mix(in srgb, var(--highlight-color) 80%, transparent), 0 0 40px color-mix(in srgb, var(--highlight-color) 40%, transparent); }
        50% { transform: scale(1.15); box-shadow: 0 0 40px var(--highlight-color), 0 0 80px color-mix(in srgb, var(--highlight-color) 60%, transparent); }
      }

      @keyframes fadeOut {
        0% { opacity: 1; }
        100% { opacity: 0; }
      }

      /* Skill Resource Popup */
      .skill-popup-icon { 
        position: fixed; 
        font-size: 60px; 
        cursor: pointer; 
        user-select: none;
        z-index: 5000;
        animation: pulseGlow 0.6s ease-in-out infinite;
        filter: drop-shadow(0 0 10px color-mix(in srgb, var(--highlight-color) 80%, transparent));
        background: radial-gradient(circle, color-mix(in srgb, var(--highlight-color) 20%, transparent), transparent);
        width: 100px;
        height: 100px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 3px solid var(--highlight-color);
        transition: transform 0.1s;
      }

      .skill-popup-icon:hover { transform: scale(1.2); }

      .resource-popup {
        position: fixed;
        font-size: 24px;
        font-weight: bold;
        color: var(--highlight-color);
        z-index: 5001;
        animation: popupFloat 1s ease-out forwards;
        pointer-events: none;
        text-shadow: 0 0 10px color-mix(in srgb, var(--highlight-color) 80%, transparent);
      }

      @keyframes popupFloat {
        0% { transform: translate(0, 0) scale(1); opacity: 1; }
        100% { transform: translate(0, -80px) scale(1.5); opacity: 0; }
      }

      /* Auth inputs and buttons styling */
      #auth { display:flex; gap:8px; align-items:center; margin-bottom:0; }
      #auth input { width:140px; padding:8px 10px; border-radius:8px; border:1px solid rgba(255,255,255,0.06); background:rgba(255,255,255,0.02); color:inherit; font-size:14px; }
      #auth input::placeholder { color: rgba(230,238,248,0.5); }
      input[type="number"] { padding:6px 8px; border-radius:6px; border:1px solid rgba(96,165,250,0.4); background:rgba(96,165,250,0.08); color:#e6eef8; font-size:13px; font-family:inherit; }
      input[type="number"]:focus { outline:none; border-color:rgba(96,165,250,0.8); background:rgba(96,165,250,0.12); box-shadow:0 0 8px rgba(96,165,250,0.3); }
      input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 6px 18px rgba(96,165,250,0.08); background: rgba(255,255,255,0.03); }

      /* Primary button */
      button {
        font-family: inherit; font-size:14px; padding:8px 12px; border-radius:7px; border: 1px solid rgba(255,255,255,0.18); cursor: pointer;
        background: linear-gradient(180deg, var(--primary-color), var(--primary-color-dark));
        color: #e6eef8;
        box-shadow: 0 8px 18px rgba(2,6,23,0.36), 0 0 0 1px rgba(255,255,255,0.03) inset;
        transition: transform .06s ease, box-shadow .12s ease, opacity .12s ease, border-color .12s ease, background .12s ease;
      }
      button:hover:not(:disabled) {
        transform: translateY(-2px);
        border-color: rgba(255,255,255,0.28);
        background: linear-gradient(180deg, var(--primary-color), var(--primary-color-dark));
        box-shadow: 0 12px 24px rgba(2,6,23,0.44), 0 0 0 1px rgba(125, 211, 252, 0.14) inset;
      }
      button:active:not(:disabled) { transform: translateY(0px); }
      button:disabled { opacity:0.55; cursor:not-allowed; transform:none; }

      /* Secondary / subtle buttons */
      #logout, #refresh { background: transparent; border:1px solid rgba(255,255,255,0.06); color:#cbdff0; box-shadow:none; }
      #logout:hover, #refresh:hover { background: rgba(255,255,255,0.02); }
      /* make shop/build controls grouped */
      #shopBtn, #buildBtn, #achievementsBtn, #leaderboardBtn, #grandExchangeBtn { padding:8px 14px; }

      .fancy-modal-overlay {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px;
        box-sizing: border-box;
        background:
          radial-gradient(1200px 500px at 50% -10%, rgba(96,165,250,0.16), transparent 60%),
          rgba(2, 6, 23, 0.78);
        backdrop-filter: blur(6px);
        z-index: 10000;
        animation: modalFadeIn 0.16s ease-out;
      }

      .fancy-modal-card {
        position: relative;
        color: var(--text-color);
        background:
          linear-gradient(180deg, rgba(96,165,250,0.08), rgba(255,255,255,0.02) 28%, transparent),
          var(--panel-bg);
        border: 1px solid rgba(96,165,250,0.28);
        border-radius: 14px;
        box-shadow:
          0 24px 70px rgba(2, 6, 23, 0.72),
          0 0 0 1px rgba(255,255,255,0.03) inset;
      }

      .fancy-modal-title {
        margin: 0 0 14px 0;
        color: #93c5fd;
        letter-spacing: 0.2px;
      }

      .fancy-modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 999px;
        border: 1px solid rgba(147,197,253,0.35);
        background: rgba(15,23,42,0.45);
        color: #dbeafe;
        box-shadow: none;
        font-size: 18px;
      }

      .fancy-modal-close:hover:not(:disabled) {
        background: rgba(59,130,246,0.24);
        transform: none;
      }

      @keyframes modalFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
      }
      
      /* Hamburger menu */
      .menu-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        justify-content: flex-end;
        width: auto;
        max-width: 100%;
        margin-left: auto;
      }
      .menu-buttons > button {
        white-space: nowrap;
        flex: 0 0 auto;
      }
      #themeBtn {
        background: linear-gradient(135deg, #f59e0b, #ef4444, #8b5cf6);
        color: #fff;
        border: 1px solid rgba(255,255,255,0.25);
      }
      #themeBtn:hover:not(:disabled) {
        box-shadow: 0 0 0 1px rgba(255,255,255,0.25) inset, 0 10px 20px rgba(2,6,23,0.45);
      }
      #menuToggle, #shopMenuToggle {
        display: none;
        min-width: 42px;
        height: 38px;
        padding: 0;
        margin-left: auto;
        border-radius: 7px;
        border: 1px solid rgba(255,255,255,0.2);
        background: linear-gradient(180deg, var(--primary-color), var(--primary-color-dark));
        color: #e6eef8;
        box-shadow: 0 8px 18px rgba(2,6,23,0.35), 0 0 0 1px rgba(255,255,255,0.03) inset;
      }
      #menuToggle:hover, #shopMenuToggle:hover {
        border-color: rgba(255,255,255,0.3);
        background: linear-gradient(180deg, var(--primary-color), var(--primary-color-dark));
        box-shadow: 0 12px 24px rgba(2,6,23,0.42), 0 0 0 1px rgba(125, 211, 252, 0.15) inset;
      }
      .menu-icon { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
      .menu-icon span { width: 18px; height: 2px; border-radius: 2px; background: rgba(230,238,248,0.95); }

      #shopMenuToggle .menu-icon span { background: rgba(230,238,248,0.95); }

      @media (max-width: 768px) {
        #menuToggle { display: inline-flex; align-items: center; justify-content: center; }
        .menu-buttons { 
          display: none;
          flex-direction: column;
          position: absolute;
          top: calc(100% + 8px);
          right: 0;
          background: #0f172a;
          border: 2px solid var(--accent-color);
          border-radius: 8px;
          z-index: 100;
          min-width: 160px;
          padding: 8px 0;
          box-shadow: 0 10px 25px rgba(37,99,235,0.2);
        }
        .menu-buttons.active { display: flex; }
        .menu-buttons button { padding: 10px 14px; border: none; background: transparent; color: #cbdff0; text-align: left; cursor: pointer; font-size: 14px; }
        .menu-buttons button:hover { background: var(--accent-color-soft); }
      }
      
      @media (min-width: 769px) {
        #menuToggle { display: none; }
        .menu-buttons {
          display: flex !important;
          flex-wrap: wrap;
          justify-content: flex-end;
        }
      }

      /* Shop modal hamburger menu (same as main menu) */
      @media (max-width: 768px) {
        #shopMenuToggle { display: inline-flex !important; align-items: center; justify-content: center; color: #e6eef8 !important; }
        .shop-menu-buttons {
          display: none !important;
          flex-direction: column;
          position: absolute;
          top: calc(100% + 8px);
          right: 48px;
          background: #0f172a;
          border: 2px solid var(--accent-color);
          border-radius: 8px;
          z-index: 100;
          min-width: 160px;
          padding: 8px 0;
          box-shadow: 0 10px 25px rgba(37,99,235,0.2);
        }
        .shop-menu-buttons.active { display: flex !important; }
        .shop-menu-buttons button { padding: 10px 14px; border: none; background: transparent; color: #cbdff0 !important; text-align: left; cursor: pointer; font-size: 14px; width: 100%; }
        .shop-menu-buttons button:hover { background: var(--accent-color-soft) !important; }
      }

      @media (min-width: 769px) {
        #shopMenuToggle { display: none !important; }
        .shop-menu-buttons { display: flex !important; }
      }

      /* modal small buttons (close X) keep transparent look */
      .shop-card button, .res-card button { padding:6px 10px; border-radius:6px; }

      /* Achievements & Leaderboard Styles */
      .achievement-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:12px; margin-top:12px; }
      @media (max-width:800px) { .achievement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
      .achievement-card { background:var(--panel-bg); padding:12px; border-radius:8px; text-align:center; cursor:pointer; transition:all .2s; }
      .achievement-card:hover { transform:translateY(-2px); box-shadow:0 6px 12px rgba(2,6,23,0.4); }
      .achievement-card.locked { opacity:0.4; }
      .achievement-icon { font-size:32px; margin-bottom:8px; }
      .achievement-name { font-size:12px; font-weight:bold; color:#e6eef8; }
      .achievement-desc { font-size:10px; color:#9fb7d8; margin-top:4px; }

      /* ========== CHAT FEATURE (easy to remove - search for CHAT_START and CHAT_END) ========== */
      .chat-messages { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; margin-bottom: 12px; padding: 8px; background: rgba(0,0,0,0.3); border-radius: 6px; }
      .chat-message { background: var(--accent-color-soft); padding: 8px; border-radius: 6px; border-left: 3px solid var(--accent-color); }
      .chat-message-author { font-weight: 700; color: var(--accent-color); font-size: 13px; }
      .chat-message-text { font-size: 13px; margin-top: 4px; color: #e6eef8; word-break: break-word; }
      .chat-message-time { font-size: 11px; color: #9fb7d8; margin-top: 4px; }
      .chat-input-group { display: flex; gap: 8px; }
      #chatInput { flex: 1; padding: 8px; background: #0b1220; border: 1px solid #1e293b; color: #e6eef8; border-radius: 6px; font-size: 13px; }
      #chatInput:focus { outline: none; border-color: var(--accent-color); }
      #chatSendBtn { padding: 8px 16px; background: var(--accent-color); color: #000; border: none; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 13px; }
      #chatSendBtn:hover { background: #7dd3fc; }
      #chatSendBtn:disabled { background: #4b5563; cursor: not-allowed; }
      #chatBtn { position: relative; }
      #chatBtn.chat-btn-unread {
        background: linear-gradient(180deg, #0ea5e9, #0284c7);
        border-color: rgba(125, 211, 252, 0.95);
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.65);
        animation: chatBtnPulse 1.5s ease-out infinite;
      }
      #chatBtn.chat-btn-unread::after {
        content: attr(data-unread);
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: #ef4444;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 16px;
        text-align: center;
        box-shadow: 0 0 0 2px #0f172a;
      }
      @keyframes chatBtnPulse {
        0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.65); }
        70% { box-shadow: 0 0 0 10px rgba(14, 165, 233, 0); }
        100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
      }
      /* ========== END CHAT FEATURE ========== */

      .leaderboard-table { width:100%; border-collapse:collapse; margin-top:12px; }
      .leaderboard-table th { background:var(--accent-color-soft); padding:10px; text-align:left; font-weight:bold; border-bottom:1px solid rgba(255,255,255,0.06); }
      .leaderboard-table td { padding:10px; border-bottom:1px solid rgba(255,255,255,0.06); }
      .leaderboard-table tr:hover { background:var(--accent-color-soft); }
      .leaderboard-rank { font-weight:bold; width:40px; }
      .leaderboard-rank.top3 { color:#fbbf24; }

      /* Daily Challenge Styles */
      #daily-challenge { background:linear-gradient(135deg, color-mix(in srgb, var(--highlight-color) 10%, transparent), var(--accent-color-soft)); border:2px solid var(--highlight-color); border-radius:8px; padding:16px; margin-top:12px; }
      .daily-challenge-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
      .daily-challenge-title { font-size:16px; font-weight:bold; color:var(--highlight-color); }
      .daily-challenge-skill { font-size:24px; margin:0 8px; }
      .daily-challenge-info { font-size:12px; color:#9fb7d8; margin-bottom:8px; }
      .progress-bar-container { background:rgba(0,0,0,0.3); border-radius:6px; height:24px; overflow:hidden; margin:8px 0; }
      .progress-bar-fill { background:linear-gradient(90deg, var(--accent-color), #10b981); height:100%; transition:width .3s ease; display:flex; align-items:center; justify-content:center; font-size:12px; color:white; font-weight:bold; }
      .progress-text { font-size:12px; color:#9fb7d8; margin-top:6px; text-align:center; }
      #claim-daily-btn { background:linear-gradient(135deg, var(--highlight-color), var(--highlight-color-dark)); margin-top:12px; width:100%; }
      #claim-daily-btn:disabled { background:color-mix(in srgb, var(--highlight-color) 40%, transparent); }
      #claim-daily-btn:hover:not(:disabled) { filter: brightness(0.88); }


