/* GreenGetWare Web OS Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

.webos-body {
  font-family: 'Inter', -apple-system, sans-serif;
  overflow: hidden;
  height: 100vh;
  user-select: none;
}

/* Boot Screen */
#bootScreen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  transition: opacity 0.6s ease;
}

#bootScreen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.boot-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.boot-logo h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #f1f5f9;
}

.boot-logo h2 span {
  color: #39d353;
}

.boot-progress {
  width: 240px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.boot-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #39d353, #92fe9d);
  border-radius: 4px;
  animation: bootLoad 2.5s ease-in-out forwards;
}

@keyframes bootLoad {
  0% { width: 0%; }
  100% { width: 100%; }
}

.boot-text {
  margin-top: 16px;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

/* Desktop */
#desktop {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  overflow: hidden;
}

#desktop.light-mode {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 50%, #fbc2eb 100%);
}

#desktop.wallpaper-1 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
#desktop.wallpaper-2 { background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }
#desktop.wallpaper-3 { background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%); }
#desktop.wallpaper-4 { background: linear-gradient(135deg, #41295a 0%, #2F0743 100%); }
#desktop.wallpaper-5 { background: linear-gradient(135deg, #134e5e 0%, #71b280 100%); }
#desktop.wallpaper-6 { background: linear-gradient(135deg, #e66465 0%, #9198e5 100%); }

/* Desktop Icons */
#desktopIcons {
  position: absolute;
  top: 40px;
  left: 16px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 8px;
  height: calc(100vh - 120px);
}

.desktop-icon {
  width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.desktop-icon:hover {
  background: rgba(255,255,255,0.1);
}

.desktop-icon.active {
  background: rgba(57,211,83,0.15);
  outline: 1px solid rgba(57,211,83,0.3);
}

.desktop-icon .icon-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
}

.desktop-icon .icon-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  line-height: 1.2;
  word-break: break-word;
}

/* Windows */
#windowsContainer {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.window {
  position: absolute;
  background: var(--bg-secondary, #1a1a2e);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  min-width: 320px;
  min-height: 200px;
  animation: windowOpen 0.2s ease-out;
}

