/* Base body & desktop */
body {
  margin: 0;
  font-family: sans-serif;
  background-image: url("../img/wp.gif");
  background-color: #000;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  overflow-x: hidden;
}

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

/* Icons */
.icon, .folder {
  text-align: center;
  width: 72px;
  margin: 10px;
  cursor: pointer;
  color: white;
  padding: 10px;
}

.icon img, .folder img {
  width: 48px;
  height: 48px;
}

.icon-label {
  font-size: 12px;
  margin-top: 5px;
}

.folder-label {
  font-size: 12px;
  margin-top: 5px;
  color: black;
}

/* Windows */
.window {
  width: 600px;
  height: 500px;
  position: absolute;
  top: 80px;
  left: 80px;
  background: #fff;
  border: 2px solid #000;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
  display: none;
  resize: both;
  overflow: auto;
}

.window-header {
  background-color: #ccc;
  padding: 8px;
  cursor: move;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.window-body {
  padding: 10px;
  position: relative;
  height: calc(100% - 38px);
  box-sizing: border-box;
  overflow: auto;
}

/* Scrollbars in windows */
.window-body::-webkit-scrollbar {
  width: 8px;
}
.window-body::-webkit-scrollbar-thumb {
  background-color: #999;
  border-radius: 4px;
}
.window-body::-webkit-scrollbar-thumb:hover {
  background-color: #666;
}

/* Close button */
.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #c0c0c0;
  border: 2px solid #808080;
  box-shadow: inset -2px -2px 0 #ffffff, inset 2px 2px 0 #000000;
  display: flex;
  align-items: center;
  color: black;
  padding: 0 10px;
  font-size: 14px;
  font-family: 'Tahoma', sans-serif;
  user-select: none;
  z-index: 10000;
}

/* Container for left‐side taskbar buttons */
.taskbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Each button on the taskbar */
.taskbar-app {
  cursor: pointer;
  background: #c0c0c0;
  border-style: outset;
  border-width: 2px;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 2px 8px;
  font-weight: normal;
  font-size: 13px;
  color: black;
  display: flex;
  align-items: center;
  user-select: none;
}
.taskbar-app:hover {
  background: #a0a0a0;
  border-color: #808080 #ffffff #ffffff #808080;
}

/* Clock pushed to far right */
.clock {
  margin-left: auto;
  font-size: 14px;
  font-family: 'Tahoma', sans-serif;
}

/* Gallery Container */
.gallery-container, .folder-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* Custom scrollbar for gallery */
.gallery-container::-webkit-scrollbar {
  width: 12px;
  background: #c0c0c0;
  border-left: 2px outset #ffffff;
}
.gallery-container::-webkit-scrollbar-track {
  background: #c0c0c0;
  border: 2px solid #808080;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #808080;
  border-right-color: #808080;
}
.gallery-container::-webkit-scrollbar-thumb {
  background: #a0a0a0;
  border: 2px solid #808080;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #808080;
  border-right-color: #808080;
  min-height: 30px;
}

/* Gallery items */
.gallery {
  width: 120px;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
}
.gallery img {
  width: auto;
  height: 50px;
  border-radius: 2px;
  border: 2px solid #808080;
  box-shadow: inset -1px -1px 0 #ffffff, inset 1px 1px 0 #000000;
}
.desc {
  font-size: 12px;
  margin-top: 4px;
  color: #333;
}

/* Fullscreen Preview */
.fullscreen-preview {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: zoom-out;
}
.fullscreen-preview img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  pointer-events: none;
}
.close-fullscreen {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 36px;
  color: white;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  text-shadow: 0 0 8px black;
  pointer-events: auto;
}

/* Link styling in Screen Time window */
#extendLink {
  color: #3498db;
  text-decoration: underline;
  cursor: pointer;
}

/* Screen Time window fixed size */
#screenTimeWindow {
  width: 300px;
  height: 200px;
  resize: none !important;
}

/* Unified window styling */
#window1,
#window2,
#window3,
#window4,
#window5,
#window6,
#folderAWindow,
#folderBWindow,
#bangtanWindow,
#aestheticWindow,
#folderCWindow,
#screenTimeWindow {
  border: 5px solid #c0c0c0;
  background-color: #f0f0f0;
  box-shadow: inset -2px -2px 0 #ffffff, inset 2px 2px 0 #000000;
  font-family: 'Tahoma', sans-serif;
}

/* Header bar for all windows */
#window1 .window-header,
#window2 .window-header,
#window3 .window-header,
#window4 .window-header,
#window5 .window-header,
#window6 .window-header,
#folderAWindow .window-header,
#folderBWindow .window-header,
#bangtanWindow .window-header,
#aestheticWindow .window-header,
#folderCWindow .window-header,
#screenTimeWindow .window-header {
  background: #c0c0c0;
  border-bottom: 2px solid #808080;
  box-shadow: inset -1px -1px 0 #ffffff, inset 1px 1px 0 #000000;
  padding: 6px 8px;
}

