/* =========================================
   WINDOWS 7 / NEOCITIES DESKTOP
   ========================================= */

:root {
  --taskbar-height: 46px;
  --desktop-text-shadow:
    0 1px 2px rgba(0, 0, 0, .95),
    0 0 5px rgba(0, 0, 0, .65);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 12px;

  /*
    TROQUE O WALLPAPER:
    background-image: url("images/wallpaper.jpg");
  */
  background:
    radial-gradient(circle at 66% 25%, rgba(255,255,255,.26), transparent 26%),
    linear-gradient(135deg, #285a96 0%, #55a5d6 46%, #76c2dd 66%, #427bbb 100%);

  background-attachment: fixed;
  background-size: cover;
  overflow: hidden;
}

/* ---------- DESKTOP ---------- */

.desktop {
  position: relative;
  width: 100vw;
  height: calc(100vh - var(--taskbar-height));
  overflow: hidden;
}

/* ---------- DESKTOP ICONS ---------- */

.desktop-icon {
  position: absolute;
  z-index: 3;

  width: 86px;
  min-height: 78px;
  padding: 5px 4px;

  border: 1px solid transparent;
  border-radius: 3px;

  background: transparent;
  box-shadow: none;

  color: white;
  font-family: "Segoe UI", sans-serif;
  font-size: 12px;
  text-align: center;
  text-shadow: var(--desktop-text-shadow);

  cursor: default;
}

.desktop-icon:hover {
  border-color: rgba(255,255,255,.34);
  background: rgba(130, 195, 255, .20);
}

.desktop-icon:focus {
  outline: 1px dotted rgba(255,255,255,.85);
  outline-offset: -4px;
}

.desktop-icon .icon-picture {
  display: block;
  height: 48px;
  margin-bottom: 4px;

  font-size: 38px;
  line-height: 48px;

  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}

.desktop-icon-img {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 4px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}

.desktop-icon span:last-child {
  display: block;
}

/* ---------- WINDOWS ---------- */

.draggable-window {
  position: absolute;
  z-index: 20;

  max-width: min(94vw, 760px);

  filter: drop-shadow(0 8px 13px rgba(0,0,0,.38));
}

.draggable-window .title-bar {
  user-select: none;
}

.draggable-window:not(.maximized) .title-bar {
  cursor: default;
}

.draggable-window.active {
  z-index: 100;
}

.hidden-window {
  display: none !important;
}

.window-body {
  max-height: min(65vh, 580px);
  overflow: auto;
}

.window-body h1,
.window-body h2,
.window-body h3 {
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-weight: 400;
}

.window-body h1 {
  margin: 0 0 8px;
  font-size: 25px;
}

.window-body h2 {
  margin-top: 0;
}

/* ---------- MAXIMIZED ---------- */

.draggable-window.maximized {
  position: fixed !important;

  top: 0 !important;
  left: 0 !important;

  width: 100vw !important;
  max-width: none !important;
  height: calc(100vh - var(--taskbar-height)) !important;

  margin: 0;
}

.draggable-window.maximized .window-body {
  height: calc(100% - 30px);
  max-height: none;
}

/* ---------- WELCOME ---------- */

.welcome-grid {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 18px;
  align-items: center;

  margin-bottom: 15px;
}

.avatar-box {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-box img {
  display: block;
  width: 100px;
  height: 100px;

  border: 1px solid #777;
  object-fit: cover;

  box-shadow:
    0 0 0 3px white,
    0 0 0 4px #aaa;
}

.avatar-placeholder {
  display: grid;
  place-items: center;

  width: 100px;
  height: 100px;

  border: 1px solid #8a8a8a;

  background:
    linear-gradient(135deg, #a9dfff, #d2f4ff 52%, #79b9ed);

  color: white;
  font-size: 55px;
  text-shadow: 0 2px 4px rgba(0,0,0,.28);

  box-shadow:
    0 0 0 3px white,
    0 0 0 4px #aaa;
}

.status-box {
  margin-top: 10px;
  padding: 8px 10px;

  border: 1px solid #c7d7e8;
  border-radius: 2px;

  background: linear-gradient(#f4fbff, #dceef9);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ---------- MUSIC ---------- */

.album-art {
  display: grid;
  place-items: center;

  width: 145px;
  aspect-ratio: 1;
  margin: 2px auto 12px;

  border: 1px solid #1d3552;

  background:
    radial-gradient(circle at 38% 36%, #d8f6ff, transparent 18%),
    radial-gradient(circle at 50% 50%, #5bc8ff 0 8%, #1966ab 9% 23%, #0c294b 24% 25%, #79d5ff 26% 40%, #1e5c91 41% 100%);

  color: white;
  font-size: 64px;
  text-shadow: 0 2px 4px rgba(0,0,0,.5);

  box-shadow:
    inset 0 0 20px rgba(255,255,255,.3),
    0 2px 5px rgba(0,0,0,.25);
}

.now-playing {
  text-align: center;
}

.player-buttons {
  display: flex;
  justify-content: center;
  gap: 5px;

  margin: 10px 0;
}

input[type="range"] {
  width: 100%;
}

/* ---------- LINKS / FAKE BROWSER ---------- */

.browser-bar {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 4px;

  margin: -4px -4px 12px;
  padding: 6px;

  border-bottom: 1px solid #b6c5d5;
  background: #eef4f8;
}

.browser-bar input {
  width: 100%;
}

.link-list {
  display: grid;
  gap: 7px;
}

.link-list a {
  color: #0645ad;
}

.buttons-88x31 {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.buttons-88x31 span {
  display: grid;
  place-items: center;

  width: 88px;
  height: 31px;

  border: 1px solid #1d1d1d;

  background:
    repeating-linear-gradient(
      135deg,
      #263f62,
      #263f62 5px,
      #57a3d8 5px,
      #57a3d8 10px
    );

  color: white;
  font-size: 10px;
  font-weight: 700;
  text-shadow: 1px 1px #000;
}

/* ---------- EXPLORER ---------- */

.explorer-window {
  display: grid;
  grid-template-columns: 145px 1fr;

  min-height: 315px;
  padding: 0 !important;
}

.explorer-sidebar {
  display: flex;
  flex-direction: column;
  gap: 5px;

  padding: 14px 12px;

  border-right: 1px solid #ccd8e4;
  background: linear-gradient(90deg, #edf5fb, #f7fbfe);
}

.explorer-sidebar strong {
  margin: 7px 0 2px;
  color: #46637f;
}

.explorer-sidebar a {
  color: #273f56;
  text-decoration: none;
}

.explorer-sidebar a:hover {
  text-decoration: underline;
}

.explorer-content {
  padding: 18px;
  background: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 16px;
}

.fake-file {
  text-align: center;
}

.fake-thumbnail {
  display: grid;
  place-items: center;

  height: 83px;
  margin-bottom: 5px;

  border: 1px solid #c3c3c3;

  background:
    linear-gradient(135deg, #e6f7ff, #91d3f0);

  color: white;
  font-size: 38px;
  text-shadow: 0 1px 4px rgba(0,0,0,.32);

  box-shadow: inset 0 0 0 3px white;
}

/* ---------- UPDATES ---------- */

.updates {
  max-height: 170px;
  overflow-y: auto;
}

.updates p {
  margin: 0;
  padding: 8px 5px;

  border-bottom: 1px dotted #aaa;
}

/* ---------- TASKBAR ---------- */

.taskbar {
  position: fixed;
  z-index: 100000;

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

  display: flex;
  align-items: stretch;

  height: var(--taskbar-height);

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

  background:
    linear-gradient(
      to bottom,
      rgba(93, 157, 201, .80) 0%,
      rgba(36, 87, 130, .87) 43%,
      rgba(15, 47, 78, .94) 53%,
      rgba(28, 76, 115, .95) 100%
    );

  box-shadow:
    inset 0 1px rgba(255,255,255,.32),
    0 -2px 8px rgba(0,0,0,.22);

  backdrop-filter: blur(9px);
}

.start-button {
  position: relative;

  display: grid;
  place-items: center;

  width: 58px;
  min-width: 58px;
  height: 58px;
  margin-top: -7px;

  border: 0;
  border-radius: 50%;

  background:
    radial-gradient(circle at 44% 40%, #dff6ff 0 4%, transparent 5%),
    radial-gradient(circle, #54c5ff 0 36%, #1e5685 37% 53%, rgba(0,0,0,.5) 54% 57%, transparent 58%);

  box-shadow: none;
  cursor: pointer;
}

.start-button::before {
  content: "";

  position: absolute;
  inset: 9px;

  border-radius: 50%;
  box-shadow:
    inset 0 0 7px rgba(255,255,255,.8),
    0 0 6px rgba(172,229,255,.8);
}

.start-button span {
  position: relative;
  z-index: 2;

  color: white;
  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 700;
  text-shadow: 0 1px 2px #003050;
}

.taskbar-apps {
  display: flex;
  align-items: center;
  gap: 3px;

  flex: 1;
  min-width: 0;
  padding: 3px 6px;
}

.taskbar-app {
  min-width: 42px;
  max-width: 165px;
  height: 38px;

  overflow: hidden;

  border: 1px solid rgba(255,255,255,.35);
  border-radius: 3px;

  background:
    linear-gradient(
      rgba(255,255,255,.18),
      rgba(255,255,255,.05)
    );

  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px #000;

  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.22),
    inset 0 1px rgba(255,255,255,.18);

  cursor: pointer;
}

.taskbar-app:hover,
.taskbar-app.active-task {
  background:
    linear-gradient(
      rgba(142, 213, 255, .46),
      rgba(56, 141, 196, .32)
    );

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.3),
    0 0 8px rgba(149,221,255,.35);
}

.system-tray {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 152px;
  padding: 0 10px;

  border-left: 1px solid rgba(255,255,255,.18);

  color: white;
  text-shadow: 0 1px 2px #000;
}

.clock {
  display: flex;
  flex-direction: column;

  margin-left: auto;

  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

/* ---------- START MENU ---------- */

.start-menu {
  position: fixed;
  z-index: 99999;

  left: 4px;
  bottom: calc(var(--taskbar-height) - 1px);

  display: none;
  grid-template-columns: 265px 175px;

  width: 440px;
  min-height: 390px;
  padding: 8px;

  border: 1px solid rgba(255,255,255,.8);
  border-radius: 7px 7px 0 0;

  background:
    linear-gradient(
      120deg,
      rgba(35,77,115,.98),
      rgba(87,139,181,.95)
    );

  box-shadow:
    0 -2px 20px rgba(0,0,0,.42),
    inset 0 0 0 1px rgba(0,0,0,.3);

  backdrop-filter: blur(12px);
}

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

.start-menu-left {
  display: flex;
  flex-direction: column;
  gap: 3px;

  padding: 8px;

  border-radius: 3px;
  background: #fff;
}

.start-menu-left button {
  min-height: 38px;
  padding: 6px 10px;

  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;

  text-align: left;
}

.start-menu-left button:hover {
  border-color: #8db8d7;
  background: linear-gradient(#eef8ff, #d6ecf9);
}

.start-menu-right {
  display: flex;
  flex-direction: column;
  gap: 6px;

  padding: 54px 12px 10px;

  color: white;
  text-shadow: 0 1px 2px #17364e;
}

.start-menu-right a {
  padding: 5px 7px;

  border: 1px solid transparent;
  border-radius: 3px;

  color: white;
  text-decoration: none;
}

.start-menu-right a:hover {
  border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
}

.start-user-picture {
  position: absolute;

  top: -27px;
  right: 60px;

  display: grid;
  place-items: center;

  width: 70px;
  height: 70px;

  border: 3px solid rgba(255,255,255,.92);
  border-radius: 6px;

  background: linear-gradient(135deg, #d7f5ff, #5da9de);

  color: white;
  font-size: 38px;
  text-shadow: 0 2px 3px rgba(0,0,0,.3);

  box-shadow: 0 2px 6px rgba(0,0,0,.45);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .desktop {
    min-height: calc(100vh - var(--taskbar-height));
    height: auto;
    padding: 14px 10px 85px;
    overflow: visible;
  }

  .desktop-icon {
    display: none;
  }

  .draggable-window,
  .draggable-window[style] {
    position: relative !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 0 14px;
  }

  .hidden-window {
    display: block !important;
  }

  .welcome-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .explorer-window {
    grid-template-columns: 1fr;
  }

  .explorer-sidebar {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .start-menu {
    right: 4px;
    width: auto;
    grid-template-columns: 1fr;
  }

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

  .taskbar-apps {
    overflow-x: auto;
  }

  .taskbar-app {
    min-width: 42px;
    width: 42px;
    font-size: 0;
  }
}