@keyframes windowOpen {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.window.closing {
  animation: windowClose 0.15s ease-in forwards;
}

@keyframes windowClose {
  to { opacity: 0; transform: scale(0.92); }
}

.window.minimized {
  display: none;
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

[data-bs-theme="light"] .window {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: grab;
  flex-shrink: 0;
  justify-content: flex-end;
}

[data-bs-theme="light"] .window-titlebar {
  background: rgba(0,0,0,0.03);
  border-bottom-color: rgba(0,0,0,0.06);
}

.window-titlebar:active {
  cursor: grabbing;
}

.window-title {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary, #f1f5f9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.window-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.window-controls {
  display: flex;
  gap: 8px;
  order: -1;
}

/* Traffic Light Controls (macOS) */
.traffic-light {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s ease;
}

.traffic-close { background: #ff5f57; }
.traffic-min { background: #febc2e; }
.traffic-max { background: #28c840; }

.traffic-light::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.window-controls:hover .traffic-light::after { opacity: 1; }

.traffic-close::before {
  content: '\d7';
  font-size: 10px;
  color: rgba(0,0,0,0.5);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
  position: relative;
  z-index: 1;
}
.traffic-min::before {
  content: '\2013';
  font-size: 10px;
  color: rgba(0,0,0,0.5);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
  position: relative;
  z-index: 1;
}
.traffic-max::before {
  content: '+';
  font-size: 10px;
  color: rgba(0,0,0,0.5);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
  position: relative;
  z-index: 1;
}

.window-controls:hover .traffic-light::before { opacity: 1; }

/* Zoom Controls */
.window-zoom {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.window-titlebar:hover .window-zoom { opacity: 1; }

.zoom-btn {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  transition: all 0.15s ease;
}

.zoom-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="light"] .zoom-btn:hover {
  background: rgba(0,0,0,0.08);
}

.zoom-level {
  font-size: 0.68rem;
  color: var(--text-secondary, #94a3b8);
  min-width: 36px;
  text-align: center;
  user-select: none;
}

.zoom-reset {
  margin-left: 2px;
}

.window-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: var(--bg-primary, #0f0f1a);
  display: flex;
  flex-direction: column;
}

[data-bs-theme="light"] .window-content {
  background: #f8fafc;
}

.window-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.window-resize {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  cursor: se-resize;
  z-index: 10;
}

/* Top Menu Bar (macOS style) */
#topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(15,15,26,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 10000;
  font-size: 0.8rem;
}

[data-bs-theme="light"] #topbar {
  background: rgba(255,255,255,0.85);
  border-bottom-color: rgba(0,0,0,0.06);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-logo {
  width: 24px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.topbar-logo:hover { background: rgba(255,255,255,0.1); }
.topbar-logo.active { background: rgba(57,211,83,0.2); }
[data-bs-theme="light"] .topbar-logo:hover { background: rgba(0,0,0,0.06); }

.topbar-appname {
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  padding: 0 8px;
  font-size: 0.82rem;
}

.topbar-menu-item {
  padding: 2px 10px;
  border-radius: 6px;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.15s ease;
}

.topbar-menu-item:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="light"] .topbar-menu-item:hover {
  background: rgba(0,0,0,0.06);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.topbar-tray-btn {
  width: 28px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: all 0.15s ease;
}

.topbar-tray-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="light"] .topbar-tray-btn:hover {
  background: rgba(0,0,0,0.06);
}

.topbar-clock {
  padding: 0 8px;
  height: 22px;
  display: flex;
  align-items: center;
  color: var(--text-primary, #f1f5f9);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.topbar-clock:hover { background: rgba(255,255,255,0.08); }
[data-bs-theme="light"] .topbar-clock:hover { background: rgba(0,0,0,0.06); }

/* Dock (macOS style) */
#dock {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#dock.dock-hidden {
  transform: translateX(-50%) translateY(100%);
  opacity: 0;
}

#dock.dock-hidden:hover {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#dockInner {
  background: rgba(20,20,35,0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 6px 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  display: flex;
  align-items: flex-end;
}

[data-bs-theme="light"] #dockInner {
  background: rgba(255,255,255,0.75);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

#dockApps {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.dock-app {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s ease;
}

.dock-app:hover {
  transform: scale(1.25) translateY(-4px);
}

.dock-app.active {
  transform: scale(1.1) translateY(-2px);
}

.dock-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dock-indicator {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-primary, #f1f5f9);
}

.dock-app.active .dock-indicator { opacity: 1; }
.dock-app:not(.active) .dock-indicator { opacity: 0.4; }

.dock-separator {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  margin: 0 4px;
  align-self: center;
}

[data-bs-theme="light"] .dock-separator {
  background: rgba(0,0,0,0.08);
}

/* Start Menu */
.start-menu {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  max-height: 520px;
  background: rgba(20,20,35,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  z-index: 10001;
  overflow: hidden;
  animation: startMenuOpen 0.2s ease-out;
}

[data-bs-theme="light"] .start-menu {
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

@keyframes startMenuOpen {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.start-menu.open {
  display: flex;
}

.start-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

[data-bs-theme="light"] .start-header {
  border-bottom-color: rgba(0,0,0,0.06);
}

.start-search {
  position: relative;
}

.start-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
}

.start-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: var(--text-primary, #f1f5f9);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s ease;
}

[data-bs-theme="light"] .start-search input {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}

.start-search input:focus {
  border-color: #39d353;
}

.start-search input::placeholder {
  color: var(--text-muted, #64748b);
}

.start-apps {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.start-apps::-webkit-scrollbar { width: 6px; }
.start-apps::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.start-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.start-app:hover {
  background: rgba(255,255,255,0.08);
}

[data-bs-theme="light"] .start-app:hover {
  background: rgba(0,0,0,0.05);
}

.start-app .app-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}

.start-app .app-name {
  font-size: 0.7rem;
  color: var(--text-secondary, #94a3b8);
  text-align: center;
  line-height: 1.2;
}

.start-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-bs-theme="light"] .start-footer {
  border-top-color: rgba(0,0,0,0.06);
}

.start-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary, #f1f5f9);
  font-size: 0.82rem;
}

.start-user i {
  font-size: 1.3rem;
  color: var(--text-secondary, #94a3b8);
}

.start-power {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.start-power:hover {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}

/* Context Menu */
.context-menu {
  position: absolute;
  min-width: 200px;
  background: rgba(20,20,35,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  padding: 6px;
  z-index: 10002;
  display: none;
}

[data-bs-theme="light"] .context-menu {
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.context-menu.open {
  display: block;
  animation: ctxOpen 0.12s ease-out;
}

@keyframes ctxOpen {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.ctx-item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-primary, #f1f5f9);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.12s ease;
}

.ctx-item:hover {
  background: rgba(57,211,83,0.12);
}

.ctx-item i {
  font-size: 0.9rem;
  color: var(--text-secondary, #94a3b8);
  width: 16px;
}

.ctx-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
}

[data-bs-theme="light"] .ctx-divider {
  background: rgba(0,0,0,0.08);
}

/* About Dialog */
.about-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  background: rgba(20,20,35,0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  z-index: 10003;
  padding: 32px;
  text-align: center;
  display: none;
}

[data-bs-theme="light"] .about-dialog {
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,0,0,0.08);
}

.about-dialog.open {
  display: block;
  animation: aboutOpen 0.2s ease-out;
}

@keyframes aboutOpen {
  from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.about-dialog h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary, #f1f5f9);
  margin-bottom: 4px;
}

.about-dialog h3 span { color: #39d353; }

.about-dialog .version {
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.about-dialog p {
  color: var(--text-secondary, #94a3b8);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.about-dialog .about-close {
  padding: 8px 24px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary, #f1f5f9);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.about-dialog .about-close:hover {
  background: rgba(57,211,83,0.12);
  border-color: #39d353;
}

/* Settings Window */
.settings-window {
  padding: 24px;
  color: var(--text-primary, #f1f5f9);
}

.settings-window h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.settings-section {
  margin-bottom: 24px;
}

.settings-label {
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 8px;
}

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wallpaper-option {
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.wallpaper-option:hover { border-color: rgba(255,255,255,0.2); }
.wallpaper-option.selected { border-color: #39d353; }

.wp-1 { background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%); }
.wp-2 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
.wp-3 { background: linear-gradient(135deg, #232526 0%, #414345 100%); }
.wp-4 { background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }
.wp-5 { background: linear-gradient(135deg, #41295a 0%, #2F0743 100%); }
.wp-6 { background: linear-gradient(135deg, #134e5e 0%, #71b280 100%); }

/* Responsive */
@media (max-width: 768px) {
  .start-menu { width: calc(100vw - 16px); max-height: 400px; }
  .start-apps { grid-template-columns: repeat(3, 1fr); }
  .desktop-icon { width: 72px; }
  .window { min-width: 280px; }
  .widget { display: none; }
  .dock-icon { width: 32px; height: 32px; font-size: 1rem; }
  .dock-app { width: 40px; height: 40px; }
  .topbar-menu-item { display: none; }
}

/* ========== Snap Preview ========== */
.snap-preview {
  position: absolute;
  background: rgba(57, 211, 83, 0.12);
  border: 2px solid rgba(57, 211, 83, 0.4);
  border-radius: 8px;
  z-index: 50;
  pointer-events: none;
  display: none;
  transition: all 0.1s ease;
}

/* ========== Desktop Widgets ========== */
#desktopWidgets {
  position: absolute;
  top: 40px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1;
  pointer-events: none;
}

.widget {
  background: rgba(20, 20, 35, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  min-width: 180px;
  pointer-events: auto;
}

[data-bs-theme="light"] .widget {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.06);
}

.widget-clock { text-align: center; }
.widget-time { font-size: 2rem; font-weight: 700; color: #fff; line-height: 1; }
.widget-date { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 4px; }
[data-bs-theme="light"] .widget-time { color: #1a1a2e; }
[data-bs-theme="light"] .widget-date { color: rgba(0,0,0,0.4); }

.widget-title { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
[data-bs-theme="light"] .widget-title { color: rgba(0,0,0,0.5); }

.widget-row { display: flex; justify-content: space-between; font-size: 0.78rem; color: rgba(255,255,255,0.6); padding: 3px 0; }
[data-bs-theme="light"] .widget-row { color: rgba(0,0,0,0.5); }
.widget-val { color: #39d353; font-weight: 600; }

/* ========== Notifications ========== */
#notificationArea {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 50000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.notification {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(20, 20, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
}

[data-bs-theme="light"] .notification {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.notification.show { opacity: 1; transform: translateX(0); }

.notif-icon { flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.notification-info .notif-icon { background: rgba(0, 201, 255, 0.15); color: #0ea5e9; }
.notification-success .notif-icon { background: rgba(57, 211, 83, 0.15); color: #39d353; }
.notification-error .notif-icon { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary, #f1f5f9); margin-bottom: 2px; }
.notif-text { font-size: 0.78rem; color: var(--text-secondary, #94a3b8); line-height: 1.4; }

.notif-close { flex-shrink: 0; width: 24px; height: 24px; border: none; border-radius: 6px; background: transparent; color: var(--text-muted, #64748b); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.notif-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary, #f1f5f9); }

/* ========== Terminal ========== */
.terminal {
  background: #0a0a14;
  color: #a3e635;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.terminal-line { white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.terminal-info { color: #60a5fa; }
.terminal-error { color: #ef4444; }
.terminal-prompt-text { color: #39d353; }
.term-dir { color: #60a5fa; font-weight: 600; }
.term-file { color: #e2e8f0; }
.terminal-neofetch { color: #e2e8f0; font-size: 0.78rem; line-height: 1.4; margin: 0; }

.terminal-input-row {
  display: flex;
  align-items: center;
  background: #0a0a14;
  padding: 0 12px 12px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
}

.terminal-prompt { color: #39d353; flex-shrink: 0; margin-right: 8px; }
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #a3e635;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  caret-color: #a3e635;
}

/* ========== File Explorer ========== */
.file-explorer { display: flex; flex-direction: column; height: 100%; }

.fe-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

[data-bs-theme="light"] .fe-toolbar { border-bottom-color: rgba(0,0,0,0.06); background: rgba(0,0,0,0.02); }

.fe-btn {
  width: 32px; height: 32px;
  border: none; border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.fe-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary, #f1f5f9); }
[data-bs-theme="light"] .fe-btn:hover { background: rgba(0,0,0,0.06); }

.fe-path {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-secondary, #94a3b8);
  padding: 0 8px;
  font-family: 'Courier New', monospace;
}

.fe-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  align-content: start;
}

.fe-body.fe-drag-over { background: rgba(57,211,83,0.08); outline: 2px dashed rgba(57,211,83,0.4); outline-offset: -4px; }

.fe-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.fe-item:hover { background: rgba(255,255,255,0.06); }
.fe-item.selected { background: rgba(57,211,83,0.12); }
[data-bs-theme="light"] .fe-item:hover { background: rgba(0,0,0,0.04); }

.fe-icon { font-size: 2rem; color: #3b82f6; }
.fe-icon .bi-folder-fill { color: #f59e0b; }
.fe-icon .bi-file-earmark-text { color: var(--text-muted, #64748b); }

.fe-name {
  font-size: 0.72rem;
  color: var(--text-primary, #f1f5f9);
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
}

.fe-delete {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border: none; border-radius: 5px;
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.fe-item:hover .fe-delete { display: flex; }
.fe-delete:hover { background: #ef4444; color: #fff; }

.fe-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted, #64748b);
}

.fe-empty i { font-size: 3rem; opacity: 0.3; }
.fe-empty p { margin-top: 12px; font-size: 0.85rem; }

/* File Explorer Context Menu */
.fe-context-menu {
  position: fixed;
  z-index: 100000;
  min-width: 160px;
  background: rgba(20, 20, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.fe-context-menu.open { opacity: 1; transform: scale(1); }

[data-bs-theme="light"] .fe-context-menu {
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.fe-ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-primary, #f1f5f9);
  cursor: pointer;
  transition: background 0.12s ease;
}

.fe-ctx-item:hover { background: rgba(57,211,83,0.15); }
[data-bs-theme="light"] .fe-ctx-item:hover { background: rgba(57,211,83,0.1); }

.fe-ctx-item i { font-size: 0.85rem; opacity: 0.7; }

.fe-ctx-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 8px; }
[data-bs-theme="light"] .fe-ctx-divider { background: rgba(0,0,0,0.06); }

.fe-ctx-danger { color: #ef4444; }
.fe-ctx-danger:hover { background: rgba(239,68,68,0.15); }

/* ========== Notepad ========== */
.notepad { display: flex; flex-direction: column; height: 100%; }

.notepad-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

[data-bs-theme="light"] .notepad-toolbar { border-bottom-color: rgba(0,0,0,0.06); background: rgba(0,0,0,0.02); }

.np-title { flex: 1; font-size: 0.82rem; color: var(--text-primary, #f1f5f9); font-weight: 500; }

.np-actions { display: flex; gap: 4px; flex-shrink: 0; }

.np-btn {
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  font-size: 0.78rem;
  display: flex; align-items: center; gap: 4px;
  transition: all 0.15s ease;
}

.np-btn:hover { background: rgba(57,211,83,0.12); border-color: #39d353; color: #39d353; }

.notepad-area {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  padding: 16px;
  background: var(--bg-primary, #0f0f1a);
  color: var(--text-primary, #f1f5f9);
  font-family: 'Inter', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ========== Task Manager ========== */
.taskmgr { display: flex; flex-direction: column; height: 100%; }

.tm-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="light"] .tm-header { border-bottom-color: rgba(0,0,0,0.06); }

.tm-list { flex: 1; overflow-y: auto; padding: 8px; }

.tm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.tm-item:hover { background: rgba(255,255,255,0.04); }
[data-bs-theme="light"] .tm-item:hover { background: rgba(0,0,0,0.03); }

.tm-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }

.tm-info { flex: 1; min-width: 0; }
.tm-name { font-size: 0.82rem; font-weight: 500; color: var(--text-primary, #f1f5f9); }
.tm-status { font-size: 0.72rem; color: var(--text-muted, #64748b); }

.tm-btn {
  width: 32px; height: 32px;
  border: none; border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.tm-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary, #f1f5f9); }
[data-bs-theme="light"] .tm-btn:hover { background: rgba(0,0,0,0.06); }
.tm-kill:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

.tm-empty { text-align: center; padding: 40px; color: var(--text-muted, #64748b); font-size: 0.85rem; }

/* ========== Lock Screen ========== */
.lock-screen {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 20, 0.9);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  z-index: 90000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lock-screen.show { opacity: 1; }

.lock-content { text-align: center; }

.lock-time { font-size: 5rem; font-weight: 200; color: #fff; line-height: 1; }
.lock-date { font-size: 1.1rem; color: rgba(255,255,255,0.5); margin-top: 8px; }
.lock-hint { font-size: 0.8rem; color: rgba(255,255,255,0.3); margin-top: 40px; animation: pulse 2s ease-in-out infinite; }

@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.6; } }

/* ========== Start Menu Categories ========== */
.start-cat-header {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 4px 4px;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 4px;
}

.start-cat-header:first-child { border-top: none; margin-top: 0; }
[data-bs-theme="light"] .start-cat-header { border-top-color: rgba(0,0,0,0.04); }

/* ========== Shortcuts Dialog ========== */
.shortcuts-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: 80vh;
  background: rgba(20, 20, 35, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  z-index: 10003;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  overflow: hidden;
}

[data-bs-theme="light"] .shortcuts-dialog {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.shortcuts-dialog.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .shortcuts-header { border-bottom-color: rgba(0, 0, 0, 0.06); }

.shortcuts-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcuts-header h4 i { color: #39d353; }

.shortcuts-close {
  width: 32px; height: 32px;
  border: none; border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.shortcuts-close:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.shortcuts-body {
  padding: 16px 24px 24px;
  overflow-y: auto;
  max-height: calc(80vh - 70px);
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 16px;
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.82rem;
}

.shortcut-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #f1f5f9);
  font-family: 'Inter', monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

[data-bs-theme="light"] .shortcut-keys kbd {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.shortcut-desc {
  color: var(--text-primary, #f1f5f9);
  font-size: 0.82rem;
  text-align: right;
}

.shortcut-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 0;
}

[data-bs-theme="light"] .shortcut-divider { background: rgba(0, 0, 0, 0.06); }

/* ========== Spotlight Search ========== */
.spotlight-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.spotlight-overlay.open { opacity: 1; pointer-events: auto; }

.spotlight-box {
  width: 90%;
  max-width: 560px;
  background: rgba(20,20,35,0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  transform: scale(0.95) translateY(-10px);
  transition: transform 0.2s ease;
}

.spotlight-overlay.open .spotlight-box { transform: scale(1) translateY(0); }

[data-bs-theme="light"] .spotlight-box {
  background: rgba(255,255,255,0.98);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
}

.spotlight-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

[data-bs-theme="light"] .spotlight-input-row { border-bottom-color: rgba(0,0,0,0.06); }

.spotlight-search-icon { font-size: 1.1rem; color: var(--text-muted, #64748b); }

.spotlight-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary, #f1f5f9);
  font-size: 1.05rem;
  font-weight: 400;
}

.spotlight-input::placeholder { color: var(--text-muted, #64748b); }

.spotlight-close {
  width: 28px; height: 28px;
  border: none; border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
}

.spotlight-close:hover { background: rgba(255,255,255,0.15); color: var(--text-primary, #f1f5f9); }
[data-bs-theme="light"] .spotlight-close { background: rgba(0,0,0,0.05); }
[data-bs-theme="light"] .spotlight-close:hover { background: rgba(0,0,0,0.1); }

.spotlight-results { max-height: 400px; overflow-y: auto; padding: 8px; }

.spotlight-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.spotlight-result:hover { background: rgba(57,211,83,0.12); }
[data-bs-theme="light"] .spotlight-result:hover { background: rgba(57,211,83,0.08); }

.spotlight-result-icon { font-size: 1.4rem; flex-shrink: 0; width: 32px; text-align: center; }

.spotlight-result-info { flex: 1; min-width: 0; }

.spotlight-result-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary, #f1f5f9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-result-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
}
