*, *::before, *::after { box-sizing: border-box; }
  :root {
    --bg-base: #000;
    --blob-1: #0a0a0a;
    --blob-2: #111;
    --blob-3: #171717;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --dark: #090909;
    --surface: #181818;
    --btn: #242424;
    --hover: #2a2a2a;
    --bright: #444;
    --text: #fff;
    --muted: #999;
    --r-lg: 20px;
    --r-md: 16px;
    --r-sm: 10px;
    --smooth-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.15);
    --smooth-cubic: cubic-bezier(0.16, 1, 0.3, 1);
  }

  body, html {
    margin: 0; padding: 0; width: 100%; height: 100%;
    background: var(--bg-base);
    font-family: var(--font);
    color: var(--text);
    overflow: hidden;
  }

  .ambient-bg {
    position: absolute; inset: 0;
    z-index: 0; overflow: hidden; pointer-events: none;
    background: radial-gradient(circle at center, #0c0c0c 0%, var(--bg-base) 100%);
  }

  .blob {
    position: absolute; filter: blur(120px); opacity: 0.8; transform-origin: center;
    will-change: transform;
  }
  .blob-1 {
    top: -10%; left: -10%; width: 60vw; height: 60vh;
    background: var(--blob-1);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: float1 25s infinite alternate ease-in-out;
  }
  .blob-2 {
    bottom: -20%; right: -10%; width: 70vw; height: 70vh;
    background: var(--blob-2);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: float2 28s infinite alternate-reverse ease-in-out;
  }
  .blob-3 {
    top: 20%; left: 20%; width: 50vw; height: 50vh;
    background: var(--blob-3);
    border-radius: 50% 50% 40% 60% / 40% 60% 50% 40%;
    animation: float3 32s infinite alternate ease-in-out;
  }

  @keyframes float1 {
    0%   { transform: translate3d(0,0,0) rotate(0deg) scale(1); border-radius: 40% 60% 70% 30%/40% 50% 60% 50%; }
    50%  { transform: translate3d(15vw,10vh,0) rotate(45deg) scale(1.1); border-radius: 60% 40% 30% 70%/50% 60% 40% 60%; }
    100% { transform: translate3d(-5vw,15vh,0) rotate(90deg) scale(0.9); border-radius: 40% 60% 70% 30%/40% 50% 60% 50%; }
  }
  @keyframes float2 {
    0%   { transform: translate3d(0,0,0) rotate(0deg) scale(1); border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; }
    50%  { transform: translate3d(-15vw,-10vh,0) rotate(-45deg) scale(1.2); border-radius: 40% 60% 70% 30%/40% 50% 60% 50%; }
    100% { transform: translate3d(5vw,-20vh,0) rotate(-90deg) scale(0.8); border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; }
  }
  @keyframes float3 {
    0%   { transform: translate3d(0,0,0) rotate(0deg) scale(1); border-radius: 50% 50% 40% 60%/40% 60% 50% 40%; }
    50%  { transform: translate3d(-10vw,15vh,0) rotate(30deg) scale(1.3); border-radius: 30% 70% 60% 40%/50% 40% 60% 50%; }
    100% { transform: translate3d(15vw,-10vh,0) rotate(-30deg) scale(0.9); border-radius: 50% 50% 40% 60%/40% 60% 50% 40%; }
  }

  .grid-overlay {
    position: absolute; inset: 0;
    z-index: 1; pointer-events: none;
    background-image: radial-gradient(circle at center, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
  }

  #mainFrame {
    position: fixed; inset: 0; width: 100%; height: 100%;
    border: none; z-index: 2; background: transparent;
    transition: filter .6s var(--smooth-cubic), opacity .6s var(--smooth-cubic), transform .6s var(--smooth-cubic);
    will-change: filter, opacity, transform;
  }
  #mainFrame.blur-transition {
    filter: blur(15px) brightness(0.6); opacity: .5; transform: scale(1.02);
  }

  .backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none;
    transition: opacity .5s var(--smooth-cubic);
    z-index: 10;
  }
  .backdrop.active { opacity: 1; pointer-events: auto; }

  .widget-container {
    position: fixed; bottom: 30px; right: 30px;
    display: flex; flex-direction: column; align-items: flex-end;
    z-index: 9999;
  }

  .toggle-btn {
    position: relative; width: 68px; height: 68px;
    background: var(--surface);
    border: 2px solid var(--btn);
    border-radius: var(--r-lg);
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    transition:
      transform .4s var(--smooth-bounce),
      background-color .3s var(--smooth-cubic),
      border-color .3s var(--smooth-cubic),
      box-shadow .4s var(--smooth-cubic);
    z-index: 3;
    will-change: transform;
  }
  .toggle-btn:hover {
    background: var(--hover); border-color: var(--bright);
    transform: translate3d(0, -5px, 0) scale(1.05);
    box-shadow: 0 18px 45px rgba(0,0,0,0.9), 0 0 20px rgba(100,100,100,0.3);
  }
  .toggle-btn:active { transform: translate3d(0, -1px, 0) scale(0.96); }
  .toggle-btn.active {
    background: var(--dark); border-color: var(--btn);
    box-shadow: 0 10px 30px rgba(0,0,0,0.9);
  }

  .v-logo {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: "Arial Black", Impact, sans-serif;
    font-weight: 900; font-size: 32px; line-height: 1; user-select: none;
    transform-origin: center;
    transition: opacity .4s var(--smooth-cubic), transform .5s var(--smooth-bounce);
    will-change: transform, opacity;
  }
  .toggle-btn:hover .v-logo { transform: scale(1.04); }

  .close-icon-wrapper {
    position: absolute; display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: rotate(-135deg) scale(0.4);
    transition: opacity .4s var(--smooth-cubic), transform .5s var(--smooth-bounce);
    will-change: transform, opacity;
  }
  .toggle-btn.active .v-logo { opacity: 0; transform: rotate(135deg) scale(0.4); pointer-events: none; }
  .toggle-btn.active .close-icon-wrapper { opacity: 1; transform: rotate(0deg) scale(1); }

  .menu-wrapper {
    display: flex; gap: 18px; margin-bottom: 20px; z-index: 2;
    opacity: 0; pointer-events: none;
    transform: translate3d(0, 40px, 0) scale(0.92); filter: blur(8px);
    transform-origin: bottom right;
    transition:
      transform .5s var(--smooth-cubic),
      opacity .4s var(--smooth-cubic),
      filter .4s var(--smooth-cubic);
    will-change: transform, opacity, filter;
  }
  .menu-wrapper.open { opacity: 1; pointer-events: auto; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }

  .sidebar { display: flex; flex-direction: column; gap: 12px; justify-content: flex-end; }

  .icon-btn {
    width: 52px; height: 52px;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: var(--r-md);
    color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    opacity: 0;
    transition:
      transform .3s var(--smooth-bounce),
      background-color .25s var(--smooth-cubic),
      color .25s var(--smooth-cubic),
      box-shadow .25s var(--smooth-cubic);
    will-change: transform;
  }
  .icon-btn:hover {
    background: var(--hover); color: var(--text);
    transform: translate3d(-5px, 0, 0) scale(1.06);
    box-shadow: 0 6px 16px rgba(0,0,0,0.8);
  }
  .icon-btn:active { transform: translate3d(-2px, 0, 0) scale(0.96); }

  .main-panel {
    background: var(--dark);
    border-radius: var(--r-lg);
    border: 1px solid rgba(255,255,255,0.03);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.02);
    width: 350px; opacity: 0;
    overflow: hidden; 
  }

  .views-wrapper {
    display: flex;
    width: 200%;
    transition: transform 0.5s var(--smooth-cubic);
    will-change: transform;
  }
  .views-wrapper.show-games {
    transform: translate3d(-50%, 0, 0);
  }
  .view-panel {
    width: 50%;
    padding: 24px;
    display: flex; flex-direction: column; gap: 16px;
    flex-shrink: 0;
  }

  .grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 100px;
    gap: 14px;
  }

  .grid-item {
    background: var(--surface);
    border-radius: var(--r-md);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; color: var(--muted); text-decoration: none;
    font-size: 13px; font-weight: 500; cursor: pointer; border: none;
    transition:
      transform .3s var(--smooth-bounce),
      background-color .25s var(--smooth-cubic),
      color .25s var(--smooth-cubic),
      box-shadow .3s var(--smooth-cubic);
    will-change: transform;
  }
  .grid-item:hover {
    background: var(--hover); color: var(--text);
    transform: translate3d(0, -4px, 0) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
  }
  .grid-item:active { transform: translate3d(0, -1px, 0) scale(0.98); }
  
  .grid-item .main-icon { width: 28px; height: 28px; transition: transform .3s var(--smooth-bounce); }
  .grid-item:hover .main-icon { transform: scale(1.15) translate3d(0, -2px, 0); }
  
  .span-3 { grid-column: span 3; }
  .span-2 { grid-column: span 2; }
  .span-1 { grid-column: span 1; }

  .open .main-panel { animation: fadeUpMain .5s var(--smooth-cubic) forwards; }
  .open .icon-btn:nth-child(4) { animation: fadePopBtn .45s var(--smooth-bounce) .08s forwards; }
  .open .icon-btn:nth-child(3) { animation: fadePopBtn .45s var(--smooth-bounce) .14s forwards; }
  .open .icon-btn:nth-child(2) { animation: fadePopBtn .45s var(--smooth-bounce) .20s forwards; }
  .open .icon-btn:nth-child(1) { animation: fadePopBtn .45s var(--smooth-bounce) .26s forwards; }

  @keyframes fadeUpMain {
    from { opacity: 0; transform: translate3d(0, 25px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
  }
  @keyframes fadePopBtn {
    from { opacity: 0; transform: scale(0.8) translate3d(0, 15px, 0); }
    to   { opacity: 1; transform: scale(1) translate3d(0, 0, 0); }
  }
