:root {
  --bg-image: radial-gradient(circle at 20% 30%, rgba(0, 198, 255, 0.35) 0%, transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(0, 114, 255, 0.35) 0%, transparent 40%),
              radial-gradient(circle at 50% 80%, rgba(103, 58, 183, 0.35) 0%, transparent 50%),
              linear-gradient(135deg, #0a0e17 0%, #151a26 100%);
  --win-bg: rgba(255, 255, 255, 0.25);
  --win-border: rgba(255, 255, 255, 0.35);
  --text-color: #ffffff;
  --text-reverse: #111111;
  --taskbar-bg: rgba(255, 255, 255, 0.15);
  --taskbar-border: rgba(255, 255, 255, 0.25);
  --start-bg: rgba(255, 255, 255, 0.2);
  --accent-color: #0078d7;
  --hover-bg: rgba(255, 255, 255, 0.15);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --bg-image: radial-gradient(circle at 20% 30%, rgba(0, 198, 255, 0.3) 0%, transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(0, 114, 255, 0.3) 0%, transparent 40%),
              radial-gradient(circle at 50% 80%, rgba(103, 58, 183, 0.3) 0%, transparent 50%),
              linear-gradient(135deg, #eef2f3 0%, #8e9eab 100%);
  --win-bg: rgba(255, 255, 255, 0.45);
  --win-border: rgba(0, 0, 0, 0.08);
  --text-color: #111111;
  --text-reverse: #ffffff;
  --taskbar-bg: rgba(255, 255, 255, 0.25);
  --taskbar-border: rgba(0, 0, 0, 0.08);
  --start-bg: rgba(255, 255, 255, 0.4);
  --hover-bg: rgba(0, 0, 0, 0.06);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

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

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

#desktop {
  width: 100vw;
  height: 100vh;
  background: var(--bg-image);
  background-size: 200% 200%;
  animation: bloomMove 15s infinite alternate ease-in-out;
  position: relative;
  overflow: hidden;
  transition: background 0.5s ease;
}

@keyframes bloomMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.desktop-icons {
  position: absolute;
  top: 20px;
  left: 20px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: start;
  gap: 15px;
  z-index: 1;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 5px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
  border: 1px solid transparent;
  width: 80px;
  height: 85px;
}

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

.desktop-icon:active {
  transform: scale(0.93);
}

.desktop-icon svg {
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.desktop-icon span {
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

#windows-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
}

.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(35px) saturate(180%);
  pointer-events: auto;
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: opacity 0.25s cubic-bezier(0.1, 0.9, 0.2, 1), transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1), visibility 0.25s;
  overflow: hidden;
  z-index: 10;
  visibility: hidden;
}

.window.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  visibility: visible;
}

.window.minimized {
  opacity: 0;
  transform: scale(0.8) translateY(120px);
  pointer-events: none;
  visibility: hidden;
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 48px) !important;
  border-radius: 0;
}

.window.active {
  z-index: 20;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 120, 215, 0.4);
}

.window-header {
  height: 40px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: move;
}

[data-theme="light"] .window-header {
  background: rgba(255, 255, 255, 0.15);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.window-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-color);
  font-weight: 500;
}

.window-title svg {
  width: 18px;
  height: 18px;
}

.window-controls {
  display: flex;
  align-items: center;
  height: 100%;
}

.win-btn {
  width: 46px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.win-btn:hover {
  background: var(--hover-bg);
}

.win-btn.win-close:hover {
  background: #db4437;
  color: white;
}

.window-body {
  flex: 1;
  overflow: auto;
  position: relative;
  display: flex;
  color: var(--text-color);
}

#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 48px;
  background: var(--taskbar-bg);
  border-top: 1px solid var(--taskbar-border);
  backdrop-filter: blur(25px) saturate(180%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 100;
  padding: 0 15px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.taskbar-center {
  display: flex;
  align-items: center;
  gap: 6px;
}

.taskbar-item {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  position: relative;
  color: var(--text-color);
}

.taskbar-item:hover {
  background: var(--hover-bg);
}

.taskbar-item:active {
  transform: scale(0.9);
}

.taskbar-item svg {
  width: 24px;
  height: 24px;
}

.taskbar-item.running::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: calc(50% - 3px);
  width: 6px;
  height: 3px;
  background: var(--text-color);
  border-radius: 2px;
  transition: width 0.2s;
}

.taskbar-item.running.active::after {
  background: var(--accent-color);
  width: 12px;
  left: calc(50% - 6px);
}

.taskbar-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}

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