/* Close‐button styling for all windows */
#window1 .close-btn,
#window2 .close-btn,
#window3 .close-btn,
#window4 .close-btn,
#window5 .close-btn,
#window6 .close-btn,
#folderAWindow .close-btn,
#folderBWindow .close-btn,
#bangtanWindow .close-btn,
#aestheticWindow .close-btn,
#folderCWindow .close-btn,
#screenTimeWindow .close-btn {
  background: #c0c0c0;
  border-style: outset;
  border-width: 2px;
  border-color: #ffffff #808080 #808080 #ffffff;
  width: 24px;
  height: 24px;
  font-weight: bold;
  font-size: 16px;
  color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
#window1 .close-btn:hover,
#window2 .close-btn:hover,
#window3 .close-btn:hover,
#window4 .close-btn:hover,
#window5 .close-btn:hover,
#window6 .close-btn:hover,
#folderAWindow .close-btn:hover,
#folderBWindow .close-btn:hover,
#bangtanWindow .close-btn:hover,
#aestheticWindow .close-btn:hover,
#folderCWindow .close-btn:hover,
#screenTimeWindow .close-btn:hover {
  background: #a0a0a0;
  border-color: #808080 #ffffff #ffffff #808080;
}

/* Body of all windows */
#window1 .window-body,
#window2 .window-body,
#window3 .window-body,
#window4 .window-body,
#window5 .window-body,
#window6 .window-body,
#folderAWindow .window-body,
#folderBWindow .window-body,
#bangtanWindow .window-body,
#aestheticWindow .window-body,
#folderCWindow .window-body,
#screenTimeWindow .window-body {
  background-color: #e0e0e0;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  padding: 10px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #a0a0a0 #c0c0c0;
}

/* Scrollbar within each window body */
#window1 .window-body::-webkit-scrollbar,
#window2 .window-body::-webkit-scrollbar,
#window3 .window-body::-webkit-scrollbar,
#window4 .window-body::-webkit-scrollbar,
#window5 .window-body::-webkit-scrollbar,
#window6 .window-body::-webkit-scrollbar,
#folderAWindow .window-body::-webkit-scrollbar,
#folderBWindow .window-body::-webkit-scrollbar,
#bangtanWindow .window-body::-webkit-scrollbar,
#aestheticWindow .window-body::-webkit-scrollbar,
#folderCWindow .window-body::-webkit-scrollbar,
#screenTimeWindow .window-body::-webkit-scrollbar {
  width: 12px;
  background: #c0c0c0;
}
#window1 .window-body::-webkit-scrollbar-thumb,
#window2 .window-body::-webkit-scrollbar-thumb,
#window3 .window-body::-webkit-scrollbar-thumb,
#window4 .window-body::-webkit-scrollbar-thumb,
#window5 .window-body::-webkit-scrollbar-thumb,
#window6 .window-body::-webkit-scrollbar-thumb,
#folderAWindow .window-body::-webkit-scrollbar-thumb,
#folderBWindow .window-body::-webkit-scrollbar-thumb,
#bangtanWindow .window-body::-webkit-scrollbar-thumb,
#aestheticWindow .window-body::-webkit-scrollbar-thumb,
#folderCWindow .window-body::-webkit-scrollbar-thumb,
#screenTimeWindow .window-body::-webkit-scrollbar-thumb {
  background: #a0a0a0;
  border: 2px solid #808080;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #808080;
  border-right-color: #808080;
}

/* Popup Overlay */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

/* Popup Box */
.popup-box {
  background: #c0c0c0;
  padding: 20px;
  border: 2px solid #000;
  box-shadow:
    inset -2px -2px #808080,
    inset 2px 2px #ffffff,
    4px 4px 0 rgba(0, 0, 0, 0.4);
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 13px;
  text-align: center;
  width: 300px;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Popup Box Button */
.popup-box button {
  margin-top: 15px;
  padding: 4px 12px;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  background-color: #c0c0c0;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 13px;
  cursor: pointer;
}

/* Popup Button Pressed Look */
.popup-box button:active {
  border-top-color: #404040;
  border-left-color: #404040;
  border-right-color: #fff;
  border-bottom-color: #fff;
  padding: 5px 11px; /* simulate "pressed" */
}

/* Fake Browser Layout */
.fake-browser {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  flex: 1;
}

.browser-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  background-color: #d0d0c0;
  padding: 6px 10px;
  font-family: 'Tahoma', sans-serif;
  border-bottom: 2px solid #808080;
}

.browser-controls button,
.browser-controls select {
  font-size: 13px;
  padding: 4px 8px;
  border: 2px outset #c0c0c0;
  background-color: #f0f0f0;
  cursor: pointer;
}

.browser-controls button:hover,
.browser-controls select:hover {
  background-color: #dcdcdc;
}

#browserFrame {
  flex: 1;
  width: 100%;
  border: none;
}

