    :root {
      --motion-fast: 180ms;
      --motion-base: 280ms;
      --motion-slow: 420ms;
      --motion-ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
      --motion-ease-decelerate: cubic-bezier(0.22, 1, 0.36, 1);
      --motion-ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
}

.browser-session-card {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px solid rgba(63, 63, 70, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(39, 39, 42, 0.92), rgba(24, 24, 27, 0.96));
  box-shadow: 0 24px 54px -34px rgba(0, 0, 0, 0.9);
}

.browser-session-panel {
  width: min(420px, 100%);
  text-align: center;
}

.browser-session-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  margin-bottom: 14px;
}

.browser-session-title {
  font-size: 16px;
  font-weight: 760;
  color: #fff;
}

.browser-session-meta {
  margin-top: 6px;
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.browser-session-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.browser-session-primary,
.browser-session-secondary {
  min-height: 40px;
  border-radius: 14px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(82, 82, 91, 0.9);
}

.browser-session-primary {
  background: #7c3aed;
  color: #fff;
  border-color: rgba(167, 139, 250, 0.72);
}

.browser-session-primary:hover {
  background: #8b5cf6;
}

.browser-session-secondary {
  background: #27272a;
  color: #e4e4e7;
}

.browser-session-secondary:hover {
  background: #3f3f46;
  color: #fff;
}

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: system-ui, sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility;
    }

    @keyframes motion-item-in {
      0% {
        opacity: 0;
        transform: translateY(8px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes motion-message-in {
      0% {
        opacity: 0;
        transform: translateY(8px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes motion-toast-out {
      0% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
      100% {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
      }
    }

    @keyframes motion-badge-pop {
      0% {
        opacity: 0;
        transform: scale(0.72);
      }
      55% {
        opacity: 1;
        transform: scale(1.08);
      }
      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

    @keyframes motion-dock-in {
      0% {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes motion-popover-in {
      0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .motion-item-in {
      animation: motion-item-in 320ms var(--motion-ease-decelerate) both;
    }

    .motion-message-in {
      animation: motion-message-in 220ms var(--motion-ease-decelerate) both;
    }

    .message-incoming {
      transform-origin: left bottom;
    }

    .message-outgoing {
      transform-origin: right bottom;
    }

    .motion-badge-pop {
      animation: motion-badge-pop 420ms var(--motion-ease-spring) both;
    }

    .motion-modal {
      opacity: 0;
      transition: opacity 200ms var(--motion-ease-standard);
    }

    .motion-modal [data-modal-panel] {
      opacity: 0;
      transform: translateY(10px) scale(0.992);
      transition: opacity 220ms var(--motion-ease-standard), transform 220ms var(--motion-ease-decelerate);
      will-change: transform, opacity;
    }

    .motion-modal.is-visible {
      opacity: 1;
    }

    .motion-modal.is-visible [data-modal-panel] {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    .motion-modal.is-closing {
      opacity: 0;
    }

    .motion-modal.is-closing [data-modal-panel] {
      opacity: 0;
      transform: translateY(8px) scale(0.992);
    }

    button,
    input,
    select,
    textarea {
      transition: transform var(--motion-fast) var(--motion-ease-spring), background-color var(--motion-fast) var(--motion-ease-standard), border-color var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-fast) var(--motion-ease-standard), color var(--motion-fast) var(--motion-ease-standard), opacity var(--motion-fast) var(--motion-ease-standard);
    }

    button:not(:disabled):active {
      transform: scale(0.985);
    }

    input:focus,
    select:focus,
    textarea:focus {
      transform: translateY(-1px);
    }

    #chatInput,
    #dmInput {
      overflow: hidden;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }

    #chatInput::-webkit-scrollbar,
    #dmInput::-webkit-scrollbar {
      display: none;
    }

    .room-card,
    .dm-conversation-row,
    .participant-row,
    .social-row {
      transition: transform var(--motion-base) var(--motion-ease-decelerate), box-shadow var(--motion-base) var(--motion-ease-standard), background-color var(--motion-fast) var(--motion-ease-standard), border-color var(--motion-fast) var(--motion-ease-standard);
      will-change: transform;
    }

    .room-card:hover,
    .dm-conversation-row:hover,
    .participant-row:hover,
    .social-row:hover {
      transform: translateY(-2px);
    }

    .room-card:hover {
      box-shadow: 0 22px 52px -28px rgba(124, 58, 237, 0.34);
    }

    .control-btn:hover,
    #lobbyTabRoomsBtn:hover,
    #lobbyTabFriendsBtn:hover,
    #lobbyDownloadDesktopBtn:hover,
    #lobbyCreateRoomBtn:hover {
      box-shadow: 0 18px 32px -24px rgba(0, 0, 0, 0.85);
    }

    .desktop-download-panel {
      overflow: hidden;
      background:
        radial-gradient(circle at 18% 12%, rgba(139, 92, 246, 0.22), transparent 32%),
        linear-gradient(180deg, rgba(39, 39, 42, 0.98), rgba(9, 9, 11, 0.98));
    }

    .desktop-download-hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 24px;
      align-items: start;
      padding: 32px 32px 24px;
      border-bottom: 1px solid rgba(63, 63, 70, 0.9);
    }

    .desktop-download-kicker {
      margin-bottom: 10px;
      color: #c4b5fd;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }

    .desktop-download-title {
      max-width: 760px;
      color: #fff;
      font-size: 36px;
      line-height: 1.08;
      font-weight: 850;
    }

    .desktop-download-copy {
      max-width: 780px;
      margin-top: 14px;
      color: #d4d4d8;
      font-size: 17px;
      line-height: 1.6;
    }

    .desktop-download-close {
      width: 44px;
      height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(82, 82, 91, 0.9);
      border-radius: 16px;
      background: rgba(39, 39, 42, 0.86);
      color: #d4d4d8;
    }

    .desktop-download-close:hover {
      background: #3f3f46;
      color: #fff;
    }

    .desktop-download-body {
      padding: 28px 32px 32px;
    }

    .desktop-download-benefits {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;
    }

    .desktop-download-benefit {
      min-height: 260px;
      padding: 22px;
      border: 1px solid rgba(63, 63, 70, 0.95);
      border-radius: 22px;
      background: rgba(24, 24, 27, 0.82);
    }

    .desktop-download-benefit-icon {
      width: 50px;
      height: 50px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 18px;
      border: 1px solid rgba(139, 92, 246, 0.44);
      border-radius: 18px;
      background: rgba(139, 92, 246, 0.13);
      color: #c4b5fd;
    }

    .desktop-download-benefit h3 {
      margin-bottom: 10px;
      color: #fff;
      font-size: 18px;
      line-height: 1.25;
      font-weight: 780;
    }

    .desktop-download-benefit p {
      color: #a1a1aa;
      font-size: 14px;
      line-height: 1.55;
    }

    .desktop-download-action {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-top: 22px;
      padding: 18px;
      border: 1px solid rgba(139, 92, 246, 0.34);
      border-radius: 22px;
      background: rgba(139, 92, 246, 0.11);
    }

    .desktop-download-action p {
      max-width: 560px;
      color: #ddd6fe;
      font-size: 15px;
      line-height: 1.5;
    }

    .desktop-download-button {
      min-height: 58px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 0 28px;
      border-radius: 20px;
      background: #7c3aed;
      color: #fff;
      font-size: 17px;
      font-weight: 800;
      white-space: nowrap;
      box-shadow: 0 20px 42px -24px rgba(124, 58, 237, 0.95);
    }

    .desktop-download-button:hover {
      background: #8b5cf6;
    }

    @media (max-width: 900px) {
      .desktop-download-benefits {
        grid-template-columns: 1fr;
      }

      .desktop-download-benefit {
        min-height: 0;
      }

      .desktop-download-action {
        align-items: stretch;
        flex-direction: column;
      }

      .desktop-download-button {
        width: 100%;
      }
    }

    @media (max-width: 640px) {
      .desktop-download-hero,
      .desktop-download-body {
        padding-left: 20px;
        padding-right: 20px;
      }

      .desktop-download-title {
        font-size: 28px;
      }

      .desktop-download-copy {
        font-size: 15px;
      }
    }

    .transfer-card:hover {
      box-shadow: 0 26px 52px -30px rgba(0, 0, 0, 0.92);
      border-color: rgba(113, 113, 122, 0.95);
    }

    .toast-item {
      animation: motion-item-in 340ms var(--motion-ease-spring) both;
    }

    .toast-item.toast-leaving {
      animation: motion-toast-out 220ms var(--motion-ease-standard) both;
    }

    #backgroundRoomDock {
      transform-origin: bottom right;
      animation: motion-dock-in 360ms var(--motion-ease-spring) both;
    }

    #localScreenPreview {
      transform-origin: bottom right;
      animation: motion-dock-in 320ms var(--motion-ease-spring) both;
    }

    #volumeOverlay.show #volumeMenu,
    .screen-volume-panel:not(.hidden) {
      animation: motion-popover-in 220ms var(--motion-ease-spring) both;
      transform-origin: bottom right;
    }
    video { background: #111; border-radius: 12px; }
    .speaking { animation: pulse 1.5s infinite; }
    @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
    .participant-speaking .username {
      color: #a855f7 !important;
      font-weight: 700;
    }

    #roomContent { flex-direction: row; position: relative; }
    #videoPanel { flex: 1 1 65%; padding: 24px; overflow-y: auto; }
    #splitDivider {
      width: 4px;
      background: #27272a;
      cursor: col-resize;
      position: relative;
      transition: width var(--motion-base) var(--motion-ease-decelerate), opacity var(--motion-fast) var(--motion-ease-standard), transform var(--motion-base) var(--motion-ease-decelerate);
    }

    #chatContainer > * {
      opacity: 1;
      transition: opacity 140ms var(--motion-ease-standard) 170ms;
    }

    #chatContainer.is-opening > * {
      opacity: 0;
      transition-delay: 0ms;
    }
    #splitDivider::after {
      content: '';
      position: absolute;
      left: -4px;
      right: -4px;
      top: 0;
      bottom: 0;
    }
    #splitDivider.is-collapsed {
      width: 0;
      opacity: 0;
      transform: translateX(12px);
      pointer-events: none;
    }
    #chatContainer {
      position: static !important;
      width: 380px;
      min-width: 280px;
      flex-shrink: 0;
      height: 100% !important;
      border-radius: 0 !important;
      border-left: 1px solid #27272a;
      box-shadow: none;
      z-index: auto;
      display: flex;
      flex-direction: column;
      background: #18181b;
      overflow: hidden;
      transition: width var(--motion-base) var(--motion-ease-decelerate), opacity var(--motion-fast) var(--motion-ease-standard), transform var(--motion-base) var(--motion-ease-decelerate);
    }

    #chatContainer.is-resizing {
      transition: none;
    }

    #chatContainer.is-collapsed {
      width: 0 !important;
      min-width: 0;
      opacity: 0;
      transform: translateX(26px);
      border-left-color: transparent;
      pointer-events: none;
    }

    #chatContainer.is-collapsed > * {
      opacity: 0;
      transition-delay: 0ms;
    }

    #chatHeader { display: none; }
    #chatEdgeHoverZone {
      position: absolute;
      top: 50%;
      left: 0;
      width: 104px;
      height: 260px;
      transform: translateY(-50%);
      z-index: 24;
      transition: left var(--motion-base) var(--motion-ease-decelerate), opacity var(--motion-fast) var(--motion-ease-standard);
    }
    #chatEdgeToggle {
      position: absolute;
      right: 14px;
      top: 50%;
      width: 38px;
      height: 76px;
      border-radius: 9999px;
      background: linear-gradient(180deg, #a78bfa, #7c3aed);
      border: 1px solid rgba(221, 214, 254, 0.65);
      color: #ffffff;
      box-shadow: 0 18px 34px -22px rgba(124, 58, 237, 0.88), inset 0 1px 0 rgba(255,255,255,0.22);
      opacity: 0;
      pointer-events: none;
      transform: translate(18px, -50%) scale(0.96);
      transition: transform var(--motion-base) var(--motion-ease-decelerate), opacity var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-fast) var(--motion-ease-standard), background-color var(--motion-fast) var(--motion-ease-standard);
      will-change: transform, opacity;
    }
    #chatEdgeHoverZone:hover #chatEdgeToggle,
    #chatEdgeToggle:focus-visible {
      opacity: 1;
      pointer-events: auto;
      transform: translate(0, -50%) scale(1.03);
    }
    #chatEdgeToggle:hover {
      background: linear-gradient(180deg, #c4b5fd, #8b5cf6);
      box-shadow: 0 22px 38px -20px rgba(124, 58, 237, 0.98), inset 0 1px 0 rgba(255,255,255,0.28);
    }
    #chatEdgeToggle:active {
      transform: translate(0, -50%) scale(0.98);
    }
    #chatEdgeToggle svg {
      transition: transform var(--motion-base) var(--motion-ease-spring);
    }
    #chatEdgeHoverZone.is-chat-hidden #chatEdgeToggle svg {
      transform: rotate(180deg);
    }
    #chatEdgeHoverZone.is-chat-hidden #chatUnreadBadge {
      border-color: #7c3aed;
    }
    #chatUnreadBadge {
      position: absolute;
      right: -2px;
      top: -2px;
      width: 12px;
      height: 12px;
      border-radius: 9999px;
      border: 2px solid #18181b;
      background: #ef4444;
      pointer-events: none;
    }
    #chatMessages { flex: 1; padding: 14px; overflow-y: auto; font-size: 14px; display: flex; flex-direction: column; gap: 10px; color: #fff; }
    #chatInputArea { padding: 12px 14px; border-top: 1px solid #3f3f46; display: flex; gap: 10px; align-items: center; background: #18181b; }
    #chatInput { flex: 1; background-color: #27272a; border: 1px solid #52525b; border-radius: 9999px; padding: 12px 20px; color: #ffffff; font-size: 15px; outline: none; }
    #chatInput:focus { border-color: #a855f7; box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3); }
    #chatInput::placeholder { color: #71717a; }

    .message-icon-btn,
    .message-send-btn {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: transform var(--motion-fast) var(--motion-ease-spring), background var(--motion-fast) var(--motion-ease-standard), border-color var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-fast) var(--motion-ease-standard), filter var(--motion-fast) var(--motion-ease-standard);
    }

    .message-icon-btn {
      width: 46px;
      height: 46px;
      border-radius: 16px;
      color: #f4f4f5;
      background: linear-gradient(180deg, #27272a, #1f1f23);
      border: 1px solid #3f3f46;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
      font-size: 19px;
    }

    .message-icon-btn:hover {
      transform: translateY(-2px);
      background: linear-gradient(180deg, #323239, #27272a);
      border-color: #52525b;
      box-shadow: 0 16px 30px -24px rgba(0, 0, 0, 0.8);
    }

    .message-send-btn {
      width: 48px;
      height: 48px;
      border-radius: 18px;
      color: #ffffff;
      background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 58%, #c084fc 100%);
      border: 1px solid rgba(196, 181, 253, 0.45);
      box-shadow: 0 16px 30px -18px rgba(124, 58, 237, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    }

    .message-send-btn:hover {
      transform: translateY(-2px) scale(1.01);
      filter: brightness(1.06);
      box-shadow: 0 18px 34px -18px rgba(139, 92, 246, 1), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    }

    .message-send-btn:active,
    .message-icon-btn:active {
      transform: translateY(0);
    }

    .message-send-btn svg {
      width: 20px;
      height: 20px;
    }

    .ui-icon {
      width: 1.1rem;
      height: 1.1rem;
      flex-shrink: 0;
      display: inline-block;
      vertical-align: middle;
    }

    .ui-icon-lg {
      width: 1.5rem;
      height: 1.5rem;
    }

    .ui-icon-xl {
      width: 1.85rem;
      height: 1.85rem;
    }

    .brand-logo-shell {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 1rem;
      overflow: visible;
      filter: drop-shadow(0 16px 28px rgba(124, 58, 237, 0.34));
    }

    .brand-logo-mark {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: inherit;
    }

    #localScreenPreview {
      position: absolute;
      bottom: 88px;
      width: 260px;
      background: #18181b;
      border-radius: 16px;
      box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6);
      border: 1px solid #27272a;
      z-index: 55;
      overflow: hidden;
      display: none;
      flex-direction: column;
      transition: right var(--motion-base) var(--motion-ease-spring);
    }
    #localPreviewHeader { padding: 8px 14px; background: #27272a; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 500; border-bottom: 1px solid #3f3f46; }
    #localPreviewVideo { width: 100%; height: 146px; object-fit: cover; background: #111; }

    #volumeOverlay {
      position: fixed;
      top: 0; left: 0;
      width: 100vw;
      height: 100vh;
      z-index: 2147483647;
      pointer-events: none;
      display: none;
    }
    #volumeOverlay.show { display: block; }
    #volumeMenu {
      pointer-events: auto;
      background: #27272a;
      border: 1px solid #52525b;
      border-radius: 12px;
      box-shadow: 0 10px 30px -10px rgba(0,0,0,0.7);
      padding: 14px;
      width: 260px;
    }

    .screen-card,
    .camera-card {
      position: relative;
      border-radius: 18px;
      overflow: hidden;
      border: 1px solid #27272a;
      background: #09090b;
      transition: transform var(--motion-base) var(--motion-ease-decelerate), border-color var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-base) var(--motion-ease-standard);
      box-shadow: 0 12px 34px -28px rgba(0, 0, 0, 0.85);
      will-change: transform;
    }
    .screen-card:hover,
    .camera-card:hover {
      transform: translateY(-1px);
      border-color: rgba(139, 92, 246, 0.45);
      box-shadow: 0 28px 50px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(139, 92, 246, 0.12);
    }
    .camera-card video {
      width: 100%;
      aspect-ratio: 16 / 9;
      object-fit: cover;
    }
    .screen-card-actions {
      position: absolute;
      bottom: 12px;
      right: 12px;
      z-index: 3;
      display: flex;
      gap: 8px;
    }
    .screen-action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 12px;
      background: rgba(0, 0, 0, 0.72);
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      line-height: 1;
      transition: opacity var(--motion-fast) var(--motion-ease-standard), background var(--motion-fast) var(--motion-ease-standard), transform var(--motion-fast) var(--motion-ease-spring), box-shadow var(--motion-fast) var(--motion-ease-standard);
    }
    .screen-action-btn:hover {
      background: rgba(0, 0, 0, 0.9);
      transform: translateY(-2px);
      box-shadow: 0 12px 24px -20px rgba(0, 0, 0, 0.9);
    }
    .screen-volume-panel {
      position: absolute;
      bottom: 58px;
      right: 12px;
      z-index: 4;
      width: 228px;
      border-radius: 18px;
      border: 1px solid rgba(82, 82, 91, 0.95);
      background: rgba(24, 24, 27, 0.94);
      box-shadow: 0 18px 50px -24px rgba(0,0,0,0.9);
      padding: 14px;
      backdrop-filter: blur(10px);
    }
    .screen-card:fullscreen,
    .screen-card:-webkit-full-screen,
    .camera-card:fullscreen,
    .camera-card:-webkit-full-screen {
      width: 100%;
      height: 100%;
      border: 0;
      border-radius: 0;
      background: #000;
      transform: none !important;
      box-shadow: none !important;
    }
    .screen-card:fullscreen video,
    .screen-card:-webkit-full-screen video,
    .camera-card:fullscreen video,
    .camera-card:-webkit-full-screen video {
      width: 100%;
      height: 100%;
      aspect-ratio: auto;
      object-fit: contain !important;
      border-radius: 0;
      background: #000;
    }
    .screen-card:fullscreen .screen-action-btn,
    .screen-card:-webkit-full-screen .screen-action-btn,
    .camera-card:fullscreen .screen-action-btn,
    .camera-card:-webkit-full-screen .screen-action-btn {
      opacity: 1 !important;
    }

    #toastStack {
      position: fixed;
      top: 16px;
      right: 16px;
      z-index: 2147483647;
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: none;
      max-width: min(92vw, 360px);
    }
    .toast-item {
      pointer-events: auto;
      border-radius: 16px;
      border: 1px solid rgba(82, 82, 91, 0.95);
      background: rgba(24, 24, 27, 0.96);
      color: #fff;
      box-shadow: 0 18px 40px -24px rgba(0,0,0,0.75);
      padding: 14px 16px;
      font-size: 14px;
      line-height: 1.45;
      backdrop-filter: blur(10px);
    }
    .toast-item.toast-error { border-color: rgba(239, 68, 68, 0.55); }
    .toast-item.toast-success { border-color: rgba(34, 197, 94, 0.55); }

    #transferTray {
      position: fixed;
      left: 16px;
      bottom: 16px;
      z-index: 2147483646;
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: min(92vw, 380px);
      pointer-events: none;
    }
    .transfer-card {
      pointer-events: auto;
      border-radius: 18px;
      border: 1px solid rgba(82, 82, 91, 0.9);
      background: rgba(24, 24, 27, 0.96);
      box-shadow: 0 20px 50px -28px rgba(0,0,0,0.9);
      padding: 14px;
      backdrop-filter: blur(12px);
    }
    .transfer-progress-track {
      width: 100%;
      height: 8px;
      border-radius: 9999px;
      background: rgba(63, 63, 70, 0.85);
      overflow: hidden;
    }
    .transfer-progress-fill {
      height: 100%;
      border-radius: 9999px;
      background: linear-gradient(90deg, #8b5cf6 0%, #22c55e 100%);
      transition: width 0.15s ease;
    }
    .transfer-action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      padding: 0 14px;
      border-radius: 12px;
      font-size: 13px;
      font-weight: 600;
      transition: background var(--motion-fast) var(--motion-ease-standard), transform var(--motion-fast) var(--motion-ease-spring), color var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-fast) var(--motion-ease-standard);
    }
    .transfer-action-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 28px -24px rgba(0, 0, 0, 0.85);
    }
    .transfer-action-primary {
      background: #8b5cf6;
      color: #fff;
    }
    .transfer-action-primary:hover {
      background: #7c3aed;
    }
    .transfer-action-secondary {
      background: #27272a;
      color: #f4f4f5;
    }
    .transfer-action-secondary:hover {
      background: #3f3f46;
    }
    .transfer-action-danger {
      background: #3f1d1d;
      color: #fecaca;
    }
    .transfer-action-danger:hover {
      background: #7f1d1d;
      color: #fff;
    }
    #backgroundRoomDock {
      position: fixed;
      right: 16px;
      bottom: 16px;
      z-index: 2147483645;
      display: flex;
      align-items: center;
      gap: 8px;
      width: min(92vw, 430px);
      padding: 8px;
      border-radius: 22px;
      border: 1px solid rgba(82, 82, 91, 0.92);
      background: rgba(24, 24, 27, 0.96);
      box-shadow: 0 20px 50px -28px rgba(0,0,0,0.9);
      backdrop-filter: blur(14px);
    }
    #backgroundRoomDock.hidden {
      display: none !important;
    }
    #backgroundRoomDockHeader {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    #backgroundRoomDockLabel {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.24em;
      text-transform: uppercase;
      color: #a1a1aa;
    }
    #backgroundRoomDockLabel::before {
      content: none;
      width: 8px;
      height: 8px;
      border-radius: 9999px;
      background: #22c55e;
      box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
      flex-shrink: 0;
    }
    #backgroundRoomDockHint {
      font-size: 11px;
      color: #71717a;
      white-space: nowrap;
    }
    #backgroundRoomReturnBtn {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border-radius: 17px;
      border: 1px solid rgba(113, 113, 122, 0.5);
      background: rgba(39, 39, 42, 0.78);
      text-align: left;
      transition: transform var(--motion-fast) var(--motion-ease-spring), background var(--motion-fast) var(--motion-ease-standard), border-color var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-fast) var(--motion-ease-standard);
    }
    #backgroundRoomReturnBtn:hover {
      transform: translateY(-2px);
      background: rgba(63, 63, 70, 0.92);
      border-color: rgba(139, 92, 246, 0.55);
      box-shadow: 0 20px 34px -28px rgba(139, 92, 246, 0.5);
    }
    #backgroundRoomControls {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      padding-top: 0;
      border-top: 0;
    }
    #backgroundRoomAvatar {
      width: 40px;
      height: 40px;
      flex-shrink: 0;
      overflow: hidden;
      border-radius: 14px;
      border: 1px solid rgba(82, 82, 91, 0.9);
      background: #18181b;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
    }
    .background-room-control-btn {
      width: 42px;
      height: 42px;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 16px;
      border: 1px solid rgba(82, 82, 91, 0.9);
      background: rgba(39, 39, 42, 0.78);
      transition: transform var(--motion-fast) var(--motion-ease-spring), background var(--motion-fast) var(--motion-ease-standard), border-color var(--motion-fast) var(--motion-ease-standard), color var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-fast) var(--motion-ease-standard);
    }
    .background-room-control-btn:hover {
      transform: translateY(-2px);
      background: rgba(63, 63, 70, 0.92);
      box-shadow: 0 16px 28px -24px rgba(0, 0, 0, 0.88);
    }
    .background-room-control-btn .control-icon {
      width: 22px;
      height: 22px;
    }
    #backgroundRoomLeaveBtn {
      width: 42px;
      height: 42px;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 16px;
      border: 1px solid rgba(127, 29, 29, 0.9);
      background: rgba(69, 10, 10, 0.78);
      color: #fecaca;
      transition: transform var(--motion-fast) var(--motion-ease-spring), background var(--motion-fast) var(--motion-ease-standard), color var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-fast) var(--motion-ease-standard);
    }
    #backgroundRoomLeaveBtn:hover {
      transform: translateY(-2px);
      background: rgba(127, 29, 29, 0.98);
      color: #fff;
      box-shadow: 0 18px 32px -24px rgba(127, 29, 29, 0.92);
    }
    @media (max-width: 640px) {
      #backgroundRoomDock {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
      }
    }

    video::-webkit-media-controls,
    video::-webkit-media-controls-panel,
    video::-webkit-media-controls-enclosure,
    video::-webkit-media-controls-timeline,
    video::-webkit-media-controls-volume-slider-container,
    video::-webkit-media-controls-volume-slider,
    video::-webkit-media-controls-play-button,
    video::-webkit-media-controls-mute-button,
    video::-webkit-media-controls-fullscreen-button,
    video::-moz-media-controls,
    video::-internal-media-controls,
    video::part(controls) {
      display: none !important;
    }

    .control-btn {
      width: 52px;
      height: 52px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 26px;
      border-radius: 9999px;
      border: 1px solid #3f3f46;
      color: #f4f4f5;
      transition: transform var(--motion-fast) var(--motion-ease-spring), background-color var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-fast) var(--motion-ease-standard), filter var(--motion-fast) var(--motion-ease-standard);
    }

    .room-game-control-dock {
      width: 66px;
      height: 52px;
      position: relative;
      flex: 0 0 66px;
    }

    .room-games-panel-slot {
      flex: 0 0 auto;
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid rgba(63, 63, 70, 0.78);
    }

    .room-games-panel-slot:empty {
      display: none;
    }

    .room-games-panel-slot .room-game-control-dock {
      width: 100%;
      flex-basis: auto;
    }

    .room-games-panel-slot .room-game-control-btn {
      width: 100%;
    }

    .room-games-panel-slot .room-games-menu {
      width: 100%;
    }

    .room-game-control-btn {
      position: relative;
      width: 66px;
      height: 52px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 16px;
      border: 1px solid rgba(82, 82, 91, 0.96);
      background:
        radial-gradient(circle at 50% 20%, rgba(167, 139, 250, 0.22), transparent 48%),
        linear-gradient(180deg, #3f3f46, #27272a 68%, #18181b);
      color: #f8fafc;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
      transform: none !important;
      transition: none !important;
    }

    .room-game-control-btn > svg {
      width: 24px;
      height: 24px;
    }

    .room-game-control-btn:hover,
    .room-game-control-btn.is-open {
      border-color: rgba(167, 139, 250, 0.78);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }

    .room-game-control-btn:active {
      transform: none !important;
    }

    .room-games-menu {
      position: absolute;
      left: 0;
      bottom: 62px;
      z-index: 22000;
      width: 270px;
      overflow: hidden;
      border-radius: 18px;
      border: 1px solid rgba(63, 63, 70, 0.95);
      background: rgba(24, 24, 27, 0.98);
      box-shadow: 0 22px 60px -28px rgba(0, 0, 0, 0.95);
      backdrop-filter: blur(16px);
      transform-origin: bottom left;
    }

    .room-games-menu-title {
      padding: 12px 14px 8px;
      font-size: 11px;
      line-height: 1;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      color: #a1a1aa;
    }

    .room-games-menu-item {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 13px 14px;
      color: #f4f4f5;
      font-size: 14px;
      text-align: left;
      background: transparent;
      transition: background-color var(--motion-fast) var(--motion-ease-standard);
    }

    .room-games-menu-item:hover {
      background: rgba(124, 58, 237, 0.18);
    }

    .room-games-menu-meta {
      flex: 0 0 auto;
      border-radius: 999px;
      border: 1px solid rgba(34, 197, 94, 0.32);
      padding: 3px 8px;
      color: #86efac;
      font-size: 11px;
      line-height: 1;
    }

    .room-game-card {
      width: min(360px, 100%);
    }

    .room-game-mini-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      border-radius: 18px;
      border: 1px solid rgba(82, 82, 91, 0.92);
      background:
        linear-gradient(135deg, rgba(39, 39, 42, 0.96), rgba(24, 24, 27, 0.98)),
        radial-gradient(circle at 12% 20%, rgba(124, 58, 237, 0.2), transparent 40%);
      padding: 14px 14px 14px 16px;
      box-shadow: 0 22px 54px -38px rgba(0, 0, 0, 0.92);
      animation: room-game-mini-in 240ms var(--motion-ease-spring) both;
    }

    .room-game-mini-kicker,
    .room-game-window-kicker {
      font-size: 10px;
      line-height: 1;
      text-transform: uppercase;
      letter-spacing: 0.22em;
      color: #a78bfa;
    }

    .room-game-mini-title {
      margin-top: 5px;
      color: #ffffff;
      font-size: 15px;
      font-weight: 700;
    }

    .room-game-mini-status {
      margin-top: 2px;
      color: #a1a1aa;
      font-size: 13px;
    }

    .room-game-mini-play,
    .room-game-action {
      min-height: 42px;
      border-radius: 14px;
      border: 1px solid rgba(139, 92, 246, 0.8);
      background: linear-gradient(180deg, #7c3aed, #5b21b6);
      color: #ffffff;
      font-size: 14px;
      font-weight: 700;
      box-shadow: 0 18px 34px -24px rgba(124, 58, 237, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.18);
      transition: transform var(--motion-fast) var(--motion-ease-spring), filter var(--motion-fast) var(--motion-ease-standard), border-color var(--motion-fast) var(--motion-ease-standard), box-shadow var(--motion-fast) var(--motion-ease-standard);
    }

    .room-game-mini-play {
      flex: 0 0 auto;
      padding: 0 18px;
    }

    .room-game-action {
      padding: 0 16px;
    }

    .room-game-action:not(.is-primary):not(.is-danger) {
      border-color: rgba(82, 82, 91, 0.9);
      background: #27272a;
      color: #f4f4f5;
      box-shadow: none;
    }

    .room-game-action.is-danger {
      border-color: rgba(239, 68, 68, 0.65);
      background: linear-gradient(180deg, #dc2626, #991b1b);
    }

    .room-game-mini-play:hover,
    .room-game-action:hover:not(:disabled) {
      filter: brightness(1.08);
      transform: translateY(-1px);
    }

    .room-game-action:disabled {
      cursor: not-allowed;
      opacity: 0.45;
      transform: none;
      filter: none;
    }

    .room-game-window {
      position: fixed;
      inset: 0;
      z-index: 90000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 28px;
      background:
        radial-gradient(circle at 20% 16%, rgba(124, 58, 237, 0.22), transparent 32%),
        rgba(0, 0, 0, 0.76);
      backdrop-filter: blur(12px);
    }

    .room-game-window.hidden {
      display: none;
    }

    .room-game-window-panel {
      width: min(980px, calc(100vw - 40px));
      max-height: min(780px, calc(100vh - 48px));
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border-radius: 24px;
      border: 1px solid rgba(82, 82, 91, 0.9);
      background:
        linear-gradient(135deg, rgba(24, 24, 27, 0.98), rgba(9, 9, 11, 0.98)),
        radial-gradient(circle at 22% 12%, rgba(124, 58, 237, 0.2), transparent 42%);
      box-shadow: 0 34px 110px -48px rgba(0, 0, 0, 0.98), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      animation: room-game-window-in 260ms var(--motion-ease-spring) both;
    }

    .room-game-window-header,
    .room-game-window-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 18px 20px;
      border-color: rgba(63, 63, 70, 0.86);
    }

    .room-game-window-header {
      border-bottom-width: 1px;
    }

    .room-game-window-footer {
      border-top-width: 1px;
      background: rgba(9, 9, 11, 0.36);
    }

    .room-game-window-title {
      margin-top: 5px;
      color: #ffffff;
      font-size: 22px;
      line-height: 1.15;
      font-weight: 800;
    }

    .room-game-window-status,
    .room-game-window-note {
      margin-top: 4px;
      color: #a1a1aa;
      font-size: 13px;
    }

    .room-game-window-close {
      width: 42px;
      height: 42px;
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      border: 1px solid rgba(82, 82, 91, 0.9);
      background: rgba(39, 39, 42, 0.82);
      color: #f4f4f5;
      transition: background-color var(--motion-fast) var(--motion-ease-standard), transform var(--motion-fast) var(--motion-ease-spring);
    }

    .room-game-window-close:hover {
      background: rgba(239, 68, 68, 0.82);
      transform: translateY(-1px);
    }

    .room-game-arena {
      min-height: 510px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 300px;
      overflow: hidden;
    }

    .room-game-stage {
      position: relative;
      min-height: 510px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
        radial-gradient(circle at 50% 42%, rgba(124, 58, 237, 0.18), transparent 42%);
      background-size: 28px 28px, 28px 28px, auto;
    }

    .room-game-stage::after {
      content: '';
      position: absolute;
      inset: 18px;
      border: 1px solid rgba(139, 92, 246, 0.2);
      border-radius: 26px;
      pointer-events: none;
    }

    .room-game-stage-glow {
      position: absolute;
      width: 260px;
      height: 260px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(124, 58, 237, 0.34), transparent 70%);
      opacity: 0.82;
    }

    .room-game-lobby-title {
      position: relative;
      max-width: 520px;
      padding: 0 24px;
      color: #ffffff;
      font-size: clamp(30px, 5vw, 56px);
      line-height: 1.02;
      font-weight: 900;
      text-align: center;
      transform: translateY(-54px);
    }

    .room-game-lobby-subtitle {
      position: absolute;
      top: calc(50% + 52px);
      left: 50%;
      width: min(520px, calc(100% - 64px));
      transform: translateX(-50%);
      color: #d4d4d8;
      font-size: 15px;
      text-align: center;
    }

    .room-game-lobby-actions {
      position: absolute;
      left: 50%;
      bottom: 56px;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
      transform: translateX(-50%);
    }

    .room-game-choice-field {
      position: relative;
      width: min(520px, calc(100% - 48px));
      height: 410px;
    }

    .room-game-choice {
      position: absolute;
      width: 166px;
      height: 150px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      border-radius: 28px;
      border: 1px solid rgba(139, 92, 246, 0.38);
      background:
        radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(63, 63, 70, 0.94), rgba(24, 24, 27, 0.94));
      color: #f8fafc;
      font-size: 15px;
      font-weight: 800;
      box-shadow: 0 26px 54px -38px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      transition: transform 180ms var(--motion-ease-spring), border-color 160ms var(--motion-ease-standard), box-shadow 160ms var(--motion-ease-standard), filter 160ms var(--motion-ease-standard);
    }

    .room-game-choice-scissors {
      left: 18px;
      top: 22px;
    }

    .room-game-choice-paper {
      right: 18px;
      top: 18px;
    }

    .room-game-choice-rock {
      left: 50%;
      bottom: 34px;
      transform: translateX(-50%);
    }

    .room-game-choice:hover:not(:disabled),
    .room-game-choice.is-selected {
      border-color: rgba(34, 197, 94, 0.84);
      box-shadow: 0 28px 62px -34px rgba(34, 197, 94, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.16);
      filter: brightness(1.08);
    }

    .room-game-choice-scissors:hover:not(:disabled) { transform: translateY(-6px) rotate(-2deg); }
    .room-game-choice-paper:hover:not(:disabled) { transform: translateY(-6px) rotate(2deg); }
    .room-game-choice-rock:hover:not(:disabled),
    .room-game-choice-rock.is-selected { transform: translateX(-50%) translateY(-6px); }

    .room-game-choice:disabled {
      cursor: not-allowed;
      opacity: 0.45;
      animation-play-state: paused;
    }

    .room-game-hand-svg {
      width: 82px;
      height: 82px;
      color: #f8fafc;
      filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.34));
    }

    .room-game-timer {
      position: absolute;
      left: 50%;
      top: 36%;
      width: 115px;
      height: 115px;
      display: flex;
      align-items: center;
      justify-content: center;
      transform: translate(-50%, -50%);
    }

    .room-game-timer-ring {
      position: absolute;
      inset: 0;
      border-radius: 999px;
      background:
        conic-gradient(#22c55e var(--timer-progress), rgba(63, 63, 70, 0.82) 0),
        radial-gradient(circle, #18181b 62%, transparent 63%);
      box-shadow: 0 0 34px rgba(34, 197, 94, 0.22);
    }

    .room-game-timer-value {
      position: relative;
      color: #ffffff;
      font-size: 23px;
      font-weight: 900;
    }

    .room-game-round-title {
      position: absolute;
      left: 0;
      right: 0;
      bottom: -18px;
      color: #ffffff;
      font-size: 26px;
      line-height: 1.18;
      font-weight: 900;
      text-align: center;
    }

    .room-game-roster {
      border-left: 1px solid rgba(63, 63, 70, 0.9);
      background: rgba(9, 9, 11, 0.42);
      padding: 18px;
      overflow-y: auto;
    }

    .room-game-roster-title {
      margin-bottom: 12px;
      color: #a1a1aa;
      font-size: 11px;
      line-height: 1;
      text-transform: uppercase;
      letter-spacing: 0.2em;
    }

    .room-game-roster-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .room-game-player {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 58px;
      border-radius: 18px;
      border: 1px solid rgba(63, 63, 70, 0.8);
      background: rgba(24, 24, 27, 0.72);
      padding: 10px;
      animation: room-game-player-in 220ms var(--motion-ease-spring) both;
    }

    .room-game-player.is-eliminated {
      opacity: 0.62;
    }

    .room-game-player-avatar {
      width: 38px;
      height: 38px;
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      border: 1px solid rgba(139, 92, 246, 0.42);
      background: rgba(124, 58, 237, 0.18);
      color: #ffffff;
      font-size: 15px;
      font-weight: 900;
    }

    .room-game-pill {
      flex: 0 0 auto;
      border-radius: 999px;
      border: 1px solid rgba(82, 82, 91, 0.85);
      padding: 4px 9px;
      color: #d4d4d8;
      font-size: 12px;
      line-height: 1;
      white-space: nowrap;
    }

    .room-game-pill.is-ready { border-color: rgba(34, 197, 94, 0.45); color: #86efac; }
    .room-game-pill.is-out { border-color: rgba(239, 68, 68, 0.45); color: #fca5a5; }
    .room-game-pill.is-active { border-color: rgba(167, 139, 250, 0.55); color: #c4b5fd; }

    .room-game-stage-results {
      padding: 32px;
      flex-direction: column;
      gap: 18px;
    }

    .room-game-results {
      position: relative;
      width: min(560px, 100%);
      border-radius: 24px;
      border: 1px solid rgba(82, 82, 91, 0.9);
      background: rgba(24, 24, 27, 0.82);
      padding: 18px;
      box-shadow: 0 22px 58px -40px rgba(0, 0, 0, 0.9);
    }

    .room-game-results-title {
      color: #ffffff;
      font-size: 18px;
      font-weight: 800;
    }

    .room-game-results-message {
      margin-top: 6px;
      color: #d4d4d8;
      font-size: 14px;
    }

    .room-game-results-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-top: 14px;
    }

    .room-game-result-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-radius: 14px;
      background: rgba(9, 9, 11, 0.56);
      padding: 10px 12px;
      color: #d4d4d8;
      font-size: 13px;
    }

    .room-game-result-row strong {
      color: #ffffff;
    }

    .room-game-winner {
      position: relative;
      width: min(480px, 100%);
      border-radius: 28px;
      border: 1px solid rgba(34, 197, 94, 0.45);
      background:
        radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.28), transparent 42%),
        rgba(20, 83, 45, 0.32);
      padding: 28px;
      text-align: center;
      box-shadow: 0 28px 70px -42px rgba(34, 197, 94, 0.78);
      animation: room-game-winner-in 460ms var(--motion-ease-spring) both;
    }

    .room-game-winner-crown {
      width: 62px;
      height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      border: 1px solid rgba(250, 204, 21, 0.5);
      background: rgba(250, 204, 21, 0.14);
      color: #fde68a;
      font-size: 13px;
      font-weight: 900;
      letter-spacing: 0.12em;
    }

    .room-game-winner-label {
      margin-top: 14px;
      color: #86efac;
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.2em;
    }

    .room-game-winner-name {
      margin-top: 8px;
      color: #ffffff;
      font-size: clamp(30px, 5vw, 52px);
      line-height: 1;
      font-weight: 900;
    }

    @keyframes room-game-window-in {
      from { opacity: 0; transform: translateY(18px) scale(0.96); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes room-game-mini-in {
      from { opacity: 0; transform: translateY(-8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes room-game-player-in {
      from { opacity: 0; transform: translateX(14px); }
      to { opacity: 1; transform: translateX(0); }
    }

    @keyframes room-game-float {
      0%, 100% { translate: 0 0; }
      50% { translate: 0 -8px; }
    }

    @keyframes room-game-pulse {
      0%, 100% { opacity: 0.6; transform: scale(0.88); }
      50% { opacity: 1; transform: scale(1.12); }
    }

    @keyframes room-game-timer-glow {
      from { filter: brightness(0.95); }
      to { filter: brightness(1.25); }
    }

    @keyframes room-game-winner-in {
      0% { opacity: 0; transform: scale(0.86) rotate(-1deg); }
      70% { transform: scale(1.03) rotate(0.5deg); }
      100% { opacity: 1; transform: scale(1) rotate(0); }
    }

    @media (max-width: 900px) {
      .room-game-arena {
        grid-template-columns: 1fr;
        overflow-y: auto;
      }

      .room-game-roster {
        border-left: 0;
        border-top: 1px solid rgba(63, 63, 70, 0.9);
      }

      .room-game-window-panel {
        max-height: calc(100vh - 24px);
      }
    }

    body[data-theme="fire"] .room-game-control-btn {
      border-color: rgba(251, 146, 60, 0.82);
      background:
        radial-gradient(circle at 50% 12%, rgba(254, 215, 170, 0.34), transparent 46%),
        linear-gradient(180deg, #f97316, #7f1d1d 72%, #1c0a07);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    body[data-theme="fire"] .room-games-menu,
    body[data-theme="fire"] .room-game-window-panel,
    body[data-theme="fire"] .room-game-mini-card {
      border-color: rgba(251, 146, 60, 0.38);
      background:
        radial-gradient(circle at 18% 10%, rgba(249, 115, 22, 0.18), transparent 42%),
        linear-gradient(135deg, rgba(39, 20, 12, 0.98), rgba(9, 9, 11, 0.98));
    }

    body[data-theme="fire"] .room-game-mini-kicker,
    body[data-theme="fire"] .room-game-window-kicker {
      color: #fdba74;
    }

    body[data-theme="fire"] .room-game-action.is-primary,
    body[data-theme="fire"] .room-game-mini-play {
      border-color: rgba(251, 146, 60, 0.78);
      background: linear-gradient(180deg, #f97316, #b91c1c);
      box-shadow: 0 18px 34px -24px rgba(249, 115, 22, 0.86), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    body[data-theme="space"] .room-game-control-btn {
      border-color: rgba(56, 189, 248, 0.72);
      background:
        radial-gradient(circle at 50% 18%, rgba(147, 197, 253, 0.3), transparent 46%),
        linear-gradient(180deg, #2563eb, #312e81 72%, #090c1e);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    body[data-theme="space"] .room-games-menu,
    body[data-theme="space"] .room-game-window-panel,
    body[data-theme="space"] .room-game-mini-card {
      border-color: rgba(56, 189, 248, 0.36);
      background:
        radial-gradient(circle at 18% 10%, rgba(56, 189, 248, 0.14), transparent 42%),
        linear-gradient(135deg, rgba(13, 20, 44, 0.98), rgba(9, 9, 11, 0.98));
    }

    body[data-theme="space"] .room-game-mini-kicker,
    body[data-theme="space"] .room-game-window-kicker {
      color: #7dd3fc;
    }

    body[data-theme="space"] .room-game-action.is-primary,
    body[data-theme="space"] .room-game-mini-play {
      border-color: rgba(56, 189, 248, 0.76);
      background: linear-gradient(180deg, #2563eb, #312e81);
      box-shadow: 0 18px 34px -24px rgba(56, 189, 248, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    .control-btn.sound-control,
    .background-room-control-btn.sound-control {
      background: #27272a !important;
      border-color: #3f3f46 !important;
      color: #ffffff;
      box-shadow: none;
    }

    .control-btn.sound-control:hover,
    .background-room-control-btn.sound-control:hover {
      background: #3f3f46 !important;
      color: #ffffff;
      box-shadow: 0 18px 32px -24px rgba(0, 0, 0, 0.85);
    }

    .control-btn.sound-control.is-muted,
    .background-room-control-btn.sound-control.is-muted {
      background: #dc2626 !important;
      border-color: #ef4444 !important;
      color: #ffffff;
      box-shadow: 0 18px 34px -22px rgba(220, 38, 38, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    .control-btn.settings-control {
      border-color: rgba(124, 58, 237, 0.45);
      background: radial-gradient(circle at 50% 18%, rgba(167, 139, 250, 0.24), transparent 44%), #27272a;
      color: #ffffff;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 32px -26px rgba(124, 58, 237, 0.72);
    }

    .control-btn.settings-control:hover {
      background: radial-gradient(circle at 50% 18%, rgba(196, 181, 253, 0.28), transparent 46%), #3f3f46;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 20px 36px -24px rgba(124, 58, 237, 0.9);
    }

    .avatar {
      width: 42px;
      height: 42px;
      border-radius: 9999px;
      object-fit: cover;
      border: 2px solid #27272a;
    }

    .presence-avatar {
      position: relative;
      display: inline-flex;
      flex-shrink: 0;
    }

    .presence-badge {
      position: absolute;
      right: -1px;
      bottom: -1px;
      width: 12px;
      height: 12px;
      border-radius: 9999px;
      background: #8b5cf6;
      border: 2px solid #18181b;
      box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.85);
    }

    * {
      scrollbar-width: thin;
      scrollbar-color: #52525b #18181b;
    }

    *::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }

    *::-webkit-scrollbar-track {
      background: #18181b;
    }

    *::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, #3f3f46, #52525b);
      border-radius: 9999px;
      border: 2px solid #18181b;
    }

    *::-webkit-scrollbar-thumb:hover {
      background: linear-gradient(180deg, #52525b, #71717a);
    }

    *::-webkit-scrollbar-corner {
      background: #18181b;
    }

    @keyframes fire-aura {
      0%, 100% { transform: translateY(2px) scale(0.98) skewX(-1deg); filter: blur(3px); opacity: 0.82; }
      35% { transform: translateY(-6px) scale(1.04) skewX(2deg); filter: blur(4px); opacity: 0.98; }
      68% { transform: translateY(-2px) scale(1.01) skewX(-3deg); filter: blur(2px); opacity: 0.9; }
    }

    @keyframes fire-tongues {
      0%, 100% { transform: translateY(4px) scaleY(0.92); opacity: 0.88; }
      40% { transform: translateY(-7px) scaleY(1.08); opacity: 1; }
      72% { transform: translateY(-2px) scaleY(1); opacity: 0.94; }
    }

    @keyframes fire-button-glow {
      0%, 100% { transform: translateX(-5%) scaleX(0.96); opacity: 0.34; }
      50% { transform: translateX(8%) scaleX(1.04); opacity: 0.5; }
    }

    body[data-theme="fire"] {
      background: #090604 !important;
      color: #fff7ed;
    }

    body[data-theme="fire"] #lobby {
      background: radial-gradient(circle at top left, rgba(251, 146, 60, 0.18), transparent 34%), radial-gradient(circle at 70% 8%, rgba(220, 38, 38, 0.12), transparent 28%), linear-gradient(180deg, #090604 0%, #17100b 100%) !important;
    }

    body[data-theme="fire"] .bg-zinc-900,
    body[data-theme="fire"] .bg-zinc-900\/70,
    body[data-theme="fire"] .bg-zinc-900\/80,
    body[data-theme="fire"] .bg-zinc-900\/85 {
      background-color: rgba(28, 18, 12, 0.94) !important;
    }

    body[data-theme="fire"] .bg-zinc-950,
    body[data-theme="fire"] .bg-zinc-950\/60,
    body[data-theme="fire"] .bg-zinc-950\/70,
    body[data-theme="fire"] .bg-zinc-950\/80 {
      background-color: rgba(13, 8, 5, 0.92) !important;
    }

    body[data-theme="fire"] .border-zinc-800,
    body[data-theme="fire"] .border-zinc-700 {
      border-color: rgba(124, 45, 18, 0.82) !important;
    }

    body[data-theme="fire"] .text-violet-300,
    body[data-theme="fire"] .text-violet-400 {
      color: #fdba74 !important;
    }

    body[data-theme="fire"] .bg-violet-600,
    body[data-theme="fire"] .hover\:bg-violet-600:hover,
    body[data-theme="fire"] .hover\:bg-violet-500:hover {
      background: linear-gradient(135deg, #ea580c, #b91c1c 58%, #7f1d1d) !important;
    }

    body[data-theme="fire"] .room-card:hover,
    body[data-theme="fire"] .participant-row:hover,
    body[data-theme="fire"] .dm-conversation-row:hover,
    body[data-theme="fire"] .social-row:hover {
      border-color: rgba(251, 146, 60, 0.72) !important;
      box-shadow: 0 22px 56px -30px rgba(249, 115, 22, 0.68), inset 0 1px 0 rgba(255, 237, 213, 0.08) !important;
    }

    body[data-theme="fire"] #lobby .rounded-3xl.bg-zinc-950\/80,
    body[data-theme="fire"] #lobbyRoomsTab > div,
    body[data-theme="fire"] #lobbyFriendsTab > div {
      border-color: rgba(154, 52, 18, 0.68) !important;
      background:
        radial-gradient(circle at 12% 0%, rgba(251, 146, 60, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(32, 20, 13, 0.94), rgba(16, 10, 7, 0.94)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.07), 0 22px 54px -38px rgba(249, 115, 22, 0.48) !important;
    }

    body[data-theme="fire"] #lobbyMessagesBadge,
    body[data-theme="fire"] #friendsAlertBadge {
      border-color: rgba(24, 12, 7, 0.98) !important;
      box-shadow: 0 0 16px rgba(248, 113, 22, 0.38);
    }

    body[data-theme="fire"] #lobby .bg-zinc-950\/70,
    body[data-theme="fire"] #lobbyTabRoomsBtn,
    body[data-theme="fire"] #lobbyTabFriendsBtn {
      border-color: rgba(154, 52, 18, 0.58) !important;
      background: linear-gradient(180deg, rgba(47, 25, 13, 0.9), rgba(24, 14, 9, 0.96)) !important;
      color: #fed7aa !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.06) !important;
    }

    body[data-theme="fire"] #lobbyTabRoomsBtn.bg-violet-600,
    body[data-theme="fire"] #lobbyTabFriendsBtn.bg-violet-600 {
      background: linear-gradient(135deg, #ea580c, #b91c1c 58%, #7f1d1d) !important;
      color: #fff7ed !important;
      box-shadow: 0 16px 30px -24px rgba(249, 115, 22, 0.78), inset 0 1px 0 rgba(255, 247, 237, 0.18) !important;
    }

    body[data-theme="fire"] #roomSearchInput,
    body[data-theme="fire"] #chatInput,
    body[data-theme="fire"] #dmInput,
    body[data-theme="fire"] #userSearchInput {
      background: linear-gradient(180deg, rgba(47, 25, 13, 0.94), rgba(24, 14, 9, 0.96)) !important;
      border-color: rgba(154, 52, 18, 0.78) !important;
      color: #fff7ed !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.07) !important;
    }

    body[data-theme="fire"] #roomSearchInput:focus,
    body[data-theme="fire"] #chatInput:focus,
    body[data-theme="fire"] #dmInput:focus,
    body[data-theme="fire"] #userSearchInput:focus {
      border-color: rgba(251, 146, 60, 0.95) !important;
      box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22), inset 0 1px 0 rgba(255, 237, 213, 0.1) !important;
    }

    body[data-theme="fire"] #roomSearchInput::placeholder,
    body[data-theme="fire"] #chatInput::placeholder,
    body[data-theme="fire"] #dmInput::placeholder,
    body[data-theme="fire"] #userSearchInput::placeholder {
      color: rgba(253, 186, 116, 0.55) !important;
    }

    body[data-theme="fire"] #myRoomsFilterAll,
    body[data-theme="fire"] #myRoomsFilterPublic,
    body[data-theme="fire"] #myRoomsFilterPrivate,
    body[data-theme="fire"] #myRoomsFilterActive {
      border: 1px solid rgba(154, 52, 18, 0.66) !important;
      background: linear-gradient(180deg, rgba(47, 25, 13, 0.92), rgba(24, 14, 9, 0.96)) !important;
      color: #fed7aa !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.06) !important;
    }

    body[data-theme="fire"] #myRoomsFilterAll.bg-violet-600,
    body[data-theme="fire"] #myRoomsFilterPublic.bg-violet-600,
    body[data-theme="fire"] #myRoomsFilterPrivate.bg-violet-600,
    body[data-theme="fire"] #myRoomsFilterActive.bg-violet-600 {
      border-color: rgba(253, 186, 116, 0.76) !important;
      background: linear-gradient(135deg, #ea580c, #b91c1c 58%, #7f1d1d) !important;
      color: #fff7ed !important;
      box-shadow: 0 16px 30px -24px rgba(249, 115, 22, 0.76), inset 0 1px 0 rgba(255, 247, 237, 0.18) !important;
    }

    body[data-theme="fire"] #myRoomsFilterAll:hover,
    body[data-theme="fire"] #myRoomsFilterPublic:hover,
    body[data-theme="fire"] #myRoomsFilterPrivate:hover,
    body[data-theme="fire"] #myRoomsFilterActive:hover,
    body[data-theme="fire"] #lobbyTabRoomsBtn:hover,
    body[data-theme="fire"] #lobbyTabFriendsBtn:hover,
    body[data-theme="fire"] #lobbyFriendsTab button:hover {
      border-color: rgba(251, 146, 60, 0.78) !important;
      background: linear-gradient(180deg, rgba(80, 35, 14, 0.96), rgba(43, 20, 10, 0.98)) !important;
      box-shadow: 0 16px 34px -26px rgba(249, 115, 22, 0.64), inset 0 1px 0 rgba(255, 237, 213, 0.1) !important;
    }

    body[data-theme="fire"] #lobbyCreateRoomBtn {
      box-shadow: 0 18px 38px -26px rgba(249, 115, 22, 0.88), inset 0 1px 0 rgba(255, 237, 213, 0.16) !important;
    }

    body[data-theme="fire"] #lobbyCreateRoomBtn:hover {
      box-shadow: 0 22px 44px -24px rgba(248, 113, 22, 0.98), inset 0 1px 0 rgba(255, 247, 237, 0.22) !important;
    }

    body[data-theme="fire"] .room-card {
      border-color: rgba(124, 45, 18, 0.76) !important;
      background:
        radial-gradient(circle at 20% 0%, rgba(251, 146, 60, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(32, 20, 13, 0.95), rgba(17, 10, 7, 0.96)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.06) !important;
    }

    body[data-theme="fire"] .room-card .bg-violet-500\/15,
    body[data-theme="fire"] .room-card .text-violet-300,
    body[data-theme="fire"] .room-card .border-violet-500\/20 {
      border-color: rgba(251, 146, 60, 0.28) !important;
      background-color: rgba(249, 115, 22, 0.14) !important;
      color: #fdba74 !important;
    }

    body[data-theme="fire"] #lobbyFriendsTab .border-r,
    body[data-theme="fire"] #lobbyFriendsTab .border-b,
    body[data-theme="fire"] #lobbyFriendsTab .border-t {
      border-color: rgba(124, 45, 18, 0.76) !important;
    }

    body[data-theme="fire"] #openFriendsBtn {
      border: 1px solid rgba(154, 52, 18, 0.68) !important;
      background:
        radial-gradient(circle at 50% 0%, rgba(253, 186, 116, 0.12), transparent 44%),
        linear-gradient(180deg, rgba(47, 25, 13, 0.94), rgba(24, 14, 9, 0.98)) !important;
      color: #fff7ed !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.08), 0 14px 30px -26px rgba(249, 115, 22, 0.5) !important;
    }

    body[data-theme="fire"] #openFriendsBtn:hover {
      border-color: rgba(251, 146, 60, 0.88) !important;
      background:
        radial-gradient(circle at 50% 0%, rgba(255, 247, 237, 0.16), transparent 44%),
        linear-gradient(180deg, rgba(80, 35, 14, 0.98), rgba(43, 20, 10, 0.98)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 247, 237, 0.15), 0 18px 36px -24px rgba(249, 115, 22, 0.78) !important;
    }

    body[data-theme="fire"] #lobbyFriendsTab .bg-\[\#141418\],
    body[data-theme="fire"] #dmMessages,
    body[data-theme="fire"] #chatMessages {
      background:
        radial-gradient(circle at 16% 0%, rgba(251, 146, 60, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(20, 12, 8, 0.98), rgba(12, 8, 5, 0.98)) !important;
    }

    body[data-theme="fire"] #dmInputArea {
      border-color: rgba(124, 45, 18, 0.82) !important;
      background:
        radial-gradient(circle at 18% 0%, rgba(251, 146, 60, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(24, 14, 9, 0.98), rgba(12, 8, 5, 0.98)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.06) !important;
    }

    body[data-theme="fire"] #friendsModal [data-modal-panel] {
      border-color: rgba(154, 52, 18, 0.72) !important;
      background:
        radial-gradient(circle at 18% 0%, rgba(251, 146, 60, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(31, 18, 11, 0.98), rgba(13, 8, 5, 0.98)) !important;
      box-shadow: 0 26px 70px -38px rgba(249, 115, 22, 0.5), inset 0 1px 0 rgba(255, 237, 213, 0.07) !important;
    }

    body[data-theme="fire"] #friendsModal .border-b {
      border-color: rgba(124, 45, 18, 0.78) !important;
    }

    body[data-theme="fire"] #userSearchResults .social-row,
    body[data-theme="fire"] #incomingRequestsList .social-row,
    body[data-theme="fire"] #outgoingRequestsList .social-row,
    body[data-theme="fire"] #friendsList .social-row {
      border-color: rgba(124, 45, 18, 0.58) !important;
      background: linear-gradient(180deg, rgba(40, 22, 13, 0.86), rgba(20, 12, 8, 0.92)) !important;
    }

    body[data-theme="fire"] .dm-conversation-row {
      border: 1px solid rgba(124, 45, 18, 0.54) !important;
      background: linear-gradient(180deg, rgba(39, 21, 12, 0.78), rgba(22, 13, 8, 0.82)) !important;
      color: #fff7ed !important;
    }

    body[data-theme="fire"] .dm-conversation-row.bg-violet-600\/20 {
      border-color: rgba(251, 146, 60, 0.58) !important;
      background: linear-gradient(135deg, rgba(154, 52, 18, 0.42), rgba(69, 26, 3, 0.82)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.09), 0 18px 34px -30px rgba(249, 115, 22, 0.62) !important;
    }

    body[data-theme="fire"] #roomView > .h-16,
    body[data-theme="fire"] #roomView > .h-16.bg-zinc-900 {
      border-color: rgba(124, 45, 18, 0.82) !important;
      background:
        radial-gradient(circle at 12% 0%, rgba(251, 146, 60, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(27, 17, 11, 0.98), rgba(13, 8, 5, 0.98)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.06) !important;
    }

    body[data-theme="fire"] #participantsPanel,
    body[data-theme="fire"] #videoPanel,
    body[data-theme="fire"] #chatContainer,
    body[data-theme="fire"] #chatInputArea {
      border-color: rgba(124, 45, 18, 0.82) !important;
      background:
        radial-gradient(circle at 20% 0%, rgba(251, 146, 60, 0.07), transparent 32%),
        linear-gradient(180deg, rgba(22, 13, 8, 0.98), rgba(11, 7, 5, 0.98)) !important;
    }

    body[data-theme="fire"] #splitDivider {
      background: linear-gradient(180deg, rgba(124, 45, 18, 0.32), rgba(251, 146, 60, 0.42), rgba(124, 45, 18, 0.32)) !important;
    }

    body[data-theme="fire"] .participant-row {
      border: 1px solid rgba(124, 45, 18, 0.58) !important;
      background: linear-gradient(180deg, rgba(40, 22, 13, 0.86), rgba(20, 12, 8, 0.92)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.06) !important;
    }

    body[data-theme="fire"] .participant-speaking .username {
      color: #fdba74 !important;
      text-shadow: 0 0 12px rgba(249, 115, 22, 0.56);
    }

    body[data-theme="fire"] #roomSettingsBtn,
    body[data-theme="fire"] #roomView button[onclick="backgroundCurrentRoom()"],
    body[data-theme="fire"] .control-btn,
    body[data-theme="fire"] .background-room-control-btn,
    body[data-theme="fire"] .message-icon-btn,
    body[data-theme="fire"] .message-send-btn {
      border-color: rgba(154, 52, 18, 0.72) !important;
      background:
        radial-gradient(circle at 50% 10%, rgba(253, 186, 116, 0.13), transparent 46%),
        linear-gradient(180deg, rgba(47, 25, 13, 0.96), rgba(24, 14, 9, 0.98)) !important;
      color: #fff7ed !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.08), 0 14px 30px -26px rgba(249, 115, 22, 0.45) !important;
    }

    body[data-theme="fire"] #roomSettingsBtn:hover,
    body[data-theme="fire"] #roomView button[onclick="backgroundCurrentRoom()"]:hover,
    body[data-theme="fire"] .control-btn:hover,
    body[data-theme="fire"] .background-room-control-btn:hover,
    body[data-theme="fire"] .message-icon-btn:hover,
    body[data-theme="fire"] .message-send-btn:hover {
      border-color: rgba(251, 146, 60, 0.92) !important;
      background:
        radial-gradient(circle at 50% 10%, rgba(255, 247, 237, 0.16), transparent 44%),
        linear-gradient(180deg, rgba(80, 35, 14, 0.98), rgba(43, 20, 10, 0.98)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 247, 237, 0.16), 0 18px 36px -24px rgba(249, 115, 22, 0.82) !important;
    }

    body[data-theme="fire"] .control-btn.sound-control,
    body[data-theme="fire"] .background-room-control-btn.sound-control,
    body[data-theme="fire"] .control-btn.settings-control {
      border-color: rgba(154, 52, 18, 0.72) !important;
      background:
        radial-gradient(circle at 50% 10%, rgba(253, 186, 116, 0.13), transparent 46%),
        linear-gradient(180deg, rgba(47, 25, 13, 0.96), rgba(24, 14, 9, 0.98)) !important;
      color: #fff7ed !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.08), 0 14px 30px -26px rgba(249, 115, 22, 0.45) !important;
    }

    body[data-theme="fire"] .control-btn.sound-control:hover,
    body[data-theme="fire"] .background-room-control-btn.sound-control:hover,
    body[data-theme="fire"] .control-btn.settings-control:hover {
      border-color: rgba(251, 146, 60, 0.92) !important;
      background:
        radial-gradient(circle at 50% 10%, rgba(255, 247, 237, 0.16), transparent 44%),
        linear-gradient(180deg, rgba(80, 35, 14, 0.98), rgba(43, 20, 10, 0.98)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 247, 237, 0.16), 0 18px 36px -24px rgba(249, 115, 22, 0.82) !important;
    }

    body[data-theme="fire"] .control-btn.sound-control.is-muted,
    body[data-theme="fire"] .background-room-control-btn.sound-control.is-muted,
    body[data-theme="fire"] .control-btn.bg-red-600,
    body[data-theme="fire"] #backgroundRoomLeaveBtn {
      border-color: rgba(248, 113, 113, 0.58) !important;
      background: linear-gradient(135deg, rgba(127, 29, 29, 0.95), rgba(69, 10, 10, 0.96)) !important;
      color: #fee2e2 !important;
      box-shadow: 0 18px 34px -22px rgba(185, 28, 28, 0.78), inset 0 1px 0 rgba(254, 202, 202, 0.16) !important;
    }

    body[data-theme="fire"] #backgroundRoomDock {
      border-color: rgba(154, 52, 18, 0.72) !important;
      background:
        radial-gradient(circle at 18% 0%, rgba(251, 146, 60, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(31, 18, 11, 0.96), rgba(13, 8, 5, 0.96)) !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.08), 0 24px 58px -32px rgba(249, 115, 22, 0.56) !important;
    }

    body[data-theme="fire"] #backgroundRoomReturnBtn {
      border-color: rgba(154, 52, 18, 0.62) !important;
      background: linear-gradient(180deg, rgba(47, 25, 13, 0.9), rgba(24, 14, 9, 0.94)) !important;
    }

    body[data-theme="fire"] #backgroundRoomReturnBtn:hover {
      border-color: rgba(251, 146, 60, 0.86) !important;
      background: linear-gradient(180deg, rgba(80, 35, 14, 0.94), rgba(43, 20, 10, 0.98)) !important;
      box-shadow: 0 20px 38px -28px rgba(249, 115, 22, 0.76), inset 0 1px 0 rgba(255, 237, 213, 0.12) !important;
    }

    body[data-theme="fire"] #backgroundRoomAvatar,
    body[data-theme="fire"] #roomAvatar,
    body[data-theme="fire"] #dmPartnerAvatar {
      border-color: rgba(154, 52, 18, 0.82) !important;
      background: linear-gradient(135deg, rgba(47, 25, 13, 0.95), rgba(17, 10, 7, 0.98)) !important;
      color: #fdba74 !important;
      box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.08) !important;
    }

    body[data-theme="fire"] #chatEdgeToggle {
      background: linear-gradient(180deg, #f97316, #b91c1c) !important;
      border-color: rgba(253, 186, 116, 0.76) !important;
      box-shadow: 0 18px 34px -22px rgba(249, 115, 22, 0.88), inset 0 1px 0 rgba(255, 247, 237, 0.22) !important;
    }

    body[data-theme="fire"] #chatEdgeToggle:hover {
      background: linear-gradient(180deg, #fb923c, #ea580c 48%, #991b1b) !important;
      box-shadow: 0 22px 38px -20px rgba(248, 113, 22, 0.98), inset 0 1px 0 rgba(255, 247, 237, 0.28) !important;
    }

    body[data-theme="fire"] #chatEdgeHoverZone.is-chat-hidden #chatUnreadBadge {
      border-color: #7c2d12 !important;
    }

    body[data-theme="fire"] .screen-card,
    body[data-theme="fire"] #localScreenPreview,
    body[data-theme="fire"] .screen-volume-panel,
    body[data-theme="fire"] #volumeMenu {
      border-color: rgba(154, 52, 18, 0.72) !important;
      background: linear-gradient(180deg, rgba(22, 13, 8, 0.96), rgba(9, 6, 4, 0.98)) !important;
      box-shadow: 0 24px 50px -34px rgba(249, 115, 22, 0.5), inset 0 1px 0 rgba(255, 237, 213, 0.06) !important;
    }

    body[data-theme="fire"] .screen-card:hover {
      border-color: rgba(251, 146, 60, 0.72) !important;
      box-shadow: 0 28px 54px -30px rgba(249, 115, 22, 0.62), 0 0 0 1px rgba(251, 146, 60, 0.12) !important;
    }

    body[data-theme="fire"] #localPreviewHeader,
    body[data-theme="fire"] .screen-action-btn {
      border-color: rgba(154, 52, 18, 0.64) !important;
      background: rgba(47, 25, 13, 0.82) !important;
      color: #fff7ed !important;
    }

    body[data-theme="fire"] .screen-action-btn:hover {
      background: rgba(80, 35, 14, 0.94) !important;
      box-shadow: 0 12px 24px -20px rgba(249, 115, 22, 0.72) !important;
    }

    body[data-theme="fire"] #volumeMenu .text-violet-300 {
      color: #fdba74 !important;
    }

    body[data-theme="fire"] #volumeMenu input[type="range"] {
      accent-color: #f97316;
    }

    body[data-theme="fire"] #volumeMenu button {
      border: 1px solid rgba(154, 52, 18, 0.62) !important;
      background: linear-gradient(180deg, rgba(47, 25, 13, 0.94), rgba(24, 14, 9, 0.96)) !important;
      color: #fff7ed !important;
    }

    body[data-theme="fire"] #volumeMenu button:hover {
      border-color: rgba(251, 146, 60, 0.86) !important;
      background: linear-gradient(180deg, rgba(80, 35, 14, 0.98), rgba(43, 20, 10, 0.98)) !important;
      box-shadow: 0 14px 28px -22px rgba(249, 115, 22, 0.68) !important;
    }

    body[data-theme="fire"] #volumeMenu button.hover\:bg-red-500:hover,
    body[data-theme="fire"] #volumeMenu button.hover\:bg-red-600:hover {
      border-color: rgba(248, 113, 113, 0.64) !important;
      background: linear-gradient(135deg, rgba(127, 29, 29, 0.96), rgba(69, 10, 10, 0.98)) !important;
    }

    body[data-theme="space"] {
      background:
        radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.14), transparent 28%),
        radial-gradient(circle at 74% 8%, rgba(167, 139, 250, 0.13), transparent 30%),
        radial-gradient(circle at 52% 78%, rgba(59, 130, 246, 0.1), transparent 34%),
        #030712 !important;
      color: #e0f2fe;
    }

    body[data-theme="space"] #lobby {
      background:
        radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.16), transparent 32%),
        radial-gradient(circle at 72% 6%, rgba(124, 58, 237, 0.14), transparent 30%),
        linear-gradient(180deg, #030712 0%, #07111f 100%) !important;
    }

    body[data-theme="space"] .bg-zinc-900,
    body[data-theme="space"] .bg-zinc-900\/70,
    body[data-theme="space"] .bg-zinc-900\/80,
    body[data-theme="space"] .bg-zinc-900\/85 {
      background-color: rgba(8, 18, 36, 0.94) !important;
    }

    body[data-theme="space"] .bg-zinc-950,
    body[data-theme="space"] .bg-zinc-950\/60,
    body[data-theme="space"] .bg-zinc-950\/70,
    body[data-theme="space"] .bg-zinc-950\/80 {
      background-color: rgba(3, 7, 18, 0.92) !important;
    }

    body[data-theme="space"] .border-zinc-800,
    body[data-theme="space"] .border-zinc-700 {
      border-color: rgba(14, 116, 144, 0.72) !important;
    }

    body[data-theme="space"] .text-violet-300,
    body[data-theme="space"] .text-violet-400 {
      color: #67e8f9 !important;
    }

    body[data-theme="space"] .bg-violet-600,
    body[data-theme="space"] .hover\:bg-violet-600:hover,
    body[data-theme="space"] .hover\:bg-violet-500:hover {
      background: linear-gradient(135deg, #0891b2, #4f46e5 58%, #7c3aed) !important;
    }

    body[data-theme="space"] .room-card:hover,
    body[data-theme="space"] .participant-row:hover,
    body[data-theme="space"] .dm-conversation-row:hover,
    body[data-theme="space"] .social-row:hover {
      border-color: rgba(103, 232, 249, 0.72) !important;
      box-shadow: 0 22px 56px -30px rgba(34, 211, 238, 0.62), inset 0 1px 0 rgba(224, 242, 254, 0.08) !important;
    }

    body[data-theme="space"] #lobby .rounded-3xl.bg-zinc-950\/80,
    body[data-theme="space"] #lobbyRoomsTab > div,
    body[data-theme="space"] #lobbyFriendsTab > div,
    body[data-theme="space"] .room-card,
    body[data-theme="space"] #participantsPanel,
    body[data-theme="space"] #videoPanel,
    body[data-theme="space"] #chatContainer,
    body[data-theme="space"] #chatInputArea,
    body[data-theme="space"] #friendsModal [data-modal-panel] {
      border-color: rgba(14, 116, 144, 0.7) !important;
      background:
        radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.1), transparent 34%),
        radial-gradient(circle at 84% 18%, rgba(167, 139, 250, 0.09), transparent 32%),
        linear-gradient(180deg, rgba(10, 22, 45, 0.94), rgba(3, 7, 18, 0.96)) !important;
      box-shadow: inset 0 1px 0 rgba(224, 242, 254, 0.07), 0 22px 54px -38px rgba(34, 211, 238, 0.46) !important;
    }

    body[data-theme="space"] #roomSearchInput,
    body[data-theme="space"] #chatInput,
    body[data-theme="space"] #dmInput,
    body[data-theme="space"] #userSearchInput {
      background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(3, 7, 18, 0.97)) !important;
      border-color: rgba(14, 116, 144, 0.78) !important;
      color: #e0f2fe !important;
      box-shadow: inset 0 1px 0 rgba(224, 242, 254, 0.07) !important;
    }

    body[data-theme="space"] #roomSearchInput:focus,
    body[data-theme="space"] #chatInput:focus,
    body[data-theme="space"] #dmInput:focus,
    body[data-theme="space"] #userSearchInput:focus {
      border-color: rgba(103, 232, 249, 0.95) !important;
      box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.22), inset 0 1px 0 rgba(224, 242, 254, 0.1) !important;
    }

    body[data-theme="space"] #roomSearchInput::placeholder,
    body[data-theme="space"] #chatInput::placeholder,
    body[data-theme="space"] #dmInput::placeholder,
    body[data-theme="space"] #userSearchInput::placeholder {
      color: rgba(186, 230, 253, 0.55) !important;
    }

    body[data-theme="space"] #myRoomsFilterAll,
    body[data-theme="space"] #myRoomsFilterPublic,
    body[data-theme="space"] #myRoomsFilterPrivate,
    body[data-theme="space"] #myRoomsFilterActive,
    body[data-theme="space"] #lobbyTabRoomsBtn,
    body[data-theme="space"] #lobbyTabFriendsBtn,
    body[data-theme="space"] #backgroundRoomReturnBtn {
      border: 1px solid rgba(14, 116, 144, 0.66) !important;
      background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(6, 12, 28, 0.96)) !important;
      color: #bae6fd !important;
      box-shadow: inset 0 1px 0 rgba(224, 242, 254, 0.06) !important;
    }

    body[data-theme="space"] #myRoomsFilterAll.bg-violet-600,
    body[data-theme="space"] #myRoomsFilterPublic.bg-violet-600,
    body[data-theme="space"] #myRoomsFilterPrivate.bg-violet-600,
    body[data-theme="space"] #myRoomsFilterActive.bg-violet-600,
    body[data-theme="space"] #lobbyTabRoomsBtn.bg-violet-600,
    body[data-theme="space"] #lobbyTabFriendsBtn.bg-violet-600 {
      border-color: rgba(186, 230, 253, 0.76) !important;
      background: linear-gradient(135deg, #0891b2, #4f46e5 58%, #7c3aed) !important;
      color: #f0f9ff !important;
      box-shadow: 0 16px 30px -24px rgba(34, 211, 238, 0.76), inset 0 1px 0 rgba(240, 249, 255, 0.18) !important;
    }

    body[data-theme="space"] #myRoomsFilterAll:hover,
    body[data-theme="space"] #myRoomsFilterPublic:hover,
    body[data-theme="space"] #myRoomsFilterPrivate:hover,
    body[data-theme="space"] #myRoomsFilterActive:hover,
    body[data-theme="space"] #lobbyTabRoomsBtn:hover,
    body[data-theme="space"] #lobbyTabFriendsBtn:hover,
    body[data-theme="space"] #lobbyFriendsTab button:hover,
    body[data-theme="space"] #backgroundRoomReturnBtn:hover {
      border-color: rgba(103, 232, 249, 0.86) !important;
      background: linear-gradient(180deg, rgba(22, 44, 78, 0.96), rgba(10, 20, 42, 0.98)) !important;
      box-shadow: 0 16px 34px -26px rgba(34, 211, 238, 0.62), inset 0 1px 0 rgba(224, 242, 254, 0.1) !important;
    }

    body[data-theme="space"] #lobbyFriendsTab .bg-\[\#141418\],
    body[data-theme="space"] #dmMessages,
    body[data-theme="space"] #chatMessages,
    body[data-theme="space"] #dmInputArea {
      border-color: rgba(14, 116, 144, 0.72) !important;
      background:
        radial-gradient(circle at 16% 0%, rgba(34, 211, 238, 0.08), transparent 32%),
        radial-gradient(circle at 88% 22%, rgba(167, 139, 250, 0.07), transparent 34%),
        linear-gradient(180deg, rgba(5, 12, 28, 0.98), rgba(3, 7, 18, 0.98)) !important;
    }

    body[data-theme="space"] #lobbyFriendsTab .border-r,
    body[data-theme="space"] #lobbyFriendsTab .border-b,
    body[data-theme="space"] #lobbyFriendsTab .border-t,
    body[data-theme="space"] #friendsModal .border-b,
    body[data-theme="space"] #roomView > .h-16,
    body[data-theme="space"] #roomView > .h-16.bg-zinc-900 {
      border-color: rgba(14, 116, 144, 0.78) !important;
    }

    body[data-theme="space"] #userSearchResults .social-row,
    body[data-theme="space"] #incomingRequestsList .social-row,
    body[data-theme="space"] #outgoingRequestsList .social-row,
    body[data-theme="space"] #friendsList .social-row,
    body[data-theme="space"] .participant-row,
    body[data-theme="space"] .dm-conversation-row {
      border-color: rgba(14, 116, 144, 0.54) !important;
      background: linear-gradient(180deg, rgba(11, 28, 52, 0.86), rgba(5, 12, 28, 0.92)) !important;
      color: #e0f2fe !important;
      box-shadow: inset 0 1px 0 rgba(224, 242, 254, 0.06) !important;
    }

    body[data-theme="space"] .dm-conversation-row.bg-violet-600\/20 {
      border-color: rgba(103, 232, 249, 0.58) !important;
      background: linear-gradient(135deg, rgba(14, 116, 144, 0.38), rgba(49, 46, 129, 0.82)) !important;
      box-shadow: inset 0 1px 0 rgba(224, 242, 254, 0.09), 0 18px 34px -30px rgba(34, 211, 238, 0.62) !important;
    }

    body[data-theme="space"] .participant-speaking .username {
      color: #67e8f9 !important;
      text-shadow: 0 0 12px rgba(34, 211, 238, 0.56);
    }

    body[data-theme="space"] #roomSettingsBtn,
    body[data-theme="space"] #roomView button[onclick="backgroundCurrentRoom()"],
    body[data-theme="space"] .control-btn,
    body[data-theme="space"] .background-room-control-btn,
    body[data-theme="space"] .message-icon-btn,
    body[data-theme="space"] .message-send-btn,
    body[data-theme="space"] #openFriendsBtn {
      border-color: rgba(14, 116, 144, 0.72) !important;
      background:
        radial-gradient(circle at 50% 10%, rgba(103, 232, 249, 0.13), transparent 46%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(5, 12, 28, 0.98)) !important;
      color: #e0f2fe !important;
      box-shadow: inset 0 1px 0 rgba(224, 242, 254, 0.08), 0 14px 30px -26px rgba(34, 211, 238, 0.45) !important;
    }

    body[data-theme="space"] #roomSettingsBtn:hover,
    body[data-theme="space"] #roomView button[onclick="backgroundCurrentRoom()"]:hover,
    body[data-theme="space"] .control-btn:hover,
    body[data-theme="space"] .background-room-control-btn:hover,
    body[data-theme="space"] .message-icon-btn:hover,
    body[data-theme="space"] .message-send-btn:hover,
    body[data-theme="space"] #openFriendsBtn:hover {
      border-color: rgba(103, 232, 249, 0.92) !important;
      background:
        radial-gradient(circle at 50% 10%, rgba(224, 242, 254, 0.16), transparent 44%),
        linear-gradient(180deg, rgba(22, 44, 78, 0.98), rgba(10, 20, 42, 0.98)) !important;
      box-shadow: inset 0 1px 0 rgba(240, 249, 255, 0.16), 0 18px 36px -24px rgba(34, 211, 238, 0.78) !important;
    }

    body[data-theme="space"] .control-btn.sound-control.is-muted,
    body[data-theme="space"] .background-room-control-btn.sound-control.is-muted,
    body[data-theme="space"] .control-btn.bg-red-600,
    body[data-theme="space"] #backgroundRoomLeaveBtn {
      border-color: rgba(248, 113, 113, 0.58) !important;
      background: linear-gradient(135deg, rgba(127, 29, 29, 0.95), rgba(49, 46, 129, 0.96)) !important;
      color: #fee2e2 !important;
      box-shadow: 0 18px 34px -22px rgba(185, 28, 28, 0.72), inset 0 1px 0 rgba(254, 202, 202, 0.16) !important;
    }

    body[data-theme="space"] #backgroundRoomDock,
    body[data-theme="space"] .screen-card,
    body[data-theme="space"] #localScreenPreview,
    body[data-theme="space"] .screen-volume-panel,
    body[data-theme="space"] #volumeMenu {
      border-color: rgba(14, 116, 144, 0.72) !important;
      background: linear-gradient(180deg, rgba(8, 18, 36, 0.96), rgba(3, 7, 18, 0.98)) !important;
      box-shadow: 0 24px 50px -34px rgba(34, 211, 238, 0.48), inset 0 1px 0 rgba(224, 242, 254, 0.06) !important;
    }

    body[data-theme="space"] #backgroundRoomAvatar,
    body[data-theme="space"] #roomAvatar,
    body[data-theme="space"] #dmPartnerAvatar {
      border-color: rgba(14, 116, 144, 0.82) !important;
      background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(3, 7, 18, 0.98)) !important;
      color: #67e8f9 !important;
      box-shadow: inset 0 1px 0 rgba(224, 242, 254, 0.08) !important;
    }

    body[data-theme="space"] #chatEdgeToggle {
      background: linear-gradient(180deg, #22d3ee, #4f46e5) !important;
      border-color: rgba(186, 230, 253, 0.76) !important;
      box-shadow: 0 18px 34px -22px rgba(34, 211, 238, 0.84), inset 0 1px 0 rgba(240, 249, 255, 0.22) !important;
    }

    body[data-theme="space"] input[type="range"] {
      accent-color: #22d3ee;
    }

    body[data-theme="fire"] {
      --settings-panel-border: rgba(154, 52, 18, 0.72);
      --settings-panel-bg:
        radial-gradient(circle at 16% 0%, rgba(251, 146, 60, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(31, 18, 11, 0.98), rgba(13, 8, 5, 0.98));
      --settings-card-border: rgba(124, 45, 18, 0.78);
      --settings-card-bg: linear-gradient(180deg, rgba(28, 18, 12, 0.92), rgba(14, 9, 6, 0.96));
      --settings-input-border: rgba(154, 52, 18, 0.78);
      --settings-input-bg: linear-gradient(180deg, rgba(47, 25, 13, 0.94), rgba(24, 14, 9, 0.96));
      --settings-option-bg: #1c120c;
      --settings-input-focus: rgba(251, 146, 60, 0.95);
      --settings-text: #fff7ed;
      --settings-muted: rgba(253, 186, 116, 0.72);
      --settings-muted-soft: rgba(253, 186, 116, 0.54);
      --settings-primary-bg: linear-gradient(135deg, #ea580c, #b91c1c 58%, #7f1d1d);
      --settings-secondary-bg: linear-gradient(180deg, rgba(47, 25, 13, 0.96), rgba(24, 14, 9, 0.98));
      --settings-secondary-hover-bg: linear-gradient(180deg, rgba(80, 35, 14, 0.98), rgba(43, 20, 10, 0.98));
      --settings-glow: rgba(249, 115, 22, 0.52);
      --settings-accent: #f97316;
    }

    body[data-theme="space"] {
      --settings-panel-border: rgba(14, 116, 144, 0.72);
      --settings-panel-bg:
        radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.12), transparent 34%),
        radial-gradient(circle at 84% 18%, rgba(167, 139, 250, 0.09), transparent 32%),
        linear-gradient(180deg, rgba(10, 22, 45, 0.96), rgba(3, 7, 18, 0.98));
      --settings-card-border: rgba(14, 116, 144, 0.78);
      --settings-card-bg: linear-gradient(180deg, rgba(8, 18, 36, 0.94), rgba(3, 7, 18, 0.96));
      --settings-input-border: rgba(14, 116, 144, 0.78);
      --settings-input-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(3, 7, 18, 0.97));
      --settings-option-bg: #081224;
      --settings-input-focus: rgba(103, 232, 249, 0.95);
      --settings-text: #e0f2fe;
      --settings-muted: rgba(186, 230, 253, 0.72);
      --settings-muted-soft: rgba(186, 230, 253, 0.54);
      --settings-primary-bg: linear-gradient(135deg, #0891b2, #4f46e5 58%, #7c3aed);
      --settings-secondary-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(5, 12, 28, 0.98));
      --settings-secondary-hover-bg: linear-gradient(180deg, rgba(22, 44, 78, 0.98), rgba(10, 20, 42, 0.98));
      --settings-glow: rgba(34, 211, 238, 0.5);
      --settings-accent: #22d3ee;
    }

    body[data-theme="fire"] [data-modal-panel],
    body[data-theme="space"] [data-modal-panel] {
      border: 1px solid var(--settings-panel-border) !important;
      background: var(--settings-panel-bg) !important;
      color: var(--settings-text) !important;
      box-shadow: 0 28px 74px -40px var(--settings-glow), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    }

    body[data-theme="fire"] [data-modal-panel] .bg-zinc-950,
    body[data-theme="fire"] [data-modal-panel] .bg-zinc-950\/60,
    body[data-theme="fire"] [data-modal-panel] .bg-zinc-950\/70,
    body[data-theme="fire"] [data-modal-panel] .bg-zinc-800,
    body[data-theme="fire"] [data-modal-panel] .bg-zinc-900,
    body[data-theme="space"] [data-modal-panel] .bg-zinc-950,
    body[data-theme="space"] [data-modal-panel] .bg-zinc-950\/60,
    body[data-theme="space"] [data-modal-panel] .bg-zinc-950\/70,
    body[data-theme="space"] [data-modal-panel] .bg-zinc-800,
    body[data-theme="space"] [data-modal-panel] .bg-zinc-900 {
      border-color: var(--settings-card-border) !important;
      background: var(--settings-card-bg) !important;
      color: var(--settings-text) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    }

    body[data-theme="fire"] [data-modal-panel] .border-zinc-800,
    body[data-theme="fire"] [data-modal-panel] .border-zinc-700,
    body[data-theme="space"] [data-modal-panel] .border-zinc-800,
    body[data-theme="space"] [data-modal-panel] .border-zinc-700 {
      border-color: var(--settings-card-border) !important;
    }

    body[data-theme="fire"] [data-modal-panel] .text-zinc-400,
    body[data-theme="space"] [data-modal-panel] .text-zinc-400 {
      color: var(--settings-muted) !important;
    }

    body[data-theme="fire"] [data-modal-panel] .text-zinc-500,
    body[data-theme="space"] [data-modal-panel] .text-zinc-500 {
      color: var(--settings-muted-soft) !important;
    }

    body[data-theme="fire"] [data-modal-panel] input,
    body[data-theme="fire"] [data-modal-panel] select,
    body[data-theme="fire"] [data-modal-panel] textarea,
    body[data-theme="space"] [data-modal-panel] input,
    body[data-theme="space"] [data-modal-panel] select,
    body[data-theme="space"] [data-modal-panel] textarea {
      border-color: var(--settings-input-border) !important;
      background: var(--settings-input-bg) !important;
      color: var(--settings-text) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    }

    body[data-theme="fire"] [data-modal-panel] input:focus,
    body[data-theme="fire"] [data-modal-panel] select:focus,
    body[data-theme="fire"] [data-modal-panel] textarea:focus,
    body[data-theme="space"] [data-modal-panel] input:focus,
    body[data-theme="space"] [data-modal-panel] select:focus,
    body[data-theme="space"] [data-modal-panel] textarea:focus {
      border-color: var(--settings-input-focus) !important;
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--settings-accent) 24%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    }

    body[data-theme="fire"] [data-modal-panel] input::placeholder,
    body[data-theme="fire"] [data-modal-panel] textarea::placeholder,
    body[data-theme="space"] [data-modal-panel] input::placeholder,
    body[data-theme="space"] [data-modal-panel] textarea::placeholder {
      color: var(--settings-muted-soft) !important;
    }

    body[data-theme="fire"] [data-modal-panel] option,
    body[data-theme="space"] [data-modal-panel] option {
      background: var(--settings-option-bg) !important;
      color: var(--settings-text) !important;
    }

    body[data-theme="fire"] [data-modal-panel] input[type="file"]::file-selector-button,
    body[data-theme="space"] [data-modal-panel] input[type="file"]::file-selector-button {
      border: 0 !important;
      background: var(--settings-primary-bg) !important;
      color: #ffffff !important;
      box-shadow: 0 12px 26px -20px var(--settings-glow) !important;
    }

    body[data-theme="fire"] [data-modal-panel] input[type="checkbox"],
    body[data-theme="fire"] [data-modal-panel] input[type="range"],
    body[data-theme="space"] [data-modal-panel] input[type="checkbox"],
    body[data-theme="space"] [data-modal-panel] input[type="range"] {
      accent-color: var(--settings-accent) !important;
    }

    body[data-theme="fire"] [data-modal-panel] button.bg-violet-600,
    body[data-theme="fire"] [data-modal-panel] button.hover\:bg-violet-500:hover,
    body[data-theme="fire"] [data-modal-panel] button.hover\:bg-violet-600:hover,
    body[data-theme="space"] [data-modal-panel] button.bg-violet-600,
    body[data-theme="space"] [data-modal-panel] button.hover\:bg-violet-500:hover,
    body[data-theme="space"] [data-modal-panel] button.hover\:bg-violet-600:hover {
      border-color: var(--settings-input-focus) !important;
      background: var(--settings-primary-bg) !important;
      color: #ffffff !important;
      box-shadow: 0 16px 34px -24px var(--settings-glow), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
    }

    body[data-theme="fire"] [data-modal-panel] button.bg-zinc-800,
    body[data-theme="fire"] [data-modal-panel] button.hover\:bg-zinc-700:hover,
    body[data-theme="space"] [data-modal-panel] button.bg-zinc-800,
    body[data-theme="space"] [data-modal-panel] button.hover\:bg-zinc-700:hover {
      border-color: var(--settings-card-border) !important;
      background: var(--settings-secondary-bg) !important;
      color: var(--settings-text) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 30px -26px var(--settings-glow) !important;
    }

    body[data-theme="fire"] [data-modal-panel] button.bg-zinc-800:hover,
    body[data-theme="fire"] [data-modal-panel] button.hover\:bg-zinc-700:hover,
    body[data-theme="space"] [data-modal-panel] button.bg-zinc-800:hover,
    body[data-theme="space"] [data-modal-panel] button.hover\:bg-zinc-700:hover {
      border-color: var(--settings-input-focus) !important;
      background: var(--settings-secondary-hover-bg) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 36px -24px var(--settings-glow) !important;
    }

    body[data-theme="fire"] [data-modal-panel] button.bg-red-600,
    body[data-theme="fire"] [data-modal-panel] button.hover\:bg-red-500:hover,
    body[data-theme="space"] [data-modal-panel] button.bg-red-600,
    body[data-theme="space"] [data-modal-panel] button.hover\:bg-red-500:hover {
      border-color: rgba(248, 113, 113, 0.62) !important;
      background: linear-gradient(135deg, rgba(185, 28, 28, 0.96), rgba(69, 10, 10, 0.98)) !important;
      color: #fee2e2 !important;
      box-shadow: 0 16px 32px -24px rgba(248, 113, 113, 0.68), inset 0 1px 0 rgba(254, 202, 202, 0.16) !important;
    }

    body[data-theme="fire"] [data-modal-panel] #profileAvatarPreview,
    body[data-theme="fire"] [data-modal-panel] #roomAvatarPreview,
    body[data-theme="fire"] [data-modal-panel] #createRoomAvatarPreview,
    body[data-theme="space"] [data-modal-panel] #profileAvatarPreview,
    body[data-theme="space"] [data-modal-panel] #roomAvatarPreview,
    body[data-theme="space"] [data-modal-panel] #createRoomAvatarPreview {
      border-color: var(--settings-input-focus) !important;
      background: var(--settings-card-bg) !important;
      color: var(--settings-muted) !important;
      box-shadow: 0 0 22px -8px var(--settings-glow), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    }

    body[data-theme="fire"] .room-status-badge.is-empty,
    body[data-theme="space"] .room-status-badge.is-empty {
      border-color: var(--settings-card-border) !important;
      background: var(--settings-secondary-bg) !important;
      color: var(--settings-muted) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    }

    body[data-theme="fire"] .remove-my-room-btn,
    body[data-theme="space"] .remove-my-room-btn {
      border: 1px solid var(--settings-card-border) !important;
      background: var(--settings-secondary-bg) !important;
      color: var(--settings-text) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 26px -22px var(--settings-glow) !important;
    }

    body[data-theme="fire"] .remove-my-room-btn:hover,
    body[data-theme="space"] .remove-my-room-btn:hover {
      border-color: rgba(248, 113, 113, 0.68) !important;
      background: linear-gradient(135deg, rgba(185, 28, 28, 0.96), rgba(69, 10, 10, 0.98)) !important;
      color: #fee2e2 !important;
      box-shadow: 0 16px 32px -24px rgba(248, 113, 113, 0.72), inset 0 1px 0 rgba(254, 202, 202, 0.16) !important;
    }

    body[data-theme="fire"] .message-context-menu,
    body[data-theme="space"] .message-context-menu {
      border-color: var(--settings-panel-border) !important;
      background: var(--settings-panel-bg) !important;
      color: var(--settings-text) !important;
      box-shadow: 0 24px 58px -34px var(--settings-glow), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    }

    body[data-theme="fire"] .message-context-menu .context-menu-btn,
    body[data-theme="space"] .message-context-menu .context-menu-btn {
      color: var(--settings-text) !important;
    }

    body[data-theme="fire"] .message-context-menu .context-menu-btn:hover,
    body[data-theme="space"] .message-context-menu .context-menu-btn:hover {
      background: var(--settings-secondary-hover-bg) !important;
      color: var(--settings-text) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    }

    body[data-theme="fire"] .message-context-menu .context-menu-btn.is-danger,
    body[data-theme="space"] .message-context-menu .context-menu-btn.is-danger {
      color: #fca5a5 !important;
    }

    body[data-theme="fire"] .message-context-menu .context-menu-btn.is-danger:hover,
    body[data-theme="space"] .message-context-menu .context-menu-btn.is-danger:hover {
      background: rgba(127, 29, 29, 0.52) !important;
      color: #fee2e2 !important;
    }

    body[data-theme="space"] #volumeMenu button {
      border: 1px solid var(--settings-card-border) !important;
      background: var(--settings-secondary-bg) !important;
      color: var(--settings-text) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 26px -22px var(--settings-glow) !important;
    }

    body[data-theme="space"] #volumeMenu button:hover {
      border-color: var(--settings-input-focus) !important;
      background: var(--settings-secondary-hover-bg) !important;
      box-shadow: 0 14px 28px -22px var(--settings-glow) !important;
    }

    body[data-theme="space"] #volumeMenu button.hover\:bg-red-500:hover,
    body[data-theme="space"] #volumeMenu button.hover\:bg-red-600:hover {
      border-color: rgba(248, 113, 113, 0.64) !important;
      background: linear-gradient(135deg, rgba(127, 29, 29, 0.96), rgba(49, 46, 129, 0.98)) !important;
      color: #fee2e2 !important;
    }

    .theme-avatar-frame[data-profile-theme="fire"] {
      position: relative;
      display: inline-flex;
      flex-shrink: 0;
      overflow: visible !important;
      border-color: rgba(251, 146, 60, 0.92) !important;
      box-shadow: 0 0 18px rgba(249, 115, 22, 0.42), 0 0 42px rgba(185, 28, 28, 0.24);
    }

    .theme-avatar-frame[data-profile-theme="fire"] > img,
    .theme-avatar-frame[data-profile-theme="fire"] > span,
    .theme-avatar-frame[data-profile-theme="fire"] > div,
    .theme-avatar-frame[data-profile-theme="fire"] > svg:not(.fire-avatar-inside-svg):not(.fire-avatar-ring-svg) {
      position: relative;
      z-index: 1;
      border-radius: inherit;
    }

    .fire-avatar-inside-svg,
    .fire-avatar-ring-svg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
    }

    body[data-theme="fire"] .lobby-profile-button,
    body[data-theme="space"] .lobby-profile-button {
      overflow: visible !important;
    }

    body[data-theme="fire"] #lobbyAvatar.theme-avatar-frame,
    body[data-theme="space"] #lobbyAvatar.theme-avatar-frame {
      position: relative;
      z-index: 20;
      overflow: visible !important;
    }

    body[data-theme="fire"] #lobbyAvatar .fire-avatar-inside-svg,
    body[data-theme="space"] #lobbyAvatar .space-avatar-inside-svg {
      z-index: 30;
    }

    body[data-theme="fire"] #lobbyAvatar .fire-avatar-ring-svg,
    body[data-theme="space"] #lobbyAvatar .space-avatar-ring-svg {
      z-index: 31;
    }

    .fire-avatar-inside-svg {
      border-radius: inherit;
      overflow: hidden;
      z-index: 2;
      mix-blend-mode: screen;
      opacity: 0.9;
      filter: saturate(1.28) contrast(1.08);
    }

    .fire-avatar-ring-svg {
      overflow: visible;
      z-index: 3;
      mix-blend-mode: screen;
      filter: saturate(1.34) contrast(1.12);
    }

    .fire-avatar-hero.fire-avatar-inside-svg {
      opacity: 1;
    }

    .fire-avatar-hero.fire-avatar-ring-svg {
      filter: saturate(1.45) contrast(1.16) drop-shadow(0 0 14px rgba(251, 191, 36, 0.46));
    }

    .fire-avatar-warmth,
    .fire-inside-distort,
    .fire-ring,
    .fire-ring-arc,
    .fire-frame,
    .fire-ribbon,
    .fire-spark,
    .fire-spark-streak {
      transform-box: fill-box;
      transform-origin: center;
    }

    .fire-avatar-warmth {
      animation: fire-avatar-aura 2.6s ease-in-out infinite;
    }

    .fire-ring-soft {
      animation: fire-ring-pulse 1.55s ease-in-out infinite;
    }

    .fire-ring-main {
      animation: fire-ring-pulse 1.2s ease-in-out infinite reverse;
    }

    .fire-ring-inner {
      animation: fire-avatar-aura 2s ease-in-out infinite reverse;
    }

    .fire-ring-arc {
      transform-box: view-box;
      transform-origin: center;
      stroke-dasharray: 82 250;
      animation: fire-ring-orbit 2.15s linear infinite;
    }

    .fire-ring-arc-b {
      animation-duration: 2.65s;
      animation-direction: reverse;
      animation-delay: -0.72s;
    }

    .fire-frame {
      transform-box: view-box;
      transform-origin: center;
      mix-blend-mode: screen;
    }

    .fire-frame-a {
      animation: fire-frame-a 1.42s ease-in-out infinite;
    }

    .fire-frame-b {
      animation: fire-frame-b 1.42s ease-in-out infinite;
    }

    .fire-ribbon {
      animation: fire-ribbon-sway 1.05s ease-in-out infinite;
    }

    .fire-ribbon-a2,
    .fire-ribbon-b2 {
      animation-duration: 0.82s;
      animation-direction: reverse;
    }

    .fire-ribbon-a3,
    .fire-ribbon-b3 {
      animation-duration: 1.28s;
      animation-delay: -0.34s;
    }

    .fire-ribbon-hot {
      opacity: 0.9;
      filter: brightness(1.18);
    }

    .fire-spark,
    .fire-spark-streak {
      animation: fire-spark-float 2.2s ease-in-out infinite;
      opacity: 0.86;
    }

    .fire-spark-b { animation-delay: -0.35s; }
    .fire-spark-c { animation-delay: -0.76s; }
    .fire-spark-d { animation-delay: -1.12s; }
    .fire-spark-e { animation-delay: -1.52s; }
    .fire-spark-streak-a { animation-delay: -0.94s; }
    .fire-spark-streak-b { animation-delay: -1.36s; }

    @keyframes fire-avatar-aura {
      0%, 100% { transform: scale(0.96); opacity: 0.68; }
      45% { transform: scale(1.05); opacity: 0.98; }
      72% { transform: scale(1.01); opacity: 0.84; }
    }

    @keyframes fire-ring-pulse {
      0%, 100% { transform: scale(0.99); opacity: 0.74; }
      45% { transform: scale(1.035); opacity: 1; }
      70% { transform: scale(1.01); opacity: 0.88; }
    }

    @keyframes fire-ring-orbit {
      0% { transform: rotate(0deg); opacity: 0.55; }
      35% { opacity: 1; }
      100% { transform: rotate(360deg); opacity: 0.55; }
    }

    @keyframes fire-frame-a {
      0%, 100% { transform: translate(-2px, 2px) scale(0.985); opacity: 0.42; }
      18%, 48% { transform: translate(1px, -1px) scale(1.015); opacity: 0.98; }
      70% { transform: translate(3px, 0) scale(1.005); opacity: 0.58; }
    }

    @keyframes fire-frame-b {
      0%, 100% { transform: translate(2px, -1px) scale(1.01); opacity: 0.95; }
      34%, 58% { transform: translate(-1px, 2px) scale(0.99); opacity: 0.42; }
      78% { transform: translate(-3px, -1px) scale(1.02); opacity: 0.82; }
    }

    @keyframes fire-ribbon-sway {
      0%, 100% { transform: translateY(2px) skewX(-1.5deg) scaleY(0.98); }
      42% { transform: translateY(-3px) skewX(2deg) scaleY(1.04); }
      72% { transform: translateY(-1px) skewX(-2.5deg) scaleY(1.01); }
    }

    @keyframes fire-spark-float {
      0%, 100% { transform: translateY(8px) scale(0.55); opacity: 0; }
      20% { opacity: 0.96; }
      64% { transform: translateY(-8px) translateX(4px) scale(1); opacity: 0.88; }
      100% { transform: translateY(-16px) translateX(8px) scale(0.38); opacity: 0; }
    }

    @keyframes fire-ember-rise {
      0%, 100% { transform: translateY(9px) scale(0.62); opacity: 0; }
      28% { opacity: 0.92; }
      70% { transform: translateY(-10px) scale(1); opacity: 0.74; }
      100% { transform: translateY(-17px) scale(0.4); opacity: 0; }
    }

    .theme-avatar-frame[data-profile-theme="space"] {
      position: relative;
      display: inline-flex;
      flex-shrink: 0;
      overflow: visible !important;
      border-color: rgba(103, 232, 249, 0.92) !important;
      box-shadow: 0 0 18px rgba(34, 211, 238, 0.42), 0 0 42px rgba(124, 58, 237, 0.24);
    }

    .theme-avatar-frame[data-profile-theme="space"] > img,
    .theme-avatar-frame[data-profile-theme="space"] > span,
    .theme-avatar-frame[data-profile-theme="space"] > div,
    .theme-avatar-frame[data-profile-theme="space"] > svg:not(.space-avatar-inside-svg):not(.space-avatar-ring-svg) {
      position: relative;
      z-index: 1;
      border-radius: inherit;
    }

    .space-avatar-inside-svg,
    .space-avatar-ring-svg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
    }

    .space-avatar-inside-svg {
      border-radius: inherit;
      overflow: hidden;
      z-index: 2;
      mix-blend-mode: screen;
      opacity: 0.9;
      filter: saturate(1.24) contrast(1.08);
    }

    .space-avatar-ring-svg {
      overflow: visible;
      z-index: 3;
      mix-blend-mode: screen;
      filter: saturate(1.32) contrast(1.12);
    }

    .space-avatar-hero.space-avatar-inside-svg {
      opacity: 1;
    }

    .space-avatar-hero.space-avatar-ring-svg {
      filter: saturate(1.45) contrast(1.16) drop-shadow(0 0 14px rgba(103, 232, 249, 0.46));
    }

    .space-nebula,
    .space-comet,
    .space-star,
    .space-ring,
    .space-orbit,
    .space-orbit-dot {
      transform-box: fill-box;
      transform-origin: center;
    }

    .space-nebula-a {
      animation: space-nebula-drift 5.8s ease-in-out infinite;
    }

    .space-nebula-b {
      animation: space-nebula-drift 6.4s ease-in-out infinite reverse;
    }

    .space-ring-soft {
      animation: space-ring-pulse 2.4s ease-in-out infinite;
    }

    .space-ring-main {
      animation: space-ring-pulse 1.9s ease-in-out infinite reverse;
    }

    .space-ring-inner {
      animation: space-star-twinkle 2.8s ease-in-out infinite;
    }

    .space-orbit {
      transform-box: view-box;
      transform-origin: center;
      stroke-dasharray: 90 260;
      animation: space-ring-orbit 4.6s linear infinite;
    }

    .space-orbit-b {
      animation-duration: 5.4s;
      animation-direction: reverse;
      animation-delay: -1.2s;
    }

    .space-comet {
      stroke-dasharray: 44 210;
      animation: space-comet-sweep 3.8s ease-in-out infinite;
    }

    .space-comet-b {
      animation-duration: 4.6s;
      animation-delay: -1.4s;
    }

    .space-star,
    .space-orbit-dot {
      animation: space-star-twinkle 2.4s ease-in-out infinite;
    }

    .space-star-b { animation-delay: -0.35s; }
    .space-star-c { animation-delay: -0.8s; }
    .space-star-d { animation-delay: -1.15s; }
    .space-star-e { animation-delay: -1.55s; }
    .space-star-f { animation-delay: -1.9s; }
    .space-orbit-dot-a { animation-delay: -0.7s; }
    .space-orbit-dot-b { animation-delay: -1.4s; }

    @keyframes space-nebula-drift {
      0%, 100% { transform: translateX(-5px) rotate(-3deg); opacity: 0.1; }
      50% { transform: translateX(7px) rotate(3deg); opacity: 0.2; }
    }

    @keyframes space-ring-pulse {
      0%, 100% { transform: scale(0.99); opacity: 0.68; }
      48% { transform: scale(1.035); opacity: 1; }
      72% { transform: scale(1.01); opacity: 0.84; }
    }

    @keyframes space-ring-orbit {
      0% { transform: rotate(0deg); opacity: 0.5; }
      40% { opacity: 0.96; }
      100% { transform: rotate(360deg); opacity: 0.5; }
    }

    @keyframes space-comet-sweep {
      0% { stroke-dashoffset: 190; opacity: 0; }
      22% { opacity: 0.85; }
      74% { opacity: 0.5; }
      100% { stroke-dashoffset: -190; opacity: 0; }
    }

    @keyframes space-star-twinkle {
      0%, 100% { transform: scale(0.7); opacity: 0.34; }
      46% { transform: scale(1.22); opacity: 1; }
      70% { transform: scale(0.92); opacity: 0.62; }
    }

    body[data-theme="fire"] .theme-profile-button {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      border-color: rgba(251, 146, 60, 0.42) !important;
      background:
        linear-gradient(135deg, rgba(67, 20, 7, 0.58), rgba(15, 10, 7, 0.38) 48%, rgba(124, 45, 18, 0.35)) !important;
      box-shadow:
        inset 0 1px 0 rgba(255, 247, 237, 0.08),
        0 16px 42px -32px rgba(251, 146, 60, 0.9);
    }

    body[data-theme="fire"] .theme-profile-button::before {
      display: none;
    }

    .fire-profile-button-svg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: 0;
      opacity: 0.96;
      pointer-events: none;
      overflow: hidden;
      border-radius: inherit;
      mix-blend-mode: screen;
      filter: saturate(1.22) contrast(1.08);
    }

    body[data-theme="fire"] .theme-profile-button > :not(.fire-profile-button-svg) {
      position: relative;
      z-index: 1;
    }

    .profile-fire-warmth,
    .profile-fire-heat,
    .profile-fire-frame,
    .profile-fire-ribbon,
    .profile-fire-edge,
    .profile-fire-outline,
    .profile-fire-spark,
    .profile-fire-smoke {
      transform-box: fill-box;
      transform-origin: center;
    }

    .profile-fire-warmth {
      animation: profile-button-warmth 2.8s ease-in-out infinite;
    }

    .profile-fire-heat {
      animation: profile-button-heat 3.2s ease-in-out infinite;
    }

    .profile-fire-frame-a {
      animation: profile-button-frame-a 1.55s ease-in-out infinite;
      mix-blend-mode: screen;
    }

    .profile-fire-frame-b {
      animation: profile-button-frame-b 1.55s ease-in-out infinite;
      mix-blend-mode: screen;
    }

    .profile-fire-ribbon {
      animation: profile-button-ribbon 1.08s ease-in-out infinite;
      opacity: 0.78;
    }

    .profile-fire-ribbon-hot {
      animation-duration: 0.82s;
      animation-direction: reverse;
      filter: brightness(1.25);
      opacity: 0.9;
    }

    .profile-fire-ribbon-low,
    .profile-fire-ribbon-sweep {
      animation-duration: 1.36s;
      animation-delay: -0.34s;
    }

    .profile-fire-edge-top {
      stroke-dasharray: 95 360;
      animation: profile-button-edge-flow 2.4s linear infinite;
    }

    .profile-fire-edge-bottom {
      stroke-dasharray: 120 340;
      animation: profile-button-edge-flow 3s linear infinite reverse;
      opacity: 0.72;
    }

    .profile-fire-outline {
      animation: profile-button-outline 2.1s ease-in-out infinite;
    }

    .profile-fire-smoke {
      animation: profile-button-smoke 4s ease-in-out infinite;
    }

    .profile-fire-spark {
      animation: profile-button-spark 2.2s ease-in-out infinite;
    }

    .profile-fire-spark-b { animation-delay: -0.7s; }
    .profile-fire-spark-c { animation-delay: -1.3s; }
    .profile-fire-streak-a { animation-delay: -0.44s; }
    .profile-fire-streak-b { animation-delay: -1.02s; }

    @keyframes profile-button-warmth {
      0%, 100% { transform: scaleX(0.98); opacity: 0.64; }
      45% { transform: scaleX(1.03); opacity: 0.96; }
      72% { transform: scaleX(1.01); opacity: 0.78; }
    }

    @keyframes profile-button-heat {
      0%, 100% { transform: translateX(-3px) scaleY(0.98); }
      42% { transform: translateX(4px) scaleY(1.03); }
      70% { transform: translateX(1px) scaleY(1.01); }
    }

    @keyframes profile-button-frame-a {
      0%, 100% { transform: translate(-8px, 3px) scale(0.99); opacity: 0.38; }
      18%, 48% { transform: translate(4px, -3px) scale(1.02); opacity: 0.96; }
      72% { transform: translate(10px, 0) scale(1.01); opacity: 0.58; }
    }

    @keyframes profile-button-frame-b {
      0%, 100% { transform: translate(8px, -2px) scale(1.01); opacity: 0.9; }
      34%, 58% { transform: translate(-6px, 3px) scale(0.99); opacity: 0.34; }
      78% { transform: translate(-10px, -1px) scale(1.02); opacity: 0.72; }
    }

    @keyframes profile-button-ribbon {
      0%, 100% { transform: translateY(2px) skewX(-1.2deg) scaleY(0.98); }
      42% { transform: translateY(-4px) skewX(1.8deg) scaleY(1.05); }
      72% { transform: translateY(-1px) skewX(-2deg) scaleY(1.01); }
    }

    @keyframes profile-button-edge-flow {
      0% { stroke-dashoffset: 0; opacity: 0.42; }
      40% { opacity: 0.95; }
      100% { stroke-dashoffset: -455; opacity: 0.42; }
    }

    @keyframes profile-button-outline {
      0%, 100% { opacity: 0.36; }
      45% { opacity: 0.82; }
      72% { opacity: 0.52; }
    }

    @keyframes profile-button-smoke {
      0%, 100% { transform: translateX(-8px); opacity: 0.08; }
      50% { transform: translateX(10px); opacity: 0.18; }
    }

    @keyframes profile-button-spark {
      0%, 100% { transform: translateY(8px) translateX(-3px) scale(0.55); opacity: 0; }
      20% { opacity: 0.92; }
      68% { transform: translateY(-8px) translateX(8px) scale(1); opacity: 0.82; }
      100% { transform: translateY(-15px) translateX(14px) scale(0.36); opacity: 0; }
    }

    body[data-theme="space"] .theme-profile-button {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      border-color: rgba(103, 232, 249, 0.42) !important;
      background:
        linear-gradient(135deg, rgba(8, 47, 73, 0.55), rgba(3, 7, 18, 0.42) 48%, rgba(76, 29, 149, 0.34)) !important;
      box-shadow:
        inset 0 1px 0 rgba(224, 242, 254, 0.08),
        0 16px 42px -32px rgba(34, 211, 238, 0.9);
    }

    body[data-theme="space"] .theme-profile-button::before {
      display: none;
    }

    .space-profile-button-svg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: 0;
      opacity: 0.96;
      pointer-events: none;
      overflow: hidden;
      border-radius: inherit;
      mix-blend-mode: screen;
      filter: saturate(1.24) contrast(1.08);
    }

    body[data-theme="space"] .theme-profile-button > :not(.space-profile-button-svg) {
      position: relative;
      z-index: 1;
    }

    .profile-space-nebula,
    .profile-space-cloud,
    .profile-space-orbit,
    .profile-space-outline,
    .profile-space-star {
      transform-box: fill-box;
      transform-origin: center;
    }

    .profile-space-nebula {
      animation: profile-space-nebula 5.8s ease-in-out infinite;
    }

    .profile-space-cloud-a {
      animation: profile-space-cloud 6.4s ease-in-out infinite;
    }

    .profile-space-cloud-b {
      animation: profile-space-cloud 7.2s ease-in-out infinite reverse;
    }

    .profile-space-orbit-a {
      stroke-dasharray: 118 420;
      animation: profile-space-orbit 4.2s linear infinite;
    }

    .profile-space-orbit-b {
      stroke-dasharray: 96 390;
      animation: profile-space-orbit 5.2s linear infinite reverse;
    }

    .profile-space-outline {
      animation: profile-space-outline 2.6s ease-in-out infinite;
    }

    .profile-space-star {
      animation: profile-space-star 2.4s ease-in-out infinite;
    }

    .profile-space-star-b { animation-delay: -0.6s; }
    .profile-space-star-c { animation-delay: -1.1s; }
    .profile-space-star-d { animation-delay: -1.6s; }
    .profile-space-streak-a { animation-delay: -0.5s; }
    .profile-space-streak-b { animation-delay: -1.2s; }

    @keyframes profile-space-nebula {
      0%, 100% { transform: scaleX(0.98); opacity: 0.64; }
      50% { transform: scaleX(1.04); opacity: 0.96; }
    }

    @keyframes profile-space-cloud {
      0%, 100% { transform: translateX(-12px) rotate(-2deg); opacity: 0.1; }
      50% { transform: translateX(14px) rotate(2deg); opacity: 0.19; }
    }

    @keyframes profile-space-orbit {
      0% { stroke-dashoffset: 0; opacity: 0.42; }
      42% { opacity: 0.95; }
      100% { stroke-dashoffset: -455; opacity: 0.42; }
    }

    @keyframes profile-space-outline {
      0%, 100% { opacity: 0.34; }
      46% { opacity: 0.84; }
      72% { opacity: 0.52; }
    }

    @keyframes profile-space-star {
      0%, 100% { transform: translateY(3px) scale(0.62); opacity: 0.08; }
      44% { transform: translateY(-2px) scale(1.22); opacity: 0.96; }
      70% { transform: translateY(0) scale(0.88); opacity: 0.5; }
    }

    .fire-swatch {
      background: radial-gradient(circle at 36% 70%, #fed7aa, transparent 17%), radial-gradient(circle at 58% 62%, #fb923c, transparent 34%), linear-gradient(160deg, #7f1d1d, #ea580c 55%, #111827);
      box-shadow: 0 0 24px rgba(249, 115, 22, 0.5);
    }

    .space-swatch {
      background:
        radial-gradient(circle at 30% 28%, #ffffff, transparent 6%),
        radial-gradient(circle at 68% 34%, #bae6fd, transparent 8%),
        radial-gradient(circle at 45% 72%, #a78bfa, transparent 18%),
        linear-gradient(160deg, #020617, #0e7490 52%, #4c1d95);
      box-shadow: 0 0 24px rgba(34, 211, 238, 0.48);
    }

    @media (prefers-reduced-motion: reduce) {
      html {
        scroll-behavior: auto;
      }

      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }
  