.taskbar-right {
  justify-self: end;
}

#system-tray {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

#system-tray:hover {
  background: var(--hover-bg);
}

.tray-icon {
  font-size: 14px;
}

.tray-time-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
  color: var(--text-color);
}

#start-menu {
  position: fixed;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: 520px;
  height: 550px;
  border-radius: 12px;
  background: var(--start-bg);
  border: 1px solid var(--taskbar-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(35px) saturate(180%);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s, visibility 0.25s;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

#start-menu.open {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.start-search-container {
  width: 100%;
  margin-bottom: 24px;
}

#start-search-input {
  width: 100%;
  height: 38px;
  border-radius: 19px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0 18px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 13px;
  color: #fff;
  outline: none;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s;
}

#start-search-input:focus {
  border-color: var(--accent-color);
}

[data-theme="light"] #start-search-input {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.1);
  color: #111;
}

.start-section-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-color);
}

.start-apps-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  flex: 1;
}

.start-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 5px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.start-app-item:hover {
  background: var(--hover-bg);
}

.start-app-item svg {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
}

.start-app-item span {
  font-size: 11px;
  text-align: center;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

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

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

.start-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-color);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hover-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.power-btn {
  border: none;
  background: transparent;
  color: var(--text-color);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.power-btn:hover {
  background: var(--hover-bg);
}

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

#context-menu, #shortcut-context-menu {
  position: fixed;
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(25px);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 170px;
  z-index: 1000;
  display: none;
}

.context-item {
  padding: 8px 18px;
  font-size: 12px;
  color: var(--text-color);
  cursor: pointer;
  transition: background 0.15s;
}

.context-item:hover {
  background: var(--hover-bg);
}

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

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

.explorer-sidebar {
  width: 180px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

[data-theme="light"] .explorer-sidebar {
  border-right-color: rgba(0, 0, 0, 0.05);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-item:hover {
  background: var(--hover-bg);
}

.sidebar-item.active {
  background: rgba(0, 120, 215, 0.18);
  color: #00c6ff;
  font-weight: 500;
}

[data-theme="light"] .sidebar-item.active {
  color: #0072ff;
}

.explorer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.explorer-toolbar {
  height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
}

[data-theme="light"] .explorer-toolbar {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.toolbar-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-color);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

[data-theme="light"] .toolbar-btn {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(0, 0, 0, 0.08);
}

.toolbar-btn:hover {
  background: var(--hover-bg);
}

#exp-address-bar {
  flex: 1;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  color: var(--text-color);
  outline: none;
}

[data-theme="light"] #exp-address-bar {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 0, 0, 0.08);
}

.explorer-files-grid {
  flex: 1;
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 80px);
  grid-auto-rows: 85px;
  gap: 15px;
  align-content: start;
  overflow-y: auto;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s;
}

.file-item:hover {
  background: var(--hover-bg);
}

.file-item.selected {
  background: rgba(0, 120, 215, 0.2);
  border-color: rgba(0, 120, 215, 0.3);
}

.file-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

.file-name {
  font-size: 11px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-color);
}

