* {
  box-sizing: border-box;
}

:root {
  --taskbar-height: 36px;
  --window-topbar-height: 26px;
  --window-side-width: 7px;

  --start-button-width: 120px;
  --close-button-size: 30px;

  --icon-size: 72px;
}

/* базовая сцена */

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

.desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
}

/* wallpaper */

.wallpaper {
  position: absolute;
  inset: 0;
  z-index: 1;

  background-image: url("wallpaper.png");
  background-size: cover;
  background-position: center;
}

/* desktop icons */

.desktop-icons {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.desktop-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  border: none;
  background: transparent;
  cursor: pointer;

  pointer-events: auto;
}

.desktop-icon img {
  width: var(--icon-size);
}

.desktop-icon span {
  color: white;
  font-weight: bold;
  text-shadow: 0 0 6px black;
}

#filesIcon {
  top: 60%;
  left: 48%;
  transform: translate(-50%, -50%);
}

#radioIcon {
  top: 64%;
  left: 72%;
  transform: translate(-50%, -50%);
}

/* window */

.window {
  position: absolute;
  inset: 0;
  z-index: 20;
}

.window.hidden {
  display: none;
}

.window-frame {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--taskbar-height);
}

/* top bar */

.window-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: var(--window-topbar-height);

  background: linear-gradient(
    to bottom,
    #bcd8ff 0%,
    #4f86e8 35%,
    #174de1 70%,
    #0e2f8e 100%
  );

  z-index: 30;
}

/* close button */

.window-close-button {
  position: absolute;
  right: 2px;
  top: 55%;
  transform: translateY(-50%);

  width: var(--close-button-size);
  height: var(--close-button-size);

  border: none;
  background: transparent;
  cursor: pointer;
}

.window-close-button img {
  width: 115%;
filter: blur(0.3px);
}

/* side borders */

.window-side {
  position: absolute;
  top: var(--window-topbar-height);
  bottom: 0;
  width: var(--window-side-width);
}

.window-side-left {
  left: 0;

  background: linear-gradient(
    to bottom,
    #0b2f8d,
    #174de1 30%,
    #4f86e8 50%,
    #174de1 70%,
    #0b2f8d
  );
}

.window-side-right {
  right: 0;

  background: linear-gradient(
    to bottom,
    #0b2f8d,
    #174de1 30%,
    #4f86e8 50%,
    #174de1 70%,
    #0b2f8d
  );
}

/* content */

.window-content {
  position: absolute;

  top: var(--window-topbar-height);
  left: var(--window-side-width);
  right: var(--window-side-width);
  bottom: 8px;

  overflow: hidden;
  background: #f4efe4
}

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

/* taskbar */

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: var(--taskbar-height);

  background: linear-gradient(
    to bottom,
    #8fbfff,
    #4b7fd8,
    #1e56b0
  );

  border-top: 1px solid rgba(255,255,255,0.4);

  z-index: 40;
}

/* start button */

.start-button {
  position: absolute;
  left: -10px;
  top: 53%;
  transform: translateY(-50%);

  width: var(--start-button-width);

  border: none;
  background: transparent;
  cursor: pointer;
}

.start-button img {
  width: 110%;
}

.window-bottom {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 8px;

  background: linear-gradient(
    to top,
    #2f66ef,
    #174de1,
    #0b2f8d
  );

  
}

.taskbar-right {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);

  display: flex;
  align-items: center;
  gap: 14px;

  z-index: 42;
}

.language-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.language-button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  filter: blur(0.1px);
}

.language-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);

  min-width: 62px;
  padding: 4px;

  background: linear-gradient(
    to bottom,
    #f4f8ff,
    #d9e8ff
  );

  border: 1px solid #3c69b7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);

  display: flex;
  flex-direction: column;
  gap: 2px;

  z-index: 100;
}

.language-menu.hidden {
  display: none;
}

.language-option {
  border: 1px solid transparent;
  background: transparent;
  color: #173a7a;
  font-size: 12px;
  text-align: left;
  padding: 5px 8px;
  cursor: pointer;
}

.language-option:hover {
  background: #2b65d9;
  color: white;
  border-color: #1747aa;
}

.taskbar-time {
  min-width: 44px;
  color: #eaf4ff;
  font-size: 13px;
  line-height: 1;
  text-align: right;

  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.18),
    0 0 4px rgba(140, 190, 255, 0.18);

	filter: blur(0.6px);
}

.start-menu {
  position: absolute;
  left: 0;
  bottom: var(--taskbar-height);
  z-index: 60;

  width: 380px;
  height: auto;
}

.start-menu.hidden {
  display: none;
}

.start-menu-image {
  width: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* кликабельные ссылки поверх картинки */
.start-link {
  position: absolute;
  left: 14px;

  display: flex;
  align-items: center;
  gap: 12px;

  color: #222;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.start-link img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

/* позиции ссылок */
.start-link-soundcloud {
  top: 82px;
}

.start-link-telegram {
  top: 127px;
}

.start-link-instagram {
  top: 172px;
}

.start-link-vk {
  top: 217px;
}

/* reboot-кнопка */
.start-reboot {
  position: absolute;
  right: 45px;
  bottom: 8px;

  border: 0;
  background: transparent;
  color: #e8eefc;
  font-size: 14px;
  cursor: pointer;
}
/* boot screen */

.boot-screen {
  position: fixed;
  inset: 0;

  background: black;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;

  opacity: 1;
  transition: opacity 1s steps(7, end);
}

.boot-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.boot-gif {
  width: 100vw;
  height: 100vh;
  object-fit: cover;

  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 768px) {
  :root {
    --mobile-safe-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }

  html,
  body {
    height: 100%;
    min-height: 100svh;
  }

  .desktop {
    height: 100dvh;
    min-height: 100svh;
  }

  .taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 80;
  }

  .start-menu {
    position: fixed;
    left: 0;
    bottom: calc(var(--taskbar-height) - 1px);
    transform: scale(0.78);
    transform-origin: left bottom;
    z-index: 81;
  }

  .window-frame {
    bottom: calc(var(--taskbar-height) - 1px);
  }
}