.image-display {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* iTunes Section */
.folder4-wrapper {
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  background: #c0c0c0;
  height: 100%;
  width: 100%;
  color: black;
}

.folder4-wrapper .itunes-container {
  display: flex;
  height: 100vh;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-right-color: #404040;
  border-bottom-color: #404040;
}

.folder4-wrapper .column {
  border: 2px solid;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #404040;
  border-right-color: #404040;
  background-color: #dfdfdf;
  padding: 8px;
  box-sizing: border-box;
  overflow-y: auto;
}

.folder4-wrapper .library {
  width: 15%;
}

.folder4-wrapper .artists {
  width: 25%;
}

.folder4-wrapper .songs {
  width: 60%;
  background-color: #ffffff;
}

.folder4-wrapper h3 {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: bold;
  border-bottom: 1px solid #808080;
  padding-bottom: 4px;
}

.folder4-wrapper ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.folder4-wrapper ul li {
  padding: 4px 6px;
  cursor: pointer;
  font-size: 12px;
  border: 2px solid transparent;
}

.folder4-wrapper ul li:hover {
  background-color: #000080;
  color: #ffffff;
}

.folder4-wrapper ul li.active {
  background-color: #000080;
  color: white;
  border: 2px inset #808080;
}

.folder4-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.folder4-wrapper th,
.folder4-wrapper td {
  padding: 6px 8px;
  border: 1px solid #808080;
  text-align: left;
}

.folder4-wrapper audio {
  width: 100%;
  margin-top: 2px;
  background-color: #c0c0c0;
  border: 2px inset #808080;
  height: 20px;
}

.folder4-wrapper thead {
  background-color: #d4d0c8;
  color: black;
  font-weight: bold;
  border-bottom: 2px solid #404040;
}

/* Highlighted icon or folder */
.icon.highlighted,
.folder.highlighted {
  background-color: rgba(166, 202, 241, 0.5);
  border-radius: 6px;
}

/* Research document styling */
.research-doc {
  width: 100vw;
  height: 100vh;
  border: none;
  background-color: white;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
  font-family: "MS Sans Serif", sans-serif;
}

.research-doc-content h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
}

.research-doc-content p {
  margin-bottom: 1em;
  line-height: 1.5;
  font-size: 1em;
}

/* Start menu */
.start-menu {
  position: absolute;
  bottom: 30px;
  left: 0;
  background-color: #f0f0f0;
  border: 1px solid #999;
  width: 160px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  font-family: sans-serif;
}

.start-menu ul {
  list-style: none;
  padding: 5px 0;
  margin: 0;
}

.start-menu li {
  padding: 8px 12px;
  font-size: 14px;
  cursor: default;
}

.start-menu li.disabled {
  color: #999;
  pointer-events: none;
}

.start-menu li.active-option {
  color: #000;
  cursor: pointer;
  border: 2px solid #000;
  box-shadow:
    inset -2px -2px #808080,
    inset 2px 2px #ffffff,
    4px 4px 0 rgba(0, 0, 0, 0.4);
}

.start-menu li.active-option:hover {
  background-color: #cceeff;
}

    #overridePopup {
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      /* background: rgba(0, 0, 0, 0.4); */
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 10000;
    }
    #overridePopup .popup-box {
      background: #c0c0c0;
      padding: 20px;
      border: 2px solid #000;
      box-shadow:
        inset -2px -2px #808080,
        inset 2px 2px #ffffff,
        4px 4px 0 rgba(0, 0, 0, 0.4);
      font-family: 'MS Sans Serif', Tahoma, sans-serif;
      font-size: 13px;
      text-align: center;
      width: 300px;
      max-height: 90vh;
      overflow-y: auto;
      box-sizing: border-box;
    }
    #overridePopup .popup-box button {
      margin-top: 15px;
      padding: 4px 12px;
      border: 2px solid;
      border-top-color: #fff;
      border-left-color: #fff;
      border-right-color: #404040;
      border-bottom-color: #404040;
      background-color: #c0c0c0;
      font-family: 'MS Sans Serif', Tahoma, sans-serif;
      font-size: 13px;
      cursor: pointer;
    }
    #overridePopup .popup-box button:active {
      border-top-color: #404040;
      border-left-color: #404040;
      border-right-color: #fff;
      border-bottom-color: #fff;
      padding: 5px 11px;
    }

    /* "0 seconds left" fixed popup */
    #zeroTimePopup {
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0, 0, 0, 0.4);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 10000;
    }
    #zeroTimePopup .popup-box {
      background: #c0c0c0;
      padding: 20px;
      border: 2px solid #000;
      box-shadow:
        inset -2px -2px #808080,
        inset 2px 2px #ffffff,
        4px 4px 0 rgba(0, 0, 0, 0.4);
      font-family: 'MS Sans Serif', Tahoma, sans-serif;
      font-size: 13px;
      text-align: center;
      width: 300px;
      max-height: 90vh;
      overflow-y: auto;
      box-sizing: border-box;
    }

    /* "continue?" link styling */
    #continueLink {
      display: none;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-family: sans-serif;
      font-size: 16px;
      color: blue;
      text-decoration: underline;
      cursor: pointer;
      z-index: 10000;
    }