.browser-tabbar {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 4px 8px 0 8px;
  height: 34px;
  box-sizing: border-box;
}
[data-theme="light"] .browser-tabbar {
  background: rgba(255,255,255,0.3);
  border-bottom-color: rgba(0,0,0,0.08);
}
.browser-tabs-container {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  overflow-x: auto;
  flex-grow: 1;
  height: 100%;
}
.browser-tab {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 4px 10px;
  color: var(--text-color);
  font-size: 11px;
  cursor: pointer;
  max-width: 140px;
  min-width: 90px;
  height: 30px;
  box-sizing: border-box;
  justify-content: space-between;
  transition: background 0.2s;
}
[data-theme="light"] .browser-tab {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.08);
}
.browser-tab.active {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
  font-weight: 500;
}
[data-theme="light"] .browser-tab.active {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.12);
}
.browser-tab span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  margin-right: 6px;
}
.browser-tab-close {
  font-size: 8px;
  opacity: 0.6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: background 0.2s;
}
.browser-tab-close:hover {
  background: rgba(255,255,255,0.2);
  opacity: 1;
}
[data-theme="light"] .browser-tab-close:hover {
  background: rgba(0,0,0,0.1);
}
.tab-add-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 16px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  margin-bottom: 2px;
  transition: background 0.2s;
}
.tab-add-btn:hover {
  background: rgba(255,255,255,0.1);
}
[data-theme="light"] .tab-add-btn:hover {
  background: rgba(0,0,0,0.05);
}
.browser-iframe-element {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.browser-container {
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  width: 100%;
  height: 100%;
}

[data-theme="light"] .browser-container {
  background: #f4f4f4;
}

.browser-toolbar {
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.15);
}

[data-theme="light"] .browser-toolbar {
  background: rgba(255,255,255,0.45);
  border-bottom-color: rgba(0,0,0,0.08);
}

.browser-toolbar .toolbar-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color);
  transition: background 0.15s;
}

.browser-toolbar .toolbar-btn:hover {
  background: var(--hover-bg);
}

#browser-go.toolbar-btn {
  width: auto;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--accent-color);
  color: white;
  border: none;
}

#browser-go.toolbar-btn:hover {
  background: #005a9e;
}

#browser-address {
  flex: 1;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0 14px;
  font-size: 13px;
  background: rgba(0,0,0,0.25);
  color: #fff;
  outline: none;
  transition: background 0.2s, border-color 0.2s;
}

#browser-address:focus {
  background: rgba(0,0,0,0.4);
  border-color: var(--accent-color);
}

[data-theme="light"] #browser-address {
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  border-color: rgba(0,0,0,0.1);
}

[data-theme="light"] #browser-address:focus {
  background: #fff;
  border-color: var(--accent-color);
}

.browser-content {
  flex: 1;
  position: relative;
  background: white;
  width: 100%;
}

#browser-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.notepad-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.notepad-menu {
  height: 32px;
  background: rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 4px;
}

[data-theme="light"] .notepad-menu {
  background: rgba(255,255,255,0.2);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.notepad-menu button {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-color);
  cursor: pointer;
  border-radius: 4px;
}

.notepad-menu button:hover {
  background: var(--hover-bg);
}

#notepad-textarea {
  flex: 1;
  border: none;
  resize: none;
  padding: 12px;
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  background: transparent;
  color: var(--text-color);
  outline: none;
}

.terminal-container {
  background: #0c0c0c !important;
  color: #0f0 !important;
  font-family: Consolas, Monaco, "Courier New", Courier, monospace;
  font-size: 13px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.terminal-input-line {
  display: flex;
  align-items: center;
}

.terminal-prompt {
  margin-right: 8px;
  color: #0f0;
}

#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #0f0;
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

.calculator-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 15px;
  gap: 15px;
}

#calc-display {
  width: 100%;
  height: 60px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  font-size: 28px;
  text-align: right;
  padding: 0 15px;
  color: var(--text-color);
  outline: none;
}

[data-theme="light"] #calc-display {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 0, 0, 0.08);
}

