
:root {
  --accent: #6688ff;
  --desktop-text: #fff;
  --desktop-muted: rgba(255,255,255,.68);
  --panel: rgba(25,26,31,.84);
  --panel-solid: #202127;
  --panel-border: rgba(255,255,255,.12);
  --taskbar-height: 50px;
  --radius: 14px;
  --shadow: 0 18px 55px rgba(0,0,0,.3);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #101114;
  color: var(--desktop-text);
  user-select: none;
}

button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.desktop {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  overflow: hidden;
  isolation: isolate;
  background: #101114;
}

.wallpaper {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(135deg, rgba(12,15,28,.25), rgba(0,0,0,.1)),
    url("/assets/graphics/wallpapers/default.jpg") center / cover no-repeat,
    linear-gradient(135deg, #17243c, #101114 70%);
  transition: background-image .3s ease;
}

.desktop-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: rgba(0,0,0,.05);
}

.desktop-layer {
  position: absolute;
  inset: 0;
  display: none;
}

html[data-os="windows"] .windows-layer,
html[data-os="macos"] .macos-layer,
html[data-os="chrome"] .chrome-layer {
  display: block;
}

.desktop-shortcuts, .mac-shortcuts, .chrome-shortcuts {
  position: absolute;
  top: 20px;
  left: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.desktop-icon {
  width: 84px;
  min-height: 88px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}

.desktop-icon:hover, .desktop-icon.selected {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.2);
}

.desktop-icon i { font-size: 34px; }
.desktop-icon span { font-size: 12px; text-align: center; }

.floating-panel {
  display: none;
  position: absolute;
  z-index: 50;
  color: var(--desktop-text);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.floating-panel.open { display: block; }

.floating-panel button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 12px;
}

.floating-panel button:hover { background: rgba(255,255,255,.1); }

button i { pointer-events: none; }

.toast-container {
  position: absolute;
  z-index: 200;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  width: min(330px, calc(100vw - 36px));
  padding: 13px 16px;
  background: var(--panel-solid);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: toast-in .2s ease;
}

.toast strong { display: block; margin-bottom: 4px; }
.toast span { color: var(--desktop-muted); font-size: 13px; }

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

[hidden] { display: none !important; }

html[data-theme="light"] {
  --desktop-text: #202127;
  --desktop-muted: rgba(0,0,0,.6);
  --panel: rgba(245,246,250,.88);
  --panel-solid: #f4f5f8;
  --panel-border: rgba(0,0,0,.12);
}

html[data-theme="light"] .floating-panel {
  color: #202127;
}

html[data-theme="light"] .floating-panel button:hover {
  background: rgba(0,0,0,.07);
}

html[data-theme="light"] .desktop-context,
html[data-theme="light"] .power-menu {
  background: rgba(250,250,252,.96);
}

html[data-reduced-transparency="true"] .floating-panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--panel-solid);
}

/* Shared system panels */

.quick-top, .panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.quick-top strong, .panel-heading strong {
  font-size: 15px;
}

.quick-toggles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-bottom: 18px;
}

.quick-toggle {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  background: rgba(128,128,128,.13) !important;
  border: 1px solid var(--panel-border) !important;
  font-size: 12px;
}

.quick-toggle i { font-size: 19px; }

.quick-toggle.active {
  background: var(--accent) !important;
  color: white;
}

.quick-slider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px 0;
}

.quick-slider i { font-size: 18px; }

.quick-slider input {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}

.quick-settings-link {
  width: 100%;
  margin-top: 8px;
  text-align: left;
  background: rgba(128,128,128,.1) !important;
}

.panel-heading button {
  font-size: 11px;
  color: var(--accent);
}

.notification-empty {
  min-height: 185px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  text-align: center;
}

.notification-empty i {
  font-size: 36px;
  opacity: .55;
}

.notification-empty strong { font-size: 13px; }
.notification-empty span {
  font-size: 12px;
  color: var(--desktop-muted);
}

.desktop-context, .power-menu {
  min-width: 190px;
  padding: 6px;
}

.desktop-context button, .power-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-size: 12px;
}

.desktop-context i, .power-menu i { font-size: 16px; }

.desktop-context {
  position: absolute;
  z-index: 100;
}

.power-menu {
  position: absolute;
  z-index: 90;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
}

html[data-os="macos"] .power-menu {
  top: 35px;
  bottom: auto;
  left: 8px;
  transform: none;
}

html[data-os="chrome"] .power-menu {
  bottom: 65px;
}

@media (max-width: 500px) {
  .quick-settings, .notification-panel {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
}
