
    .game-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
      backdrop-filter: blur(12px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      position: relative;
      box-shadow: 0 0 15px rgba(0, 255, 102, 0.01);
      cursor: pointer;
      width: 160px;
      height: 160px; /* Locked Square dimensions: 15% increase */
      color: white;
    }

    .game-card:hover {
      transform: scale(1.08) rotate(-1deg);
      border-color: var(--accent);
      box-shadow: 0 10px 20px var(--accent-glow);
    }

    .game-card.multiplayer {
      border-color: rgba(255, 0, 85, 0.2);
    }
    
    .game-card.multiplayer:hover {
      border-color: var(--multiplayer);
      box-shadow: 0 10px 20px var(--multiplayer-glow);
    }

    .game-card-icon {
      height: 60%;
      width: 60%;
      position: absolute;
      transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
      z-index: 1;
      pointer-events: none;
      object-fit: cover; /* Cover ensures a beautiful cropped thumb inside the square */
      border-radius: 12px;
    }

    .game-card:hover .game-card-icon {
      height: 90%;
      width: 90%;
      filter: blur(6px) opacity(0.4);
      animation: float-anim 3s ease-in-out infinite;
    }

    @keyframes float-anim {
      0% { transform: translateY(0); }
      50% { transform: translateY(-10px); }
      100% { transform: translateY(0); }
    }

    .game-info {
      padding: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      opacity: 0;
      width: 100%;
      height: 100%;
      transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
      z-index: 2;
      position: relative;
      text-align: center;
    }

    .game-card:hover .game-info {
      opacity: 1;
    }

    .game-title {
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(12px * var(--font-scale, 1)) ;
      font-weight: 700;
      color: var(--text-primary);
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 95%;
    }

    .game-badge {
      padding: 2px 6px;
      background: var(--accent);
      color: var(--bg-primary);
      font-size: calc(7.5px * var(--font-scale, 1)) ;
      font-weight: 800;
      border-radius: 2px;
      text-transform: uppercase;
      font-family: 'Space Grotesk', sans-serif;
      letter-spacing: 0.05em;
      margin: 0;
    }

    .game-badge.mp {
      background: var(--multiplayer);
      color: white;
    }

    .game-badge.hot {
      background: var(--danger);
      color: white;
    }

    .game-badge.popular {
      background: var(--gold);
      color: var(--bg-primary);
    }

    .play-btn {
      outline: none;
      border: 1px solid var(--accent);
      border-radius: 100px;
      background: rgba(0, 255, 102, 0.1);
      color: var(--accent);
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(8px * var(--font-scale, 1)) ;
      font-weight: 800;
      letter-spacing: 0.05em;
      padding: 3px 10px;
      text-transform: uppercase;
      text-decoration: none;
      display: inline-block;
      transition: all 0.25s ease;
      box-shadow: 0 0 10px rgba(0, 255, 102, 0.05);
      cursor: pointer;
      margin-top: 2px;
    }

    .play-btn:hover {
      background: var(--accent);
      color: var(--bg-primary);
      box-shadow: 0 0 15px var(--accent-glow);
      transform: translateY(-1px);
    }

    .play-btn.mp {
      border-color: var(--multiplayer);
      background: rgba(255, 0, 85, 0.1);
      color: var(--multiplayer);
    }

    .play-btn.mp:hover {
      background: var(--multiplayer);
      color: white;
      box-shadow: 0 0 15px var(--multiplayer-glow);
    }

    @keyframes pulse-badge {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.8; transform: scale(0.95); }
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* ── CYBER SEARCH BAR ── */
    .cyber-search-wrapper {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .cyber-search {
      overflow: hidden;
      width: 44px;
      height: 44px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      box-shadow: 0 0 10px rgba(0, 255, 102, 0.05);
      border-radius: 100px;
      display: flex;
      align-items: center;
      transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
      cursor: pointer;
      padding: 0 12px;
      position: relative;
    }

    .cyber-search:hover,
    .cyber-search:focus-within {
      width: 240px;
      border-color: var(--accent);
      box-shadow: 0 0 15px var(--accent-glow);
      background: rgba(8, 12, 32, 0.75);
    }

    .cyber-search-icon-wrapper {
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 20px;
      fill: var(--accent);
      transition: fill 0.3s ease;
      color: var(--accent);
    }

    .cyber-search:hover .cyber-search-icon-wrapper,
    .cyber-search:focus-within .cyber-search-icon-wrapper {
      fill: #ffffff;
      color: #ffffff;
    }

    .cyber-search-input {
      outline: none;
      border: none;
      background: transparent;
      width: 100%;
      color: #ffffff;
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(14px * var(--font-scale, 1)) ;
      font-weight: 500;
      padding-left: 12px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }

    .cyber-search:hover .cyber-search-input,
    .cyber-search:focus-within .cyber-search-input {
      opacity: 1;
      pointer-events: auto;
    }

    /* ── SEARCH LOADER ANIMATION ── */
    .loader-wrapper {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      user-select: none;
      gap: 12px;
      padding: 60px 0;
      animation: fadeIn 0.4s ease-out;
    }

    .loader {
      width: 24px;
      height: 24px;
      aspect-ratio: 1 / 1;
      border-radius: 50%;
      background-color: transparent;
      animation: loader-rotate 1.5s linear infinite;
      z-index: 0;
    }

    @keyframes loader-rotate {
      0% {
        transform: rotate(90deg);
        box-shadow:
          0 1px 1px 0 #fff inset,
          0 3px 5px 0 #ff5f9f inset,
          0 4px 4px 0 #0693ff inset;
      }
      50% {
        transform: rotate(270deg);
        background: #7c0911;
        box-shadow:
          0 1px 1px 0 #fff inset,
          0 3px 5px 0 #d60a47 inset,
          0 4px 4px 0 #fbef19 inset;
      }
      100% {
        transform: rotate(450deg);
        box-shadow:
          0 1px 1px 0 #fff inset,
          0 3px 5px 0 #ff5f9f inset,
          0 4px 4px 0 #28a9ff inset;
      }
    }

    .letter-wrapper {
      display: flex;
      gap: 3px;
    }

    .loader-letter {
      display: inline-block;
      opacity: 0.4;
      transform: translateY(0);
      animation: loader-letter-anim 2s infinite;
      z-index: 1;
      border-radius: 50ch;
      border: none;
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(18px * var(--font-scale, 1)) ;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .loader-letter:nth-child(1) { animation-delay: 0s; }
    .loader-letter:nth-child(2) { animation-delay: 0.1s; }
    .loader-letter:nth-child(3) { animation-delay: 0.2s; }
    .loader-letter:nth-child(4) { animation-delay: 0.3s; }
    .loader-letter:nth-child(5) { animation-delay: 0.4s; }
    .loader-letter:nth-child(6) { animation-delay: 0.5s; }
    .loader-letter:nth-child(7) { animation-delay: 0.6s; }
    .loader-letter:nth-child(8) { animation-delay: 0.7s; }
    .loader-letter:nth-child(9) { animation-delay: 0.8s; }

    @keyframes loader-letter-anim {
      0%, 100% {
        opacity: 0.4;
        transform: translateY(0);
      }
      20% {
        opacity: 1;
        transform: scale(1.2) translateY(-4px);
        color: var(--accent);
        text-shadow: 0 0 10px var(--accent-glow);
      }
      40% {
        opacity: 0.7;
        transform: translateY(0);
      }
    }

    /* ── CYBERNETIC NAV HUD TOGGLE SWITCH ── */
    #checkbox {
      display: none;
    }

    .toggle {
      position: fixed;
      top: 26px;
      right: clamp(20px, 5vw, 6%);
      z-index: 120;
      width: 40px;
      height: 40px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition-duration: 0.3s;
    }

    .bars {
      width: 100%;
      height: 4px;
      background-color: rgb(253, 255, 243);
      box-shadow: 0 0 8px var(--accent-glow);
      border-radius: 5px;
      transition-duration: 0.3s;
    }

    /* #checkbox:checked + .toggle .bars {
      margin-left: 13px;
    } */

    #checkbox:checked + .toggle #bar2 {
      transform: translateY(14px) rotate(60deg);
      margin-left: 0;
      transform-origin: right;
      transition-duration: 0.3s;
      z-index: 2;
    }

    #checkbox:checked + .toggle #bar1 {
      transform: translateY(28px) rotate(-60deg);
      transition-duration: 0.3s;
      transform-origin: left;
      z-index: 1;
    }

    #checkbox:checked + .toggle {
      transform: rotate(90deg);
    }
    /* #checkbox:checked + .toggle #bar3 {
      transform: rotate(90deg);
      transition-duration: .3s;
      transform-origin:right;
    } */

    #checkbox:checked ~ header {
      transform: translateY(-100%);
    }

    /* ── USER PROFILE DRIVER & DROPDOWN ── */
    .profile-menu-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 125;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Page dimmer background overlay */
    .page-dimmer {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(4, 6, 18, 0.35);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 101; /* sits below header (110) but above content (2) */
    }

    .profile-menu-container:hover ~ .page-dimmer {
      opacity: 1;
    }

    .hamburger {
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 56px;
      height: 56px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 50%;
      box-shadow: 0 0 15px rgba(0, 255, 102, 0.08);
      transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .hamburger:hover {
      border-color: var(--accent);
      box-shadow: 0 0 15px var(--accent-glow);
      background: rgba(8, 12, 32, 0.75);
    }

    /* ── DYNAMIC QUICK ACTIONS RADIAL WIDGET ── */
    .action-wrap {
      position: absolute;
      width: 56px;
      height: 56px;
      z-index: -1;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 9999px;
    }

    .backdrop {
      position: absolute;
      width: 100%;
      height: 100%;
      z-index: -1;
      border-radius: 9999px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      transform: scale(0);
      opacity: 0;
      transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .backdrop::before {
      content: "";
      position: absolute;
      height: 10.5rem;
      width: 10.5rem;
      border-radius: 9999px;
      background: linear-gradient(144deg, #af40ff, #4f46e5);
      animation: rotate-anim 1.5s linear infinite;
    }

    .backdrop::after {
      content: "";
      position: absolute;
      height: 100%;
      width: 100%;
      backdrop-filter: blur(8px);
      border-radius: 9999px;
      z-index: 1;
    }

    .action {
      --sz-light-hover: 72px;
      --rd-light-hover: 9999px;
      --l-light-hover: 0px;
      --cl-light: #0000;
      --cr-light: #af40ff;
      position: absolute;
      top: 0;
      left: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      height: 4.5rem;
      width: 4.5rem;
      border: none;
      background: none transparent;
      cursor: pointer;
      padding: 0.5rem;
      border-radius: 9999px;
      transform: translate(0, 0) scale(0);
      opacity: 0;
      pointer-events: none;
      transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
      z-index: 5;
    }

    .action-icon {
      height: 100%;
      width: 100%;
      position: relative;
      z-index: 9;
      padding: 0.5rem;
      border-radius: 9999px;
      background-color: rgba(8, 12, 32, 0.85);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      transition:
        transform 0.3s ease,
        color 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease;
    }

    .action-content {
      font-family: cursive, sans-serif;
      font-weight: bold;
      font-size: calc(13px * var(--font-scale, 1)) ;
      color: #ffffff;
      background-color: rgba(8, 12, 32, 0.95);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 6px 12px;
      position: absolute;
      right: calc(100% + 12px);
      top: 50%;
      transform: translateY(-50%) translateX(10px);
      opacity: 0;
      pointer-events: none;
      transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
      z-index: 99;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    /* Hover States & Transitions - Custom Branded Colorful Highlights */
    /* Settings Action (1st Child fanned left) */
    .action:nth-child(1) .action-icon {
      color: #ff8000;
      border-color: rgba(255, 128, 0, 0.3);
    }
    .action:nth-child(1):hover .action-icon {
      background-color: #ff8000;
      color: #040612;
      border-color: #ff8000;
      box-shadow: 0 0 20px rgba(255, 128, 0, 0.5);
      transform: scale(1.25);
    }

    /* Friends Action (2nd Child fanned diagonally) */
    .action:nth-child(2) .action-icon {
      color: #af40ff;
      border-color: rgba(175, 64, 255, 0.3);
    }
    .action:nth-child(2):hover .action-icon {
      background-color: #af40ff;
      color: #ffffff;
      border-color: #af40ff;
      box-shadow: 0 0 20px rgba(175, 64, 255, 0.5);
      transform: scale(1.25);
    }

    /* Profile Action (3rd Child fanned straight up) */
    .action:nth-child(3) .action-icon {
      color: #00f0ff;
      border-color: rgba(0, 240, 255, 0.3);
    }
    .action:nth-child(3):hover .action-icon {
      background-color: #00f0ff;
      color: #040612;
      border-color: #00f0ff;
      box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
      transform: scale(1.25);
    }

    @keyframes rotate-anim {
      from {
        transform: rotate(0);
      }
      to {
        transform: rotate(360deg);
      }
    }

    .action:hover .action-content {
      opacity: 1;
      transform: translateY(-50%) translateX(0);
    }

    /* Radial Fan Out Trigger coordinates (Bottom-Right Quarter Circle - Compact 90px offset) */
    .profile-menu-container:hover .backdrop {
      transform: scale(1.6);
      opacity: 1;
    }

    .profile-menu-container:hover .action-range-shield {
      transform: scale(1);
      opacity: 1;
      pointer-events: auto;
    }

    .profile-menu-container:hover .action {
      pointer-events: auto;
    }

    .profile-menu-container:hover .action:nth-child(1) {
      transform: translate(-90px, 0) scale(1);
      opacity: 1;
    }
    
    .profile-menu-container:hover .action:nth-child(2) {
      transform: translate(-64px, -64px) scale(1);
      opacity: 1;
    }
    
    .profile-menu-container:hover .action:nth-child(3) {
      transform: translate(0, -90px) scale(1);
      opacity: 1;
    }

    #profileCheckbox {
      display: none;
    }

    .hamburger svg {
      height: 2.2em;
      transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hamburger .line {
      fill: none;
      stroke: var(--text-primary);
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-width: 3;
      transition:
        stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
        stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1),
        stroke 0.3s ease;
    }

    .hamburger .line-top-bottom {
      stroke-dasharray: 12 63;
    }

    #profileCheckbox:checked ~ .hamburger svg {
      transform: rotate(-45deg);
    }

    #profileCheckbox:checked ~ .hamburger svg .line-top-bottom {
      stroke-dasharray: 20 300;
      stroke-dashoffset: -32.42;
    }

    #profileCheckbox:checked ~ .hamburger svg .line {
      stroke: var(--accent);
    }

    /* Cursor Hover Active Range Hotspot Shield */
    .action-range-shield {
      position: absolute;
      bottom: -6px;
      right: -6px;
      width: 130px;
      height: 130px;
      background: radial-gradient(circle at bottom right, var(--accent-glow) 20%, transparent 80%);
      border-radius: 100% 0 0 0;
      transform: scale(0);
      transform-origin: bottom right;
      opacity: 0;
      pointer-events: none;
      transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 1;
    }

    /* ── FULLSCREEN TRANSPARENT OVERLAY PAGE ── */
    .profile-dropdown {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(4, 6, 18, 0.65);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border-left: none;
      border-right: none;
      border-top: none;
      border-bottom: 1px solid var(--border);
      border-radius: 0;
      padding: 0;
      box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), inset 0 -30px 60px rgba(0, 0, 0, 0.4);
      opacity: 0;
      transform: translateY(-100%);
      pointer-events: none;
      /* Very smooth, slow top-to-bottom slide transition */
      transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
      z-index: 105; /* sits above header but below the fixed logo and hamburger toggle */
      display: flex;
      align-items: center;
      justify-content: center;
    }

    #profileCheckbox:checked ~ .profile-dropdown {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    /* Inner Cockpit Console Dashboard */
    .profile-console {
      max-width: 800px;
      width: 90%;
      background: rgba(8, 12, 32, 0.45);
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 40px;
      box-shadow: 0 0 30px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.02);
      backdrop-filter: blur(10px);
      display: grid;
      grid-template-columns: 1.2fr 1.8fr;
      gap: 40px;
      position: relative;
      opacity: 0;
      transform: translateY(30px);
      transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, opacity 0.8s ease 0.15s;
    }

    #profileCheckbox:checked ~ .profile-dropdown .profile-console {
      opacity: 1;
      transform: translateY(0);
    }

    @media (max-width: 768px) {
      .profile-console {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
        margin: 20px;
        max-height: 85vh;
        overflow-y: auto;
      }
      .profile-left-panel {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-right: 0 !important;
        padding-bottom: 20px;
      }
    }


    /* Dropdown Header */
    .profile-hdr {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
    }

    .profile-avatar-wrap {
      position: relative;
      width: 52px;
      height: 52px;
    }

    .profile-avatar-glow {
      position: absolute;
      inset: -3px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent) 0%, var(--accent-glow) 100%);
      opacity: 0.8;
      filter: blur(4px);
      animation: pulse-glow 2s infinite alternate;
    }

    @keyframes pulse-glow {
      0% { opacity: 0.5; filter: blur(3px); }
      100% { opacity: 0.9; filter: blur(6px); }
    }

    .profile-avatar {
      position: relative;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid rgba(255, 255, 255, 0.1);
    }

    .profile-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
      align-items: flex-start;
      text-align: left;
    }

    .profile-username {
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(14px * var(--font-scale, 1)) ;
      font-weight: 700;
      color: #ffffff;
      letter-spacing: 0.05em;
    }

    .profile-rank {
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(8px * var(--font-scale, 1)) ;
      font-weight: 800;
      color: var(--accent);
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    /* Stats Box */
    .profile-stats {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 20px;
      padding: 12px;
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 8px;
    }

    .stat-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }

    .stat-box .label {
      font-size: calc(8px * var(--font-scale, 1)) ;
      font-weight: 700;
      color: var(--text-muted);
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .stat-box .val {
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(14px * var(--font-scale, 1)) ;
      font-weight: 800;
      color: #ffffff;
    }

    /* Links */
    .profile-links {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 0;
      margin: 0;
    }

    .profile-links li a {
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(12px * var(--font-scale, 1)) ;
      font-weight: 700;
      text-decoration: none;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      padding: 10px 14px;
      border-radius: 6px;
      background: transparent;
      border: 1px solid transparent;
      transition: all 0.25s ease;
    }

    .profile-links li a:hover {
      color: #ffffff;
      background: rgba(0, 255, 102, 0.05);
      border-color: var(--border);
      padding-left: 18px;
    }

    body.night-mode .profile-links li a:hover {
      background: rgba(255, 179, 0, 0.05);
    }

    .profile-links li.logout-item a {
      color: var(--text-muted);
      border-top: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 0;
      margin-top: 4px;
      padding-top: 14px;
    }

    .profile-links li.logout-item a:hover {
      color: var(--danger);
      background: rgba(255, 0, 85, 0.05);
      border-color: rgba(255, 0, 85, 0.15);
    }

    /* ── SETTINGS MODAL ── */
    .settings-modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 500;
      background: rgba(0,0,0,0.6);
      backdrop-filter: blur(4px);
      justify-content: center;
      align-items: center;
    }
    .settings-modal-overlay.open { display: flex; }
    .settings-modal-box {
      position: relative;
      background: rgba(10,12,30,0.55);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 16px;
      width: 780px;
      height: 520px;
      display: flex;
      flex-direction: row;
      overflow: visible;
      box-shadow: 0 0 40px rgba(0,255,100,0.06);
      animation: modalIn 0.25s ease;
    }
    .settings-modal-close {
      position: absolute;
      top: 14px;
      right: 18px;
      background: none;
      border: none;
      color: rgba(255,255,255,0.5);
      font-size: calc(24px * var(--font-scale, 1)) ;
      cursor: pointer;
      z-index: 10;
      transition: color 0.2s;
    }
    .settings-modal-close:hover { color: #fff; }
    .settings-sidebar {
      width: 200px;
      flex-shrink: 0;
      padding: 24px 0;
      border-right: 1px solid rgba(255,255,255,0.07);
      border-radius: 16px 0 0 16px;
      overflow: hidden;
      background: rgba(0,0,0,0.15);
    }
    .settings-sidebar-title {
      color: white;
      font-size: calc(15px * var(--font-scale, 1)) ;
      font-weight: 700;
      letter-spacing: 0.08em;
      padding: 0 20px 16px;
      margin: 0;
      border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    .settings-nav {
      list-style: none;
      padding: 12px 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
      overflow-y: auto;
      max-height: 400px;
    }
    .settings-nav::-webkit-scrollbar { width: 4px; }
    .settings-nav::-webkit-scrollbar-track { background: transparent; }
    .settings-nav::-webkit-scrollbar-thumb { background: rgba(0,255,100,0.25); border-radius: 4px; }
    .settings-nav::-webkit-scrollbar-thumb:hover { background: rgba(0,255,100,0.5); }
    
    .settings-content::-webkit-scrollbar { width: 5px; }
    .settings-content::-webkit-scrollbar-track { background: transparent; }
    .settings-content::-webkit-scrollbar-thumb { background: rgba(0,255,100,0.25); border-radius: 4px; }
    .settings-content::-webkit-scrollbar-thumb:hover { background: rgba(0,255,100,0.5); }

    body.night-mode .settings-nav::-webkit-scrollbar-thumb { background: rgba(255, 179, 0, 0.25); }
    body.night-mode .settings-nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 179, 0, 0.5); }
    body.night-mode .settings-content::-webkit-scrollbar-thumb { background: rgba(255, 179, 0, 0.25); }
    body.night-mode .settings-content::-webkit-scrollbar-thumb:hover { background: rgba(255, 179, 0, 0.5); }
    .settings-nav-item {
      padding: 10px 20px;
      font-size: calc(12px * var(--font-scale, 1)) ;
      color: rgba(255,255,255,0.45);
      cursor: pointer;
      border-left: 2px solid transparent;
      transition: all 0.2s;
    }
    .settings-nav-item:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.03); }
    .settings-nav-item.active { color: #00ff64; border-left-color: #00ff64; background: rgba(0,255,100,0.05); }
    .settings-divider { width: 1px; background: rgba(255,255,255,0.07); flex-shrink: 0; }
    .settings-content { flex: 1; overflow-y: auto; overflow-x: visible; padding: 28px; border-radius: 0 16px 16px 0; }
    .settings-panel { display: none; flex-direction: column; gap: 18px; }
    .settings-panel.active { display: flex; }
    .s-panel-title {
      color: white;
      font-size: calc(14px * var(--font-scale, 1)) ;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin: 0 0 4px;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    .s-field { display: flex; flex-direction: column; gap: 6px; }
    .s-field label:first-child {
      font-size: calc(11px * var(--font-scale, 1)) ;
      color: rgba(255,255,255,0.4);
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }
    .s-field input[type="text"],
    .s-field input[type="email"],
    .s-field input[type="password"],
    .s-field input[type="date"],
    .s-field input[type="file"] {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      padding: 9px 13px;
      color: white;
      font-size: calc(13px * var(--font-scale, 1)) ;
      outline: none;
      transition: border-color 0.2s;
    }
    .s-field input:focus { border-color: rgba(0,255,100,0.4); }
    .s-toggle-field { flex-direction: row !important; align-items: center; justify-content: space-between; }
    .s-toggle { position: relative; width: 40px; height: 22px; cursor: pointer; }
    .s-toggle input { opacity: 0; width: 0; height: 0; }
    .s-slider {
      position: absolute;
      inset: 0;
      background: rgba(255,255,255,0.1);
      border-radius: 22px;
      transition: 0.3s;
    }
    .s-slider::before {
      content: '';
      position: absolute;
      width: 16px; height: 16px;
      left: 3px; bottom: 3px;
      background: white;
      border-radius: 50%;
      transition: 0.3s;
    }
    .s-toggle input:checked + .s-slider { background: #00ff64; }
    .s-toggle input:checked + .s-slider::before { transform: translateX(18px); }
    .s-range { width: 100%; accent-color: #00ff64; cursor: pointer; }
    .s-color-row { display: flex; gap: 8px; }
    .s-color {
      width: 24px; height: 24px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid transparent;
      transition: transform 0.2s;
    }
    .s-color.active, .s-color:hover { border-color: white; transform: scale(1.2); }
    .s-select {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      padding: 9px 13px;
      color: white;
      font-size: calc(13px * var(--font-scale, 1)) ;
      outline: none;
      width: 100%;
    }
    .s-select option {
      background: #0d0f24;
      color: white;
    }
    .s-save-btn {
      align-self: flex-start;
      background: rgba(0,255,100,0.1);
      border: 1px solid rgba(0,255,100,0.3);
      color: #00ff64;
      font-size: calc(12px * var(--font-scale, 1)) ;
      font-weight: 700;
      padding: 8px 20px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .s-save-btn:hover { background: rgba(0,255,100,0.2); }
    .s-danger-btn {
      align-self: flex-start;
      background: rgba(255,50,80,0.08);
      border: 1px solid rgba(255,50,80,0.25);
      color: #ff4466;
      font-size: calc(12px * var(--font-scale, 1)) ;
      font-weight: 700;
      padding: 8px 20px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .s-danger-btn:hover { background: rgba(255,50,80,0.18); }
    .s-linked-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 10px;
      padding: 12px 16px;
      color: white;
      font-size: calc(13px * var(--font-scale, 1)) ;
    }
    .s-link-btn {
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.15);
      color: rgba(255,255,255,0.6);
      font-size: calc(11px * var(--font-scale, 1)) ;
      padding: 5px 14px;
      border-radius: 20px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .s-link-btn.connected { border-color: rgba(0,255,100,0.3); color: #00ff64; background: rgba(0,255,100,0.07); }
    .s-link-btn:hover { color: white; border-color: rgba(255,255,255,0.4); }
    .s-session-badge {
      font-size: calc(10px * var(--font-scale, 1)) ;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 20px;
      letter-spacing: 0.06em;
    }
    .s-session-badge.current {
      background: rgba(0,255,100,0.1);
      border: 1px solid rgba(0,255,100,0.3);
      color: #00ff64;
    }
    /* Account info rows */
    .s-info-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .s-info-label {
      font-size: calc(11px * var(--font-scale, 1)) ;
      color: rgba(255,255,255,0.4);
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }
    .s-info-val {
      font-size: calc(13px * var(--font-scale, 1)) ;
      color: white;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .s-verified-badge {
      font-size: calc(10px * var(--font-scale, 1)) ;
      color: #00ff64;
      background: rgba(0,255,100,0.08);
      border: 1px solid rgba(0,255,100,0.2);
      padding: 2px 8px;
      border-radius: 20px;
    }
    .s-account-type {
      font-size: calc(11px * var(--font-scale, 1)) ;
      font-weight: 700;
      padding: 4px 12px;
      border-radius: 20px;
      letter-spacing: 0.06em;
      transition: all 0.25s ease;
    }
    .s-account-type.free {
      background: rgba(0, 240, 255, 0.06);
      border: 1px solid rgba(0, 240, 255, 0.25);
      color: #00f0ff;
      text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
    }
    .s-account-type.base {
      background: rgba(255, 170, 0, 0.08);
      border: 1px solid rgba(255, 170, 0, 0.3);
      color: #ffaa00;
      text-shadow: 0 0 6px rgba(255, 170, 0, 0.4);
    }
    .s-account-type.premium {
      background: rgba(255, 0, 240, 0.08);
      border: 1px solid rgba(255, 0, 240, 0.35);
      color: #ff00f0;
      text-shadow: 0 0 6px rgba(255, 0, 240, 0.45);
    }
    .s-account-type.admin {
      background: rgba(0, 255, 100, 0.1);
      border: 1px solid rgba(0, 255, 100, 0.45);
      color: #00ff64;
      text-shadow: 0 0 8px rgba(0, 255, 100, 0.5);
      box-shadow: 0 0 8px rgba(0, 255, 100, 0.15);
    }
    .s-tier-btn.active[data-tier="free"] {
      border-color: #00f0ff !important;
      color: #00f0ff !important;
      background: rgba(0, 240, 255, 0.1) !important;
      box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    }
    .s-tier-btn.active[data-tier="base"] {
      border-color: #ffaa00 !important;
      color: #ffaa00 !important;
      background: rgba(255, 170, 0, 0.1) !important;
      box-shadow: 0 0 10px rgba(255, 170, 0, 0.2);
    }
    .s-tier-btn.active[data-tier="premium"] {
      border-color: #ff00f0 !important;
      color: #ff00f0 !important;
      background: rgba(255, 0, 240, 0.12) !important;
      box-shadow: 0 0 10px rgba(255, 0, 240, 0.25);
    }
    .s-action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .s-action-btn {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.12);
      color: rgba(255,255,255,0.7);
      font-size: calc(12px * var(--font-scale, 1)) ;
      font-weight: 600;
      padding: 8px 16px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .s-action-btn:hover { background: rgba(255,255,255,0.1); color: white; border-color: rgba(255,255,255,0.3); }
    .s-warn-btn {
      align-self: flex-start;
      background: rgba(255,160,0,0.08);
      border: 1px solid rgba(255,160,0,0.25);
      color: #ffaa00;
      font-size: calc(12px * var(--font-scale, 1)) ;
      font-weight: 700;
      padding: 8px 20px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .s-warn-btn:hover { background: rgba(255,160,0,0.18); }

    /* ── CATEGORY FILTER SYSTEM ── */
    .category-scroll-wrapper {
      position: relative;
      width: 100%;
      margin-top: 18px;
      margin-bottom: 8px;
    }
    .category-filter-container {
      display: flex;
      overflow-x: auto;
      gap: 10px;
      padding: 8px 38px; /* Extra padding on sides to keep pills away from the arrows */
      scrollbar-width: none; /* Firefox */
      -ms-overflow-style: none; /* IE 10+ */
      cursor: grab;
      user-select: none;
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
    }
    .category-filter-container.dragging {
      cursor: grabbing;
    }
    .category-filter-container::-webkit-scrollbar {
      display: none; /* Chrome, Safari, Opera */
    }
    .scroll-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 28px;
      height: 28px;
      background: rgba(8, 12, 32, 0.88);
      border: 1px solid var(--border);
      border-radius: 50%;
      color: var(--text-secondary);
      font-size: calc(16px * var(--font-scale, 1)) ;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 10;
      opacity: 0;
      pointer-events: none;
      transition: 
        opacity 0.25s ease, 
        border-color 0.25s ease, 
        box-shadow 0.25s ease, 
        color 0.25s ease, 
        transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
      outline: none;
      line-height: 1;
    }
    .scroll-arrow:hover {
      border-color: var(--accent);
      color: var(--text-primary);
      box-shadow: 0 0 12px var(--accent-glow);
      transform: translateY(-50%) scale(1.15);
    }
    .scroll-arrow.left-arrow {
      left: 4px;
    }
    .scroll-arrow.right-arrow {
      right: 4px;
    }
    .category-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 14px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border);
      border-radius: 100px;
      color: var(--text-secondary);
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(12px * var(--font-scale, 1)) ;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
      white-space: nowrap;
      outline: none;
      flex-shrink: 0;
    }
    .category-pill:hover {
      border-color: var(--accent);
      box-shadow: 0 0 10px var(--accent-glow);
      transform: translateY(-1px);
      color: var(--text-primary);
    }
    .category-pill.active {
      background: var(--accent);
      border-color: var(--accent);
      color: var(--bg-primary) !important;
      box-shadow: 0 0 15px var(--accent-glow);
    }
    .pill-count {
      font-size: calc(9px * var(--font-scale, 1)) ;
      font-weight: 800;
      padding: 1px 6px;
      background: rgba(255, 255, 255, 0.07);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 100px;
      color: var(--text-muted);
      transition: all 0.25s ease;
    }
    .category-pill:hover .pill-count {
      border-color: var(--accent);
      color: var(--accent);
    }
    .category-pill.active .pill-count {
      background: rgba(0, 0, 0, 0.15);
      border-color: rgba(0, 0, 0, 0.15);
      color: var(--bg-primary);
    }

    /* ── EMPTY STATE N/A SYSTEM ── */
    .empty-category-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 50px 30px;
      background: rgba(255, 170, 0, 0.03);
      border: 1px solid rgba(255, 170, 0, 0.15);
      border-radius: var(--radius-lg);
      max-width: 480px;
      margin: 30px auto;
      text-align: center;
      box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(8px);
      animation: fadeIn 0.4s ease-out;
    }
    .empty-icon-wrap {
      position: relative;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .empty-icon-glow {
      position: absolute;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: #ffaa00;
      opacity: 0.2;
      filter: blur(14px);
      animation: pulse-glow 2s infinite alternate;
    }
    .empty-icon {
      font-size: 2.5rem;
      position: relative;
      z-index: 1;
    }
    .empty-title {
      font-family: 'Orbitron', sans-serif;
      font-size: calc(20px * var(--font-scale, 1)) ;
      font-weight: 800;
      color: #ffaa00;
      letter-spacing: 0.15em;
      margin: 8px 0 4px 0;
      text-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
    }
    .empty-desc {
      font-family: 'Space Grotesk', sans-serif;
      font-size: calc(13px * var(--font-scale, 1)) ;
      color: var(--text-secondary);
      margin-bottom: 20px;
      line-height: 1.5;
    }
    .empty-req-btn {
      outline: none;
      border: 1px solid #ffaa00;
      background: rgba(255, 170, 0, 0.1);
      color: #ffaa00;
      border-radius: 100px;
      font-family: 'Space Grotesk', sans-serif;
      font-weight: 700;
      font-size: calc(10px * var(--font-scale, 1)) ;
      padding: 8px 20px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 0 10px rgba(255, 170, 0, 0.1);
    }
    .empty-req-btn:hover {
      background: #ffaa00;
      color: var(--bg-primary);
      box-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
      transform: translateY(-2px);
    }