.calc-buttons {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calc-btn {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.15);
  font-size: 16px;
  color: var(--text-color);
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .calc-btn {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(0, 0, 0, 0.05);
}

.calc-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .calc-btn:hover {
  background: rgba(255, 255, 255, 0.6);
}

.calc-btn:active {
  transform: scale(0.95);
}

.calc-btn.op {
  background: rgba(0, 126, 229, 0.25);
  font-weight: 600;
  color: #00c6ff;
}

[data-theme="light"] .calc-btn.op {
  color: var(--accent-color);
}

.calc-btn.op:hover {
  background: rgba(0, 126, 229, 0.35);
}

.calc-btn.eq {
  background: var(--accent-color);
  color: white;
}

.calc-btn.eq:hover {
  background: #005a9e;
}

.games-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 15px;
}

.games-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.game-select-btn {
  width: 200px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--win-border);
  background: rgba(255,255,255,0.15);
  color: var(--text-color);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.game-select-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.25);
}

.game-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.game-toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 13px;
}

.game-toolbar button {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.15);
  color: var(--text-color);
  cursor: pointer;
}

.minesweeper-grid {
  display: grid;
  border: 2px solid rgba(0, 0, 0, 0.2);
  background: #ccc;
  padding: 4px;
  gap: 2px;
}

.mines-cell {
  width: 28px;
  height: 28px;
  background: #ddd;
  border: 2px solid;
  border-color: #fff #999 #999 #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  color: #111;
}

.mines-cell.revealed {
  background: #bbb;
  border: 1px solid #999;
}

.mines-cell.flagged::before {
  content: '🚩';
}

#snake-canvas {
  background: #222;
  border: 4px solid var(--win-border);
  border-radius: 8px;
}

.settings-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-section h3 {
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 6px;
}

[data-theme="light"] .settings-section h3 {
  border-bottom-color: rgba(0,0,0,0.05);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.wallpaper-options {
  display: flex;
  gap: 8px;
}

.wallpaper-opt {
  width: 60px;
  height: 40px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 10px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  font-weight: 500;
}

.wallpaper-opt.active {
  border-color: var(--accent-color);
}

#theme-toggle-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.15);
  color: var(--text-color);
  cursor: pointer;
}

#theme-toggle-btn:hover {
  background: var(--hover-bg);
}

#shutdown-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
}

.shutdown-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.shutdown-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.resize-handle {
  position: absolute;
  z-index: 9999;
}
.resize-handle.n { top: 0; left: 0; right: 0; height: 5px; cursor: n-resize; }
.resize-handle.s { bottom: 0; left: 0; right: 0; height: 5px; cursor: s-resize; }
.resize-handle.e { top: 0; bottom: 0; right: 0; width: 5px; cursor: e-resize; }
.resize-handle.w { top: 0; bottom: 0; left: 0; width: 5px; cursor: w-resize; }
.resize-handle.nw { top: 0; left: 0; width: 8px; height: 8px; cursor: nw-resize; }
.resize-handle.ne { top: 0; right: 0; width: 8px; height: 8px; cursor: ne-resize; }
.resize-handle.sw { bottom: 0; left: 0; width: 8px; height: 8px; cursor: sw-resize; }
.resize-handle.se { bottom: 0; right: 0; width: 8px; height: 8px; cursor: se-resize; }

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Glass Panels */
.glass-panel {
  position: fixed;
  border-radius: 12px;
  background: var(--start-bg);
  border: 1px solid var(--taskbar-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(180%);
  color: var(--text-color);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s, visibility 0.25s;
  z-index: 99;
}
.glass-panel.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}

/* Action Center */
#action-center {
  bottom: 58px;
  right: 15px;
  width: 360px;
  padding: 20px;
  transform: translateY(50px);
}
.ac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.ac-tile {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  color: var(--text-color);
}
.ac-tile:hover {
  background: rgba(255, 255, 255, 0.15);
}
.ac-tile.active {
  background: var(--accent-color);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}
