/* ------------------------------
   Basic Reset
------------------------------ */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

body {
  overflow: hidden;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 13px;
  color: #111;
}


/* ------------------------------
   Desktop
------------------------------ */

.desktop {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;

  background:
    linear-gradient(
      rgba(16, 111, 170, 0.05),
      rgba(16, 111, 170, 0.05)
    ),
    url("images/wallpaper.jpg") center / cover no-repeat,
    linear-gradient(
      to bottom,
      #63b8ed 0%,
      #98d8f4 57%,
      #70c65c 58%,
      #42a33e 100%
    );
}


/* ------------------------------
   Desktop Icons
------------------------------ */

.desktop-icons {
  position: absolute;
  top: 15px;
  left: 10px;

  display: grid;
  grid-template-columns: repeat(1, 85px);
  gap: 8px;
}

.desktop-icon {
  width: 82px;
  min-height: 82px;
  padding: 5px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;

  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.desktop-icon:hover,
.desktop-icon:focus {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(48, 113, 210, 0.35);
  outline: none;
}

.icon-image {
  display: block;
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.35));
}

.icon-label {
  max-width: 80px;
  padding: 1px 3px;

  color: white;
  line-height: 1.25;
  text-align: center;
  text-shadow:
    1px 1px 1px #000,
    -1px -1px 1px #000;
}


/* ------------------------------
   Windows
------------------------------ */

.window {
  position: absolute;
  top: 9%;
  left: 16%;

  width: min(720px, calc(100vw - 180px));
  height: min(500px, calc(100vh - 110px));

  display: flex;
  flex-direction: column;

  border: 3px solid #0a4fb3;
  border-radius: 8px 8px 2px 2px;

  background: #ece9d8;
  box-shadow:
    2px 3px 10px rgba(0, 0, 0, 0.45),
    inset 1px 1px #fff;

  overflow: hidden;
}

.welcome-window {
  top: 12%;
  left: 24%;
  width: min(650px, calc(100vw - 210px));
  height: 390px;
}

.small-window {
  top: 25%;
  left: 35%;
  width: 430px;
  height: 285px;
}

.browser-window {
  top: 7%;
  left: 18%;
  width: min(790px, calc(100vw - 190px));
  height: min(540px, calc(100vh - 100px));
}

.notes-window {
  top: 15%;
  left: 28%;
  width: min(600px, calc(100vw - 190px));
  height: min(480px, calc(100vh - 110px));
}

.hidden {
  display: none !important;
}


/* ------------------------------
   Window Title Bar
------------------------------ */

.window-titlebar {
  min-height: 30px;
  padding: 3px 4px 3px 7px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  color: white;

  background:
    linear-gradient(
      to bottom,
      #2685e5 0%,
      #0b63ce 16%,
      #0052bd 48%,
      #0649a4 90%,
      #1d70dd 100%
    );
}

.window-title {
  display: flex;
  align-items: center;
  gap: 5px;

  font-weight: bold;
  text-shadow: 1px 1px #003a88;
}

.small-window-icon {
  font-size: 16px;
}

.window-controls {
  display: flex;
  gap: 2px;
}

.window-controls button {
  width: 24px;
  height: 22px;
  padding: 0;

  display: grid;
  place-items: center;

  border: 1px solid white;
  border-radius: 3px;

  color: white;
  font-weight: bold;
  line-height: 1;

  background:
    linear-gradient(
      to bottom,
      #5da8ef,
      #1764c5
    );

  box-shadow:
    inset 1px 1px rgba(255, 255, 255, 0.5),
    inset -1px -1px rgba(0, 0, 0, 0.25);

  cursor: pointer;
}

.window-controls button:hover {
  filter: brightness(1.15);
}

.window-controls .close-button {
  background:
    linear-gradient(
      to bottom,
      #f39474,
      #cf310d
    );
}


/* ------------------------------
   Window Menus and Toolbars
------------------------------ */

.window-menu {
  min-height: 25px;
  padding: 5px 10px;

  display: flex;
  align-items: center;
  gap: 18px;

  border-bottom: 1px solid #aca899;
  background: #ece9d8;
}

