:root {
  --menu-height: 36px;
  --dock-height: 102px;
  --text: #111318;
  --glass: rgba(248, 250, 255, 0.56);
  --glass-border: rgba(255, 255, 255, 0.52);
  --window-shadow: 0 22px 70px rgba(13, 18, 40, 0.35);
  --window-radius: 16px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Manrope", "Avenir Next", "Helvetica Neue", sans-serif;
  color: var(--text);
  overflow: hidden;
  background: radial-gradient(circle at 16% 20%, #5e80ff, #213a8f 38%, #11182d 100%);
}

.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.8;
  mix-blend-mode: screen;
  animation: drift 14s infinite alternate var(--ease-out);
}

.aurora-1 {
  width: 420px;
  height: 420px;
  left: -120px;
  top: 10%;
  background: #84f5ff;
}

.aurora-2 {
  width: 460px;
  height: 460px;
  right: -90px;
  top: -30px;
  background: #ffa4be;
  animation-delay: 0.4s;
}

.aurora-3 {
  width: 540px;
  height: 540px;
  right: 26%;
  bottom: -230px;
  background: #9cd9ff;
  animation-delay: 1.2s;
}

.os-shell {
  position: relative;
  height: 100%;
}

.menu-bar {
  position: fixed;
  top: 8px;
  left: 10px;
  right: 10px;
  height: var(--menu-height);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(250, 252, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(20px) saturate(160%);
}

.menu-left,
.menu-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-btn {
  border: 0;
  background: transparent;
  color: #f6f8ff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.menu-item,
.status-pill,
.menu-clock {
  font-size: 13px;
  color: #eef2ff;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(11, 14, 28, 0.45);
}

.menu-item.active {
  font-weight: 700;
}

.status-pill {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 2px 8px;
}

.desktop {
  position: relative;
  height: 100%;
  padding: calc(var(--menu-height) + 22px) 18px calc(var(--dock-height) + 24px);
}

.desktop-icon {
  position: absolute;
  width: 84px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #f2f5ff;
  text-shadow: 0 1px 10px rgba(5, 6, 12, 0.7);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 6px;
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.17);
  transform: translateY(-2px);
}

.desktop-glyph {
  font-size: 34px;
}

.images-glyph {
  text-shadow: none;
}

.youtube-glyph {
  display: inline-grid;
  place-items: center;
  color: #fff;
  text-shadow: none;
  font-weight: 800;
  background: linear-gradient(160deg, #ff5959, #e00f2a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 6px 14px rgba(154, 16, 33, 0.36);
}

.desktop-glyph.youtube-glyph {
  width: 44px;
  height: 31px;
  border-radius: 9px;
  font-size: 17px;
  padding-left: 2px;
}

.desktop-glyph.images-glyph {
  font-size: 36px;
  filter: drop-shadow(0 6px 8px rgba(8, 20, 44, 0.32));
}

.window {
  position: absolute;
  width: min(700px, 76vw);
  min-width: 320px;
  min-height: 220px;
  height: min(460px, 62vh);
  max-height: calc(100vh - var(--menu-height) - 20px);
  border-radius: var(--window-radius);
  border: 1px solid var(--glass-border);
  background: linear-gradient(
    170deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(236, 244, 255, 0.58) 100%
  );
  box-shadow: var(--window-shadow);
  backdrop-filter: blur(30px) saturate(145%);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.26s var(--ease-out), transform 0.26s var(--ease-out), box-shadow 0.2s ease;
}

.window.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.window.is-focused {
  box-shadow: 0 26px 80px rgba(8, 11, 24, 0.48);
}

.window.is-fullscreen {
  left: 8px !important;
  top: calc(var(--menu-height) + 14px) !important;
  width: calc(100% - 16px) !important;
  height: calc(100% - var(--menu-height) - var(--dock-height) - 30px) !important;
}

.window-resize-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 5;
  border-radius: 0 0 13px 0;
  background:
    linear-gradient(135deg, transparent 0 49%, rgba(70, 93, 141, 0.22) 50% 58%, transparent 59% 100%),
    linear-gradient(135deg, transparent 0 64%, rgba(70, 93, 141, 0.36) 65% 73%, transparent 74% 100%);
}

.window.is-fullscreen .window-resize-handle {
  display: none;
}

.window-titlebar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(204, 216, 238, 0.7);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.73), rgba(243, 248, 255, 0.5));
}

