* { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { height: 100%; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

    /* Default animation keyframes */
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes fadeInDown {
      from { opacity: 0; transform: translateY(-20px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes slideInUp {
      from { transform: translateY(100%); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    @keyframes slideInDown {
      from { transform: translateY(-100%); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    @keyframes scaleIn {
      from { transform: scale(0); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }
    @keyframes slideInRight {
      from { transform: translateX(-100%); opacity: 0; }
      to { transform: translateX(0); opacity: 1; }
    }
    @keyframes slideInLeft {
      from { transform: translateX(100%); opacity: 0; }
      to { transform: translateX(0); opacity: 1; }
    }
    @keyframes bounceIn {
      0% { transform: scale(0.7); opacity: 0; }
      60% { transform: scale(1.05); opacity: 1; }
      80% { transform: scale(0.98); }
      100% { transform: scale(1); opacity: 1; }
    }
    @keyframes zoomRotateIn {
      from { transform: scale(0.7) rotate(-8deg); opacity: 0; }
      to { transform: scale(1) rotate(0deg); opacity: 1; }
    }

    /* Loader Animations */
    @keyframes loaderSpinCW {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    @keyframes loaderSpinCCW {
      from { transform: rotate(360deg); }
      to { transform: rotate(0deg); }
    }
    @keyframes loaderBounceLow {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-15px); }
    }
    @keyframes loaderBounceMedium {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-30px); }
    }
    @keyframes loaderBounceHigh {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-50px); }
    }
    @keyframes loaderPulseLow {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.05); }
    }
    @keyframes loaderPulseMedium {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.15); }
    }
    @keyframes loaderPulseHigh {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.3); }
    }
    @keyframes loaderWobble {
      0%, 100% { transform: rotate(0deg); }
      25% { transform: rotate(-10deg); }
      75% { transform: rotate(10deg); }
    }
    @keyframes loaderFlip {
      0% { transform: perspective(400px) rotateY(0); }
      100% { transform: perspective(400px) rotateY(360deg); }
    }
    /* Loader Exit Animations */
    @keyframes fadeOut {
      from { opacity: 1; }
      to { opacity: 0; }
    }
    @keyframes slideUp {
      from { transform: translateY(0); opacity: 1; }
      to { transform: translateY(-100%); opacity: 0; }
    }
    @keyframes slideDown {
      from { transform: translateY(0); opacity: 1; }
      to { transform: translateY(100%); opacity: 0; }
    }
    @keyframes scaleOut {
      from { transform: scale(1); opacity: 1; }
      to { transform: scale(0); opacity: 0; }
    }

    /* Mobile app animations */
    @keyframes mobileScaleIn {
      from {
        transform: scale(0.8);
        opacity: 0;
      }
      to {
        transform: scale(1);
        opacity: 1;
      }
    }
    @keyframes mobileScaleOut {
      from {
        transform: scale(1);
        opacity: 1;
      }
      to {
        transform: scale(0.8);
        opacity: 0;
      }
    }


    .desktop { width: 100%; height: 100vh; position: relative; background-size: cover; background-position: center; }

    .desktop-bg-video, .desktop-bg-website, .desktop-bg-slider, .desktop-bg-animated {
      position: absolute;
      top: 0; left: 0; right: 0;
      width: 100%;
      height: 100vh;
      object-fit: cover;
      z-index: 0;
      pointer-events: none;
      transform: translateY(0);
      transition: transform 1.5s ease-out;
    }
    .desktop-bg-website, .desktop-bg-slider, .desktop-bg-animated { border: none; }

    .desktop.taskbar-visible .desktop-bg-video,
    .desktop.taskbar-visible .desktop-bg-website,
    .desktop.taskbar-visible .desktop-bg-slider,
    .desktop.taskbar-visible .desktop-bg-animated {
      transform: translateY(-48px);
    }

    .desktop-icon {
      position: absolute;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100px;
      padding: 8px;
      cursor: pointer;
      border-radius: 6px;
      user-select: none;
      transition: background 0.15s, left 0.15s ease-out, top 0.15s ease-out;
      z-index: 1;
    }
    .desktop-icon:hover { background: rgba(255, 255, 255, 0.1); }
    .desktop-icon.selected { background: rgba(100, 150, 255, 0.3); }
    .desktop-icon.dragging { opacity: 0.8; cursor: grabbing; z-index: 1000; transition: none; }
    .desktop-icon.drop-target { 
      background: rgba(100, 200, 100, 0.4); 
      border: 2px dashed rgba(100, 255, 100, 0.8);
      transform: scale(1.1);
    }
    .desktop-icon-emoji { 
      font-size: var(--desktop-icon-size, 42px); 
      line-height: 1; 
      margin-bottom: 0px; 
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); 
    }
    .desktop-icon-img { 
      width: var(--desktop-icon-size, 42px); 
      height: var(--desktop-icon-size, 42px); 
      object-fit: contain; 
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); 
    }
    .desktop-icon-label { 
      color: white; 
      font-size: var(--desktop-label-size, 12px); 
      line-height: 1.15; 
      text-align: center; 
      text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9); 
      width: 100%;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: break-word;
    }
    
    .taskbar {
      position: absolute;
      left: 0; right: 0; bottom: 0;
      height: 48px;
      background: rgba(15, 15, 30, 0.95);
      backdrop-filter: blur(10px);
      display: flex;
      align-items: center;
      padding: 0 12px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      z-index: 99999;
    }
    .taskbar-start {
      background: transparent;
      border: none;
      color: white;
      padding: 0 14px;
      border-radius: 3px;
      cursor: pointer;
      font-weight: 600;
      font-size: 13px;
      margin-right: 12px;
      transition: all 0.15s;
      height: 40px;
      display: flex;
      align-items: center;
    }
    .taskbar-start.no-label { justify-content: center; padding: 0 12px; }
    .taskbar-start.no-label .start-btn-icon { margin-right: 0; }
    .taskbar-start.no-label .start-btn-emoji { margin-right: 0; }
    .taskbar-start:hover { background: rgba(255,255,255,0.08); }
    .taskbar-start.active {
      background: rgba(255,255,255,0.15);
      border-top: 1px solid rgba(255,255,255,0.25);
    }
    .taskbar-start .start-btn-icon { width: 16px; height: 16px; object-fit: contain; vertical-align: middle; margin-right: 4px; }
    .taskbar-start .start-btn-emoji { display: inline-flex; align-items: center; margin-right: 4px; }
    .taskbar-windows { flex: 1; display: flex; gap: 6px; overflow-x: auto; }
    .taskbar-btn-icon { display: none; }
    .taskbar-btn-emoji { display: none; }
    .taskbar-btn {
      background: transparent;
      border: none;
      color: rgba(255,255,255,0.7);
      padding: 0 12px;
      border-radius: 3px;
      cursor: pointer;
      font-size: 12px;
      white-space: nowrap;
      transition: all 0.15s;
      position: relative;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 120px;
      min-width: 120px;
      max-width: 120px;
    }
    .taskbar-btn-text {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      flex: 1;
      min-width: 0;
      width: 100%;
      text-align: center;
    }
    .taskbar-btn:hover {
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.9);
    }
    .taskbar-btn.active {
      background: rgba(255,255,255,0.15);
      color: white;
      border-top: 1px solid rgba(255,255,255,0.25);
    }
    .taskbar-btn.active::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 24px;
      height: 2px;
      background: rgba(77, 171, 247, 0.9);
      border-radius: 2px 2px 0 0;
    }
    .taskbar-btn.minimized { opacity: 0.6; }
    .taskbar-tray {
      margin-left: auto;
      padding-left: 12px;
      border-left: 1px solid rgba(255,255,255,0.15);
      color: white;
      font-family: 'Segoe UI', 'Consolas', 'Monaco', monospace;
      font-size: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .weather-column {
      display: flex;
      flex-direction: column;
      align-items: center;
      line-height: 1.2;
      gap: 0px;
    }
    .weather-row {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .weather-icon {
      font-size: 16px;
    }
    .weather-temp {
      font-weight: 500;
      white-space: nowrap;
      font-size: 12px;
    }
    .location-name {
      font-size: 11px;
      opacity: 0.9;
      white-space: nowrap;
    }
    .time-date-column {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      line-height: 1.2;
      gap: 2px;
    }
    .time-display {
      font-size: 12px;
      font-weight: 500;
      white-space: nowrap;
    }
    .date-display {
      font-size: 11px;
      opacity: 0.9;
      white-space: nowrap;
    }
    
    .start-menu {
      position: absolute;
      bottom: 58px;
      left: 12px;
      width: 260px;
      background: rgba(20, 20, 35, 0.98);
      backdrop-filter: blur(20px);
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
      z-index: 100000;
      display: none;
      overflow: visible;
      --sm-anim-duration: 0.15s;
      --sm-anim-delay: 0s;
      animation: slideUp var(--sm-anim-duration) ease-out var(--sm-anim-delay);
      --start-menu-submenu-bg: rgba(20, 20, 35, 0.98);
      --start-menu-submenu-border: 1px solid rgba(255, 255, 255, 0.1);
      --start-menu-submenu-radius: 8px;
      --start-menu-submenu-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
      --start-menu-submenu-backdrop: blur(20px);
    }
    @keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    .start-menu.open { display: block; }
    .start-menu-header-icon { width: 14px; height: 14px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
    .start-menu-header {
      padding: var(--start-menu-header-padding-y, 10px) var(--start-menu-header-padding-x, 16px);
      background: var(--start-menu-header-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
      color: var(--start-menu-header-text-color, #ffffff);
      font-weight: var(--start-menu-header-font-weight, 600);
      font-size: var(--start-menu-header-font-size, 13px);
      border-bottom: var(--start-menu-header-border-bottom, none);
      border-radius: 10px 10px 0 0;
    }
    .start-menu-items {
      padding: 4px 0;
      /* max-height: 500px; */
      /* overflow-y: auto; */
    }
    .start-menu-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px; cursor: pointer; transition: background 0.15s; color: #e2e8f0; font-size: 13px; }
    .start-menu-item:hover { background: rgba(255, 255, 255, 0.1); }
    .start-menu-item-emoji { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
    .start-menu-item-img { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
    .start-menu-divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 6px 16px; }
    .start-menu-folder { position: relative; }
    .start-menu-arrow { margin-left: auto; font-size: 10px; opacity: 0.6; }
    .start-menu-submenu {
      position: absolute;
      left: 100%;
      top: 0;
      min-width: 200px;
      background: var(--start-menu-submenu-bg);
      backdrop-filter: var(--start-menu-submenu-backdrop);
      -webkit-backdrop-filter: var(--start-menu-submenu-backdrop);
      border-radius: var(--start-menu-submenu-radius);
      border: var(--start-menu-submenu-border);
      box-shadow: var(--start-menu-submenu-shadow);
      padding: 4px 0;
      display: none;
      z-index: 100001;
    }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    .start-menu-submenu.visible { display: block; animation: fadeIn 0.12s ease-out; }
    .start-menu-empty { opacity: 0.5; cursor: default; }
    .start-menu-empty:hover { background: transparent; }
    .login-menu { position: relative; }
    .login-menu-dropdown { position: absolute; bottom: 100%; left: 0; margin-bottom: 8px; width: 200px; background: rgba(20, 20, 35, 0.98); backdrop-filter: blur(20px); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); padding: 12px; display: none; }
    .login-menu-dropdown.open { display: block; animation: slideUp 0.15s ease-out; }
    .login-menu-dropdown input { width: 100%; padding: 6px 10px; font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px; background: rgba(15, 15, 30, 0.8); color: white; margin-bottom: 8px; }
    .login-menu-dropdown button { width: 100%; padding: 6px 12px; font-size: 12px; background: #e94560; color: white; border: none; border-radius: 4px; cursor: pointer; }
    .login-menu-dropdown button:hover { background: #dc2626; }
    .login-menu-dropdown .error { color: #ef4444; font-size: 11px; margin-top: 6px; }
    .login-menu-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px; cursor: pointer; transition: background 0.15s; color: #e2e8f0; font-size: 13px; }
    .login-menu-item:hover { background: rgba(255, 255, 255, 0.1); }

    /* Start Menu Themes */
    .start-menu.theme-modern .start-menu-header { background: var(--start-menu-header-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%)); }
    .start-menu.theme-dark .start-menu-header { background: var(--start-menu-header-bg, #1e293b); border-bottom: var(--start-menu-header-border-bottom, 1px solid #334155); }
    .start-menu.theme-dark { background: rgba(15, 23, 42, 0.98); --start-menu-submenu-bg: rgba(15, 23, 42, 0.98); --start-menu-submenu-border: 1px solid #334155; }
    .start-menu.theme-retro { border-radius: 0; --start-menu-submenu-radius: 0; --start-menu-submenu-backdrop: none; }
    .start-menu.theme-retro .start-menu-header { background: var(--start-menu-header-bg, #000080); }
    .start-menu.theme-glassmorphism {
      background: rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      --start-menu-submenu-bg: rgba(255, 255, 255, 0.08);
      --start-menu-submenu-border: 1px solid rgba(255, 255, 255, 0.2);
      --start-menu-submenu-radius: 8px;
      --start-menu-submenu-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
      --start-menu-submenu-backdrop: blur(20px);
    }
    .start-menu.theme-glassmorphism .start-menu-header {
      background: var(--start-menu-header-bg, rgba(255, 255, 255, 0.15));
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border-bottom: var(--start-menu-header-border-bottom, 1px solid rgba(255, 255, 255, 0.25));
    }
    .start-menu.theme-glassmorphism .start-menu-item:hover {
      background: rgba(255, 255, 255, 0.2);
    }
    .start-menu.theme-glassmorphism .start-menu-divider {
      background: rgba(255, 255, 255, 0.25);
    }
    .start-menu.theme-glassmorphism .start-menu-submenu {
      background: rgba(255, 255, 255, 0.08) !important;
      backdrop-filter: blur(20px) saturate(140%) !important;
      -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
      border: 1px solid rgba(255, 255, 255, 0.22) !important;
      isolation: isolate;
    }
    
    /* Disable WinBox intrinsic geometry transitions; only explicit configured animations should run */
    .winbox {
      transition: none !important;
    }
    /* Hide minimized windows during initial load entrance animation (but keep in DOM for animation) */
    .winbox.entrance-minimized {
      opacity: 0 !important;
      pointer-events: none !important;
    }
    .winbox .wb-header { height: 32px !important; line-height: 32px !important; font-size: 13px !important; }
    .winbox.unfocused .wb-header { filter: brightness(0.7); }
    .winbox .wb-icon {
      width: 24px !important;
      height: 24px !important;
      line-height: 24px !important;
      font-size: 14px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
    }
    .winbox .wb-icon .wb-header-icon-img { width: 14px; height: 14px; object-fit: contain; display: block; }
    .winbox .wb-icon .wb-header-icon-emoji { line-height: 1; font-size: 14px; }
    .winbox .wb-body { background: #1e293b; }
    .winbox.has-app-titlebar-content .wb-drag {
      display: flex;
      align-items: center;
      gap: 8px;
      padding-right: 8px;
    }
    .winbox.has-app-titlebar-content .wb-icon {
      float: none !important;
      margin: 0 !important;
      position: static !important;
      top: auto !important;
      flex: 0 0 auto;
    }
    .winbox.has-app-titlebar-content .wb-title {
      display: none !important;
    }
    .winbox.has-app-titlebar-content .wb-app-titlebar-content {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      overflow: hidden;
      pointer-events: none;
    }
    .winbox.has-app-titlebar-content .wb-app-titlebar-content > * {
      min-width: 0;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    /* Icon vertical alignment tweak (WinBox internal layout can vary by theme/version) */
    .winbox .wb-drag .wb-icon{
      position: relative;
      top: 5px;
    }
    .win-content { padding: 20px; color: #e2e8f0; font-size: 14px; line-height: 1.6; }
    .win-content h1, .win-content h2, .win-content h3 { color: white; margin: 0 0 15px; }
    .win-content p { margin: 0 0 12px; }
    .win-content a { color: #60a5fa; }
    .win-iframe { width: 100%; height: 100%; border: none; background: transparent; }

    /* ContentTools Edit Button in Title Bar */
    .wb-edit-content {
      background-size: 18px auto;
      background-position: center;
      background-repeat: no-repeat;
      opacity: 0.7;
      transition: opacity 0.2s;
    }
    .wb-edit-content:hover {
      opacity: 1;
    }
    .wb-edit-content.active {
      opacity: 1;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23f5576c' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    }
    .wb-edit-content:not(.active) {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'%3E%3C/path%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'%3E%3C/path%3E%3C/svg%3E");
    }
    .ce-element--focused {
      outline: 2px solid #667eea !important;
      outline-offset: 2px;
    }

    /* Simple demo custom control to prove WinBox addControl usage */
    .wb-like {
      width: 24px;
      height: 24px;
      background-size: 20px auto;
      background-position: center;
      background-repeat: no-repeat;
      opacity: 0.7;
      transition: opacity 0.2s;
    }
    .wb-like:hover {
      opacity: 1;
    }
    .wb-like:not(.active) {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='2'%3E%3Cpath d='M12 21s-5-3.33-8-6.67C2 12 2 9 4 7s4-1 5.5 0S12 9 12 9s1.5-2 2.5-2S18 6 20 7s2 5 0 7.33C17 17.67 12 21 12 21z'%3E%3C/path%3E%3C/svg%3E");
    }
    .wb-like.active {
      opacity: 1;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%23f97316' stroke='%23f97316' stroke-width='2'%3E%3Cpath d='M12 21s-5-3.33-8-6.67C2 12 2 9 4 7s4-1 5.5 0S12 9 12 9s1.5-2 2.5-2S18 6 20 7s2 5 0 7.33C17 17.67 12 21 12 21z'%3E%3C/path%3E%3C/svg%3E");
    }
    
    /* Hide scrollbar option - hides scrollbar but allows scrolling */
    .winbox.hide-scrollbar .wb-body {
      overflow-y: auto !important;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .winbox.hide-scrollbar .wb-body::-webkit-scrollbar {
      display: none;
      width: 0;
    }
    .winbox.hide-scrollbar .wb-body iframe {
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .winbox.hide-scrollbar .wb-body iframe::-webkit-scrollbar {
      display: none;
      width: 0;
    }

    /* Click overlay for unfocused windows with iframes */
    .winbox-click-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 9999;
      cursor: pointer;
      background: transparent;
    }
    
    .winbox.modern .wb-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    .winbox.admin-panel .wb-header { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important; }
    .winbox.dark .wb-header { background: #1e293b; }
    .winbox.dark .wb-body { background: #0f172a; }
    .winbox.retro { border-radius: 0; }
    .winbox.retro .wb-header { background: #000080; border-radius: 0; }
    .winbox.glassmorphism .wb-header {
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    .winbox.glassmorphism {
      background: rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
    }
    .winbox.glassmorphism .wb-body {
      background: rgba(30, 41, 59, 0.3);
    }
    .winbox.glassmorphism.focus {
      box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.45) !important;
    }
    .winbox.glassmorphism.focus .wb-header {
      background-color: #2c3e50 !important;
    }
    .winbox.glassmorphism:not(.focus) .wb-header {
      background-color: rgba(44,62,80,0.68) !important;
    }

    /* About Me window: match dashboard visual language (sharp, flat, no rounded frame) */
    .winbox.about-window {
      border: 1px solid #1e2235 !important;
      background: #0c0e14 !important;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55) !important;
      border-radius: 0 !important;
      overflow: hidden;
    }
    .winbox.about-window .wb-header {
      background: linear-gradient(180deg, #122033 0%, #0c1627 100%) !important;
      border-bottom: 1px solid #1e2c46 !important;
      color: #e6edf8 !important;
      font-weight: 600 !important;
      letter-spacing: 0.01em;
    }
    .winbox.about-window.unfocused .wb-header {
      filter: brightness(0.82);
    }
    .winbox.about-window .wb-body {
      background: #0c0e14 !important;
    }
    .winbox.about-window .win-iframe {
      background: #0c0e14 !important;
    }
    .winbox.about-window .wb-control * {
      opacity: 0.88;
    }
    .winbox.about-window .wb-control *:hover {
      opacity: 1;
      background-color: rgba(79, 143, 247, 0.10);
    }
    
    .winbox.no-close .wb-close { display: none; }
    .winbox.no-min .wb-min { display: none; }
    .winbox.no-max .wb-max { display: none; }
    .winbox.no-full .wb-full { display: none; }
    /* Hide fullscreen button globally */
    .winbox .wb-full { display: none !important; }
    
    .admin-frame { width: 100%; height: 100%; min-height: 100%; border: none; background: #0f0f1a; display: block; }
    .loading { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #ffffff; display: flex; align-items: center; justify-content: center; color: #111111; font-size: 18px; z-index: 1000000; flex-direction: column; gap: 20px; }
    .loader-container { /* Custom loader background container */ }
    .loader-content { /* Wrapper for loader image and text */ }
    .loader-image { max-width: 200px; max-height: 200px; object-fit: contain; display: block; }
    .loader-text { /* Custom text below loader image */ }
    /* Gate first paint: keep shell hidden until loader flow resolves. */
    body.page-loading #loading { display: flex !important; opacity: 1; visibility: visible; background: #ffffff !important; }
    body.page-loading #desktop,
    body.page-loading .winbox,
    body.page-loading #mobileLauncher,
    body.page-loading #mobileRecents,
    body.page-loading #mobileStartMenu,
    body.page-loading #mobileNavBar {
      visibility: hidden !important;
      pointer-events: none !important;
    }
    
    /* Toast notification */
    .toast {
      position: fixed;
      bottom: 70px;
      right: 20px;
      background: rgba(16, 185, 129, 0.95);
      color: white;
      padding: 12px 20px;
      border-radius: 8px;
      font-size: 14px;
      z-index: 999999;
      animation: toastIn 0.3s ease-out;
      box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    }
    .toast.hiding { animation: toastOut 0.3s ease-in forwards; }
    @keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes toastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); } }

    /* ============ Mobile Launcher Mode ============ */
    body.mobile-mode { 
      overflow: hidden; 
    }
    body.mobile-mode .desktop { display: none !important; }
    body.mobile-mode .desktop-icon { display: none !important; }
    body.mobile-mode .taskbar,
    body.mobile-mode .start-menu { display: none !important; }
    
    /* Ensure mobile background can be applied */
    html.mobile-mode, body.mobile-mode {
      background-attachment: fixed !important;
    }

    .mobile-only { display: none; }
    body.mobile-mode .mobile-only { display: block; }

    /* Hide mobile navigation during page load to prevent flash */
    body.page-loading .mobile-only {
      opacity: 0;
      pointer-events: none;
    }

    #mobileLauncher {
      position: absolute;
      inset: 0;
      padding: 16px 14px calc(82px + env(safe-area-inset-bottom));
      display: grid;
      grid-template-columns: repeat(var(--mobile-grid-cols, 4), minmax(0, 1fr));
      gap: var(--mobile-grid-gap, 14px) 10px;
      align-content: start;
      z-index: 2;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      background: transparent;
    }

    .mobile-app {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      gap: 6px;
      padding: 10px 8px;
      border-radius: 16px;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
    }
    .mobile-app:active { background: rgba(255,255,255,0.08); }
    .mobile-app-icon {
      width: calc(var(--mobile-icon-size, 44px) + 8px);
      height: calc(var(--mobile-icon-size, 44px) + 8px);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: var(--mobile-icon-size, 44px);
      line-height: 1;
      position: relative;
      border-radius: 12px;
      background-color: var(--mobile-icon-bg, transparent);
      background-image: var(--mobile-icon-gradient, linear-gradient(135deg, var(--icon-color-1, #667eea), var(--icon-color-2, #764ba2)));
      box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.16);
      overflow: hidden;
      color: rgba(255, 255, 255, 0.95);
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
    }
    #mobileLauncher .mobile-app img{
      padding-left:8px;
      padding-right:8px;
      padding-top:8px;
      padding-bottom:8px;
    }
    .mobile-app-icon img { 
      width: var(--mobile-icon-size, 44px); 
      height: var(--mobile-icon-size, 44px); 
      object-fit: contain; 
    }
    .mobile-app-label {
      color: white;
      font-size: var(--mobile-label-size, 12px);
      text-align: center;
      line-height: 1.15;
      text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      line-clamp: 2;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      max-width: 100%;
    }

    /* Android-style nav bar */
    #mobileNavBar {
      position: absolute;
      left: 0; right: 0; bottom: 0;
      height: calc(var(--mobile-nav-height, 58px) + env(safe-area-inset-bottom));
      padding-bottom: env(safe-area-inset-bottom);
      background: rgba(10, 10, 20, 0.92);
      backdrop-filter: blur(10px);
      display: flex;
      align-items: center;
      justify-content: space-around;
      z-index: 100001;
      border-top: 1px solid rgba(255,255,255,0.1);
    }
    .mobile-nav-btn {
      width: 64px;
      height: calc(var(--mobile-nav-height, 58px) - 16px);
      border: none;
      background: transparent;
      color: white;
      opacity: 0.95;
      border-radius: 12px;
      font-size: 20px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      position: relative;
    }
    .mobile-nav-btn:active { background: rgba(255,255,255,0.08); }
    .mobile-nav-btn::before {
      content: '';
      width: var(--mobile-nav-icon-size, 22px);
      height: var(--mobile-nav-icon-size, 22px);
      display: block;
      margin: 0 auto;
      background-repeat: no-repeat;
      background-position: center;
      background-size: contain;
      opacity: 0.95;
      filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
    }
    .mobile-nav-btn.back::before {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M14.5 5.5L8 12l6.5 6.5l1.5-1.5L11 12l5-5z'/%3E%3C/svg%3E");
    }
    .mobile-nav-btn.home::before {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6.5' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
    }
    .mobile-nav-btn.menu::before {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect x='7' y='7' width='10' height='10' rx='2' ry='2' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
    }

    /* Recents overlay */
    #mobileRecents {
      position: absolute;
      inset: 0;
      padding: 16px 14px calc(82px + env(safe-area-inset-bottom));
      background: transparent;
      background: rgba(0,0,0,0.35);
      backdrop-filter: blur(6px);
      z-index: 100000;
      display: none;
    }
    #mobileRecents.open { display: block; }
    .mobile-recents-header { display:flex; align-items:center; justify-content:space-between; color:white; font-weight:700; font-size:16px; }
    .mobile-recents-grid {
      margin-top: 12px;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }
    .mobile-recent-card {
      background: rgba(20,20,35,0.9);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 14px;
      padding: 12px;
      color: white;
      -webkit-tap-highlight-color: transparent;
    }
    .mobile-recent-card:active { background: rgba(255,255,255,0.08); }
    .mobile-recent-title { display:flex; align-items:center; gap:8px; margin-bottom: 8px; }
    .mobile-recent-title .ico { width: 24px; height: 24px; display:flex; align-items:center; justify-content:center; }
    .mobile-recent-title .name { font-weight: 700; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* Mobile app windows: no titlebar, content fills screen */
    body.mobile-mode .winbox.mobile-app-window .wb-header { display: none !important; }
    body.mobile-mode .winbox.mobile-app-window .wb-body {
      top: 0 !important;
      height: 100% !important;
    }

    /* Ensure mobile window has relative positioning for title overlay */
    body.mobile-mode .winbox.mobile-app-window {
      position: relative;
    }

    /* Mobile app open/close animations */
    body.mobile-mode .winbox.mobile-app-window.mobile-opening {
      animation: mobileScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
      transform-origin: center center;
    }
    body.mobile-mode .winbox.mobile-app-window.mobile-closing {
      animation: mobileScaleOut 0.2s ease-in forwards;
      transform-origin: center center;
    }

    /* Mobile app title overlay */
    .mobile-app-title {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      min-height: var(--mobile-app-header-height, 56px);
      padding: var(--mobile-app-header-padding-y, 12px) var(--mobile-app-header-padding-x, 20px);
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-size: var(--mobile-app-header-font-size, 18px);
      font-weight: var(--mobile-app-header-font-weight, 600);
      color: var(--mobile-app-header-text-color, #ffffff);
      background: var(--mobile-app-header-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
      z-index: 999999;
      pointer-events: none;
      text-shadow: 0 1px 2px rgba(0,0,0,0.3);
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    /* Disable resize handles for no-resize class */
    .winbox.no-resize .wb-n,
    .winbox.no-resize .wb-e,
    .winbox.no-resize .wb-s,
    .winbox.no-resize .wb-w,
    .winbox.no-resize .wb-nw,
    .winbox.no-resize .wb-ne,
    .winbox.no-resize .wb-sw,
    .winbox.no-resize .wb-se {
      display: none !important;
    }

    /* Disable move for no-move class */
    .winbox.no-move .wb-drag {
      pointer-events: none !important;
    }

    /* Fullscreen mobile Start menu */
    #mobileStartMenu {
      position: absolute;
      inset: 0;
      padding: 12px 12px calc(82px + env(safe-area-inset-bottom));
      background: transparent;
      background: rgba(10,10,20,0.92);
      backdrop-filter: blur(14px);
      z-index: 100000;
      display: none;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    #mobileStartMenu.open { display: block; }
    .mobile-start-header {
      display:flex;
      align-items:center;
      gap: 10px;
      color: white;
      font-weight: 800;
      font-size: 16px;
      padding: 10px 12px;
      border-radius: 14px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.08);
    }
    .mobile-start-section {
      margin-top: 12px;
      padding: 10px 12px;
      border-radius: 14px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.06);
    }
    .mobile-start-section-title {
      color: rgba(255,255,255,0.75);
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 0.6px;
    }
    .mobile-start-item {
      display:flex;
      align-items:center;
      gap: 10px;
      padding: 10px 10px;
      border-radius: 12px;
      color: white;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .mobile-start-item:active { background: rgba(255,255,255,0.08); }
    .mobile-start-item .ico { width: 22px; height: 22px; display:flex; align-items:center; justify-content:center; }
    .mobile-start-item .ico img { width: 18px; height: 18px; object-fit: contain; }
    .mobile-start-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 8px 6px; border-radius: 1px; }

    /* Context Menu Styles */
    .context-menu {
      position: fixed;
      background: rgba(20, 20, 35, 0.98);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
      min-width: 200px;
      padding: 6px;
      z-index: 1000000;
      animation: contextMenuFadeIn 0.15s ease-out;
      user-select: none;
    }
    
    @keyframes contextMenuFadeIn {
      from {
        opacity: 0;
        transform: translateY(-5px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }
    
    .context-menu-item {
      padding: 8px 12px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      transition: background 0.1s;
      color: #e2e8f0;
      font-size: 13px;
      position: relative;
    }
    
    .context-menu-item:hover:not(.disabled) {
      background: rgba(255, 255, 255, 0.1);
    }
    
    .context-menu-item.focused:not(.disabled) {
      background: rgba(255, 255, 255, 0.15);
    }
    
    .context-menu-item.disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }
    
    .context-menu-icon {
      width: 18px;
      height: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 16px;
    }
    
    .context-menu-icon img {
      width: 16px;
      height: 16px;
      object-fit: contain;
    }
    
    .context-menu-label {
      flex: 1;
      white-space: nowrap;
    }
    
    .context-menu-shortcut {
      margin-left: auto;
      font-size: 11px;
      opacity: 0.6;
      font-family: 'Consolas', 'Monaco', monospace;
    }
    
    .context-menu-arrow {
      margin-left: auto;
      font-size: 10px;
      opacity: 0.6;
    }
    
    .context-menu-divider {
      height: 1px;
      background: rgba(255, 255, 255, 0.1);
      margin: 4px 8px;
    }
    
    .context-submenu {
      position: fixed;
    }