.window-menu span::first-letter {
  text-decoration: underline;
}

.address-bar {
  min-height: 34px;
  padding: 4px 6px;

  display: flex;
  align-items: center;
  gap: 6px;

  border-bottom: 1px solid #aaa;
  background: #ece9d8;
}

.address-field {
  min-width: 0;
  height: 23px;
  padding: 3px 7px;

  flex: 1;

  border:
    1px solid #7f9db9;
  background: white;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.address-bar button,
.browser-toolbar button {
  min-height: 23px;

  border: 1px solid #aaa;
  border-radius: 2px;

  background:
    linear-gradient(
      to bottom,
      #fff,
      #d8d5c8
    );

  cursor: pointer;
}

.address-bar button:hover,
.browser-toolbar button:hover {
  background: white;
}

.browser-toolbar {
  padding: 5px 7px;

  display: flex;
  gap: 5px;

  border-bottom: 1px solid #aaa;
  background: #ece9d8;
}


/* ------------------------------
   Welcome Window
------------------------------ */

.welcome-content {
  flex: 1;
  padding: 40px;

  display: flex;
  align-items: center;
  gap: 30px;

  background:
    radial-gradient(
      circle at top left,
      rgba(83, 169, 255, 0.35),
      transparent 45%
    ),
    white;
}

.welcome-logo {
  font-size: 90px;
  filter: drop-shadow(4px 5px 0 rgba(38, 92, 157, 0.2));
}

.welcome-content h1 {
  margin: 0 0 16px;

  color: #1755a3;
  font-size: 30px;
  font-weight: normal;
}

.welcome-content p {
  max-width: 440px;
  font-size: 15px;
  line-height: 1.6;
}

.welcome-content .tip {
  color: #666;
  font-size: 12px;
  font-style: italic;
}


/* ------------------------------
   Explorer Layout
------------------------------ */

.explorer-layout {
  min-height: 0;
  flex: 1;

  display: grid;
  grid-template-columns: 185px 1fr;

  background: white;
}

.explorer-sidebar {
  padding: 12px;

  background:
    linear-gradient(
      to bottom,
      #7ba2e7,
      #6375d6
    );
}

.sidebar-box {
  margin-bottom: 13px;
  padding-bottom: 9px;

  border-radius: 5px;
  background: white;
  overflow: hidden;
}

.sidebar-box h2 {
  margin: 0 0 8px;
  padding: 6px 9px;

  color: #215dc6;
  font-size: 12px;

  background:
    linear-gradient(
      to right,
      #fff,
      #c6d4f6
    );
}

.sidebar-box a,
.sidebar-box p {
  display: block;
  margin: 6px 10px;

  color: #245edb;
  font-size: 11px;
  line-height: 1.4;
}

.sidebar-box p {
  color: #333;
}

.folder-content {
  min-height: 0;
  flex: 1;
  padding: 22px;

  background: white;
  overflow: auto;
}

.folder-content h2 {
  margin: 0 0 20px;
  padding-bottom: 6px;

  border-bottom: 1px solid #d5d5d5;

  color: #215dc6;
  font-size: 16px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  align-items: start;
  gap: 25px 18px;
}

.file-item {
  padding: 6px;

  display: flex;
  flex-direction: column;
  align-items: center;

  border: 1px solid transparent;
  background: transparent;

  color: #111;
  text-decoration: none;
  text-align: center;

  cursor: pointer;
}

.file-item:hover,
.file-item:focus {
  border-color: #98b5e2;
  background: #e8f2ff;
  outline: none;
}

.file-item span {
  font-size: 47px;
  filter: drop-shadow(2px 2px 1px rgba(0, 0, 0, 0.2));
}

.file-item p {
  margin: 7px 0 0;
  line-height: 1.3;
}


/* ------------------------------
   Gallery
------------------------------ */

.gallery-content {
  min-height: 0;
  flex: 1;
  padding: 20px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  align-content: start;
  gap: 20px;

  background: white;
  overflow: auto;
}

.photo-card {
  padding: 7px;

  border: 1px solid transparent;
  text-align: center;
}

.photo-card:hover {
  border-color: #8db2e7;
  background: #eef6ff;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;

  display: grid;
  place-items: center;

  border: 1px solid #777;

  color: #555;
  font-size: 11px;

  background:
    repeating-conic-gradient(
      #ddd 0 25%,
      #eee 0 50%
    )
    50% / 16px 16px;
}

.photo-card p {
  margin: 7px 0 0;
}


/* ------------------------------
   Fake Browser Page
------------------------------ */

.webpage {
  min-height: 0;
  flex: 1;
  padding: 35px;

  color: #222;

  background:
    linear-gradient(
      135deg,
      #f4fbff,
      #d8edff
    );

  overflow: auto;
}

.webpage h1 {
  margin-top: 0;

  color: #1f4a9b;
  font-family: Georgia, serif;
  font-size: 28px;
}

.webpage p {
  max-width: 620px;
  line-height: 1.7;
}

.link-directory {
  max-width: 470px;
  margin-top: 25px;
  padding: 18px;

  border: 2px ridge #c7d5ed;
  background: white;
}

.link-directory a {
  display: block;
  margin: 10px 0;

  color: #0645ad;
  font-weight: bold;
}


/* ------------------------------
   Notepad
------------------------------ */

.notepad-paper {
  min-height: 0;
  flex: 1;
  padding: 10px;

  font-family:
    "Lucida Console",
    "Courier New",
    monospace;
  font-size: 14px;
  line-height: 1.5;

  background: white;
  overflow: auto;
}

.notepad-paper p {
  margin: 0 0 17px;
}

.text-cursor {
  display: inline-block;
  width: 2px;
  height: 17px;

  vertical-align: middle;
  background: black;

  animation: cursor-blink 1s steps(1) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}


/* ------------------------------
   Empty Folder
------------------------------ */

.empty-folder {
  display: grid;
  place-items: center;
  align-content: center;

  color: #555;
  text-align: center;
}

.empty-icon {
  font-size: 70px;
}


/* ------------------------------
   Status Bar
------------------------------ */

.status-bar {
  min-height: 24px;
  padding: 3px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;

  border-top: 1px solid #aaa;
  background: #ece9d8;
}

.status-bar span {
  padding: 2px 6px;

  border:
    1px solid #d4d0c8;
  box-shadow:
    inset 1px 1px #aaa,
    inset -1px -1px #fff;

  color: #444;
  font-size: 11px;
}


/* ------------------------------
   Taskbar
------------------------------ */

.taskbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999999;

  height: 39px;

  display: flex;
  align-items: stretch;

  background:
    linear-gradient(
      to bottom,
      #245edb 0%,
      #3f8cf3 8%,
      #245edb 20%,
      #1941a5 92%,
      #15358b 100%
    );

  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.7);
}