.window-title {
  font-size: 13px;
  font-weight: 700;
  color: #29324a;
  margin-left: auto;
  margin-right: auto;
  transform: translateX(-34px);
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.traffic {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.traffic:hover {
  transform: scale(1.08);
}

.traffic.close {
  background: #ff5f57;
}

.traffic.minimize {
  background: #febc2e;
}

.traffic.zoom {
  background: #28c840;
}

.window-content {
  height: calc(100% - 44px);
  padding: 18px;
  overflow: auto;
}

.finder-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 14px;
}

.finder-sidebar {
  background: rgba(236, 243, 252, 0.85);
  border-radius: 12px;
  padding: 16px;
}

.finder-sidebar h4 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f6c89;
}

.finder-item {
  margin: 0;
  padding: 6px 8px;
  border-radius: 7px;
  color: #33415f;
  font-weight: 600;
  font-size: 13px;
}

.finder-nav-btn {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.finder-item.active {
  background: rgba(57, 122, 255, 0.2);
}

.finder-files {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
}

.file-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(211, 220, 236, 0.85);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #34425f;
}

button.file-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.file-card.folder-shortcut {
  background: linear-gradient(150deg, rgba(229, 240, 255, 0.9), rgba(207, 224, 255, 0.82));
}

.file-icon {
  font-size: 19px;
}

.safari-layout {
  display: grid;
  gap: 16px;
}

.safari-bar {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(235, 243, 255, 0.82);
  border: 1px solid rgba(196, 208, 230, 0.8);
  color: #576580;
  font-size: 13px;
  font-weight: 600;
}

.safari-hero {
  border-radius: 14px;
  padding: 28px;
  min-height: 210px;
  background: linear-gradient(140deg, #ffffff 0%, #dbe8ff 70%, #b8d6ff 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 10px;
}

.safari-hero h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
}

.safari-hero p {
  margin: 0;
  max-width: 48ch;
  color: #45526f;
  font-weight: 600;
}