.ac-tile-icon {
  font-size: 20px;
}
.ac-tile-info {
  display: flex;
  flex-direction: column;
}
.ac-tile-title {
  font-size: 12px;
  font-weight: 600;
}
.ac-tile-sub {
  font-size: 10px;
  opacity: 0.8;
}
.ac-sliders {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.ac-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ac-slider-icon {
  font-size: 16px;
  width: 20px;
  color: var(--text-color);
}
.ac-range {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.ac-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.ac-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-color);
}
.ac-footer-battery {
  font-size: 11px;
  opacity: 0.8;
}
.ac-color-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}
.color-opt {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s;
}
.color-opt:hover {
  transform: scale(1.15);
}
.color-opt.active {
  border-color: #fff;
  box-shadow: 0 0 8px var(--accent-color);
}
.color-blue { background: #0078d7; }
.color-green { background: #0f9d58; }
.color-red { background: #db4437; }
.color-purple { background: #673ab7; }
.color-orange { background: #f5af19; }

/* Calendar Panel */
#calendar-panel {
  bottom: 58px;
  right: 15px;
  width: 320px;
  padding: 16px;
  transform: translateY(50px);
}
.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-color);
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  opacity: 0.7;
  margin-bottom: 8px;
  color: var(--text-color);
}
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day-cell {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text-color);
}
.cal-day-cell:hover {
  background: var(--hover-bg);
}
.cal-day-cell.today {
  background: var(--accent-color);
  color: white;
  font-weight: bold;
}
.cal-day-cell.other-month {
  opacity: 0.35;
}

/* Task Manager */
.taskmanager-container {
  display: flex;
  width: 100%;
  height: 100%;
}
.taskmanager-sidebar {
  width: 160px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
[data-theme="light"] .taskmanager-sidebar {
  border-right-color: rgba(0, 0, 0, 0.05);
}
.tm-tab {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text-color);
}
.tm-tab:hover {
  background: var(--hover-bg);
}
.tm-tab.active {
  background: var(--accent-color);
  color: white;
  font-weight: 500;
}
.taskmanager-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}
.tm-tab-content {
  display: none;
}
.tm-tab-content.active {
  display: block;
}
.perf-metric {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-color);
}
.perf-header {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.perf-metric canvas {
  width: 100%;
  height: 80px;
  display: block;
}
.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--text-color);
}
.tm-table th, .tm-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .tm-table th, [data-theme="light"] .tm-table td {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}
.tm-kill-btn {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 0, 0, 0.15);
  color: #ff4a4a;
  cursor: pointer;
  font-size: 10px;
  transition: background 0.15s;
}
.tm-kill-btn:hover {
  background: rgba(255, 0, 0, 0.35);
  color: white;
}

/* Weather */
.weather-container {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 20px;
  width: 100%;
  height: 100%;
  color: var(--text-color);
}
.weather-main {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.weather-temp-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.weather-main-icon {
  font-size: 48px;
}
.weather-main-temp {
  font-size: 40px;
  font-weight: 300;
}
.weather-info-block {
  display: flex;
  flex-direction: column;
}
.weather-city {
  font-size: 18px;
  font-weight: 600;
}
.weather-desc {
  font-size: 13px;
  opacity: 0.8;
  margin: 2px 0;
}
.weather-wind {
  font-size: 11px;
  opacity: 0.6;
}
.weather-forecast {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.forecast-item {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  gap: 4px;
  color: var(--text-color);
}
.forecast-day {
  font-weight: 600;
  opacity: 0.8;
}
.forecast-icon {
  font-size: 18px;
}
.forecast-temp {
  font-weight: bold;
}

/* Recommended Pinned / Start list */
.start-recommended-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.start-rec-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.start-rec-item:hover {
  background: var(--hover-bg);
}
.rec-icon {
  font-size: 20px;
}
.rec-details {
  display: flex;
  flex-direction: column;
}
.rec-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-color);
}
.rec-desc {
  font-size: 10px;
  opacity: 0.6;
  color: var(--text-color);
}

.file-item.drag-over {
  background: rgba(0, 120, 215, 0.25);
  border: 1px dashed var(--accent-color, #0078d7);
}