.start-button {
  width: 112px;
  padding: 0 15px 0 9px;

  display: flex;
  align-items: center;
  gap: 7px;

  border: 0;
  border-radius: 0 15px 15px 0;

  color: white;
  font-size: 20px;
  font-style: italic;
  font-weight: bold;
  text-shadow: 1px 1px #1b5b13;

  background:
    linear-gradient(
      to bottom,
      #78c65c 0%,
      #3da336 45%,
      #247d22 100%
    );

  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.8),
    inset -2px -2px rgba(0, 0, 0, 0.25);

  cursor: pointer;
}

.start-button:hover {
  filter: brightness(1.1);
}

.windows-logo {
  width: 25px;
  height: 25px;

  display: grid;
  place-items: center;

  color: #f7f7f7;
  font-size: 20px;
  font-style: normal;
}

.taskbar-programs {
  min-width: 0;
  padding: 4px 5px;

  display: flex;
  flex: 1;
  gap: 4px;

  overflow: hidden;
}

.taskbar-item {
  width: 175px;
  min-width: 90px;
  padding: 0 10px;

  border:
    1px solid #1646a0;
  border-radius: 3px;

  color: white;
  text-align: left;

  background:
    linear-gradient(
      to bottom,
      #3e8df1,
      #1958c6
    );

  box-shadow:
    inset 1px 1px rgba(255, 255, 255, 0.25);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  cursor: pointer;
}