.cta-btn {
  justify-self: start;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(130deg, #2d6fff, #4d93ff);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 22px rgba(41, 102, 235, 0.4);
}

.notebook-window {
  width: min(640px, 75vw);
  height: min(460px, 60vh);
}

.notebook-layout {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.notebook-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notebook-chip {
  justify-self: start;
}

.notebook-status {
  font-size: 12px;
  font-weight: 700;
  color: #4b5a78;
}

.notebook-pad {
  width: 100%;
  height: 100%;
  min-height: 180px;
  resize: none;
  border: 1px solid rgba(193, 205, 229, 0.85);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  padding: 15px 16px;
  outline: 0;
  font: 600 15px/1.55 "SF Mono", "Menlo", "Monaco", monospace;
  color: #273354;
}

.notebook-pad:focus {
  border-color: rgba(60, 124, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(65, 132, 255, 0.16);
}

.calculator-window {
  width: min(340px, 92vw);
  height: min(520px, 72vh);
}

.calculator-layout {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.calc-display {
  width: 100%;
  border: 1px solid rgba(191, 205, 233, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: #293655;
  font-size: 34px;
  font-weight: 700;
  text-align: right;
  padding: 14px 12px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.calc-btn {
  border: 1px solid rgba(185, 201, 231, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  min-height: 54px;
  font-size: 20px;
  font-weight: 700;
  color: #2f3c5b;
  cursor: pointer;
}

.calc-btn.operator {
  background: linear-gradient(140deg, #4f92ff, #2e73ff);
  color: #fff;
  border-color: rgba(42, 106, 242, 0.85);
}

.calc-btn.utility {
  background: rgba(226, 237, 255, 0.86);
  color: #40517c;
  font-size: 15px;
}

.calc-btn.span-2 {
  grid-column: span 2;
}

.paint-window {
  width: min(760px, 82vw);
  height: min(540px, 70vh);
}

.paint-layout {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  overflow: hidden;
}

.paint-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.paint-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #48567a;
  background: rgba(232, 241, 255, 0.72);
  border: 1px solid rgba(190, 205, 231, 0.75);
  border-radius: 999px;
  padding: 5px 10px;
}

.paint-control input[type="range"] {
  width: 100px;
}

.paint-btn {
  border: 1px solid rgba(185, 200, 231, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.87);
  color: #2f4168;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.paint-btn.is-active {
  background: linear-gradient(145deg, #4f92ff, #2e73ff);
  border-color: rgba(47, 103, 235, 0.85);
  color: #fff;
}

.paint-danger {
  background: rgba(255, 239, 240, 0.92);
  border-color: rgba(238, 183, 189, 0.95);
  color: #9d3645;
}

#paintCanvas {
  width: 100%;
  height: 100%;
  min-height: 240px;
  border-radius: 14px;
  border: 1px solid rgba(199, 211, 235, 0.9);
  background: #fff;
  touch-action: none;
}

.youtube-window {
  min-width: 460px;
  min-height: 310px;
  width: min(940px, 88vw);
  height: min(610px, 78vh);
}

.youtube-layout {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.youtube-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.youtube-chip {
  background: rgba(255, 65, 83, 0.15);
  color: #b01c34;
  border-color: rgba(197, 34, 54, 0.25);
}

.youtube-status {
  font-size: 12px;
  font-weight: 700;
  color: #4f5e80;
}

.youtube-status.is-playing {
  color: #1e8945;
}

.youtube-player-shell {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(160deg, #252c44, #0f1324 70%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.youtube-frame-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.youtube-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.youtube-note {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(238, 244, 255, 0.8);
}

.images-window {
  min-width: 520px;
  min-height: 360px;
  width: min(940px, 88vw);
  height: min(600px, 76vh);
}

.images-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  min-height: 0;
}

.images-sidebar {
  border-radius: 12px;
  background: rgba(236, 243, 252, 0.85);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.images-sidebar h4 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f6c89;
}

.images-folder-list {
  display: grid;
  gap: 8px;
}

.images-folder-btn {
  border: 1px solid rgba(191, 206, 236, 0.8);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #34425f;
  text-align: left;
  cursor: pointer;
}

.images-folder-btn.is-active {
  background: rgba(72, 128, 255, 0.22);
  border-color: rgba(67, 116, 217, 0.55);
}

.images-folder-icon {
  font-size: 15px;
}

.images-folder-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.images-folder-count {
  color: #586887;
  font-size: 11px;
}

.images-main {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.images-toolbar {
  border-radius: 12px;
  border: 1px solid rgba(191, 206, 236, 0.8);
  background: rgba(239, 246, 255, 0.75);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.images-path-wrap,
.images-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.images-chip {
  background: rgba(77, 129, 255, 0.18);
  border-color: rgba(70, 114, 206, 0.24);
}

.images-path-label {
  font-size: 12px;
  font-weight: 700;
  color: #45557b;
}

.images-refresh {
  border: 1px solid rgba(174, 196, 232, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2f3f67;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.images-status {
  font-size: 12px;
  font-weight: 700;
  color: #4f5f81;
}

.images-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 2px;
}

.images-empty {
  margin: 0;
  border-radius: 12px;
  background: rgba(232, 241, 255, 0.8);
  border: 1px solid rgba(195, 210, 236, 0.78);
  color: #4c5e83;
  font-size: 12px;
  font-weight: 700;
  padding: 12px;
}

.image-thumb {
  border: 1px solid rgba(193, 206, 235, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 8px;
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.image-thumb:hover {
  border-color: rgba(97, 148, 255, 0.9);
  box-shadow: 0 9px 18px rgba(44, 75, 136, 0.2);
}

.image-thumb-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(130deg, #d7e5fd, #e8effc);
}

.image-thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: rgba(245, 250, 255, 0.94);
  display: block;
}

.image-thumb-title {
  font-size: 12px;
  font-weight: 700;
  color: #31415f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-window {
  min-width: 360px;
  min-height: 260px;
  width: min(760px, 82vw);
  height: min(560px, 72vh);
}

.preview-layout {
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
}

.preview-stage {
  min-height: 0;
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(25, 34, 57, 0.25);
  background: linear-gradient(155deg, #1a2135, #0f1526 72%);
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 10px;
}

.preview-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.preview-image.is-hidden {
  display: none;
}

.preview-empty {
  margin: 0;
  color: rgba(241, 246, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
}

.preview-empty.is-hidden {
  display: none;
}

.preview-meta {
  display: grid;
  gap: 4px;
}

.preview-name,
.preview-path {
  margin: 0;
}

.preview-name {
  font-size: 14px;
  font-weight: 700;
  color: #2a3957;
}

.preview-path {
  font-size: 12px;
  font-weight: 600;
  color: #58698d;
}

.about-window {
  width: min(380px, 88vw);
  height: 260px;
}

.about-layout {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.about-layout h3 {
  margin: 0;
}

.about-layout p {
  margin: 0;
  color: #45506b;
}

.chip {
  background: rgba(48, 110, 252, 0.15);
  color: #2752b4;
  border: 1px solid rgba(66, 116, 216, 0.2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.launchpad {
  position: absolute;
  inset: 0;
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(32, 42, 76, 0.84), rgba(23, 30, 51, 0.82));
  backdrop-filter: blur(26px);
  transition: opacity 0.26s var(--ease-out);
  display: grid;
  place-items: center;
}

.launchpad.is-open {
  opacity: 1;
  pointer-events: auto;
}

.launchpad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 18px;
}

.launchpad-app {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #f4f6ff;
  padding: 24px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.launchpad-app:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.22);
}

.dock-wrap {
  position: fixed;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.dock {
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 21px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(250, 252, 255, 0.25);
  box-shadow: 0 16px 36px rgba(3, 8, 24, 0.3);
  backdrop-filter: blur(25px) saturate(155%);
}

.dock-divider {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.5);
  margin: 0 4px;
}

.dock-item {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(227, 236, 255, 0.8));
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transform-origin: bottom center;
  transition: transform 0.15s linear, box-shadow 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 8px 18px rgba(27, 41, 72, 0.28);
}

.dock-item:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 14px 22px rgba(12, 20, 38, 0.32);
}

.dock-item::after {
  content: "";
  position: absolute;
  bottom: -11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f8fbff;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.dock-item[data-active="true"]::after {
  opacity: 1;
}

.dock-item.bounce {
  animation: bounce 0.5s ease;
}

.dock-glyph {
  font-size: 29px;
  line-height: 1;
}

.dock-glyph.images-glyph {
  font-size: 30px;
}

.dock-glyph.youtube-glyph {
  width: 36px;
  height: 25px;
  border-radius: 8px;
  font-size: 14px;
  padding-left: 2px;
}

@keyframes bounce {
  0% {
    transform: translateY(0) scale(1);
  }
  32% {
    transform: translateY(-18px) scale(1.08);
  }
  65% {
    transform: translateY(0) scale(0.98);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(36px, -24px) scale(1.08);
  }
}

@media (max-width: 980px) {
  .menu-left .menu-item:nth-child(n + 5) {
    display: none;
  }

  .window {
    width: min(92vw, 680px);
    height: min(64vh, 500px);
  }

  .finder-layout {
    grid-template-columns: 1fr;
  }

  .finder-sidebar {
    display: none;
  }

  .images-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .images-folder-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .launchpad-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 860px) {
  .desktop {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 8px;
    align-content: start;
  }

  .desktop-icon {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100%;
    max-width: 84px;
    justify-self: center;
  }

  .dock-wrap {
    overflow-x: auto;
    padding: 0 8px;
  }

  .dock {
    min-width: max-content;
  }
}

@media (max-width: 700px) {
  .menu-left .menu-item,
  .status-pill {
    display: none;
  }

  .menu-right {
    gap: 8px;
  }

  .desktop {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    align-content: start;
    padding-left: 10px;
    padding-right: 10px;
  }

  .desktop-icon {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 72px;
    font-size: 11px;
  }

  .desktop-glyph {
    font-size: 30px;
  }

  .window {
    min-width: 0;
    width: calc(100% - 12px);
    min-height: 0;
    left: 6px !important;
    top: calc(var(--menu-height) + 18px) !important;
    height: calc(100% - var(--menu-height) - var(--dock-height) - 42px);
  }

  .window-title {
    transform: none;
    margin-right: 0;
  }

  .window-resize-handle {
    display: none;
  }

  .about-window {
    height: 230px;
  }

  .notebook-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .calc-display {
    font-size: 30px;
  }

  .calc-btn {
    min-height: 48px;
    font-size: 18px;
  }

  .paint-toolbar {
    gap: 8px;
  }

  .images-sidebar {
    padding: 10px;
  }

  .images-folder-list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .images-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .preview-window {
    height: calc(100% - var(--menu-height) - var(--dock-height) - 42px);
  }

  .preview-name {
    font-size: 13px;
  }

  .youtube-note {
    font-size: 11px;
  }

  .dock {
    gap: 8px;
    padding: 10px;
    min-width: max-content;
  }

  .dock-item {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .dock-glyph {
    font-size: 24px;
  }
}