.taskbar-item:hover {
  background:
    linear-gradient(
      to bottom,
      #62a8ff,
      #276bd4
    );
}

.taskbar-item.active {
  background:
    linear-gradient(
      to bottom,
      #174994,
      #2361bf
    );

  box-shadow:
    inset 2px 2px rgba(0, 0, 0, 0.2);
}

.system-tray {
  min-width: 145px;
  padding: 0 10px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;

  border-left: 1px solid #1251a7;

  color: white;

  background:
    linear-gradient(
      to bottom,
      #19a5e6,
      #0876ce
    );

  box-shadow:
    inset 1px 0 rgba(255, 255, 255, 0.35);
}

.system-tray time {
  font-size: 12px;
  white-space: nowrap;
}


/* ------------------------------
   Start Menu
------------------------------ */

.start-menu {
  position: absolute;
  bottom: 39px;
  left: 0;
  z-index: 999998;

  width: 410px;

  border: 2px solid #1f55b6;
  border-radius: 7px 7px 0 0;

  background: white;
  box-shadow: 3px -3px 12px rgba(0, 0, 0, 0.4);

  overflow: hidden;
}

.start-menu-header {
  height: 70px;
  padding: 8px 13px;

  display: flex;
  align-items: center;
  gap: 12px;

  color: white;
  font-size: 18px;
  text-shadow: 1px 1px #174d9a;

  background:
    linear-gradient(
      to bottom,
      #56a2ec,
      #1763c3
    );
}

.profile-picture {
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  border: 2px solid white;
  border-radius: 5px;

  font-size: 34px;
  background: #dff2ff;
}

.start-menu-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.start-menu-left,
.start-menu-right {
  padding: 9px 6px;
}

.start-menu-left {
  background: white;
}

.start-menu-right {
  border-left: 1px solid #91b5e7;

  background:
    linear-gradient(
      to right,
      #d5e6fb,
      #c3daf8
    );
}

.start-menu button {
  width: 100%;
  min-height: 38px;
  padding: 5px 8px;

  display: flex;
  align-items: center;
  gap: 9px;

  border: 0;
  background: transparent;

  text-align: left;
  cursor: pointer;
}

.start-menu button:hover {
  color: white;
  background: #316ac5;
}

.start-menu-left button > span {
  width: 32px;
  font-size: 26px;
  text-align: center;
}

.start-menu-left button div {
  display: flex;
  flex-direction: column;
}

.start-menu-left small {
  margin-top: 2px;
  color: #777;
}

.start-menu-left button:hover small {
  color: white;
}

.start-menu hr {
  border: 0;
  border-top: 1px solid #bbb;
}

.start-menu-footer {
  min-height: 48px;
  padding: 6px 8px;

  display: flex;
  justify-content: flex-end;
  gap: 8px;

  background:
    linear-gradient(
      to bottom,
      #3f8ee1,
      #0e5db6
    );
}

.start-menu-footer button {
  width: auto;

  color: white;
}


/* ------------------------------
   Responsive Design
------------------------------ */

@media (max-width: 700px) {
  .desktop-icons {
    grid-template-columns: repeat(2, 80px);
  }

  .window,
  .welcome-window,
  .small-window,
  .browser-window,
  .notes-window {
    top: 5%;
    left: 5%;

    width: 90%;
    height: calc(100% - 95px);
  }

  .welcome-content {
    padding: 25px;
  }

  .welcome-logo {
    display: none;
  }

  .explorer-layout {
    grid-template-columns: 1fr;
  }

  .explorer-sidebar {
    display: none;
  }

  .start-menu {
    width: min(410px, 100%);
  }

  .system-tray span {
    display: none;
  }

  .system-tray {
    min-width: 86px;
  }

  .start-button {
    width: 95px;
  }

  .taskbar-item {
    width: 130px;
  }
}