* {
  box-sizing: border-box;
}

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

body {
  background: #173642 url("background.jpeg") center / cover fixed no-repeat;
  color: #ffffff;
  font-family: "Electrolize", sans-serif;
  font-weight: 400;
  font-style: normal;
  overflow: hidden;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 35px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(27, 67, 79, 0.92);
  border-bottom: 2px solid #00ffff;
  z-index: 10;
}

#time,
.window-launcher {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 1px;
  color: #ffffff;
}

.window-launcher {
  cursor: pointer;
  font-weight: bold;
}

main {
  position: relative;
  min-height: 100vh;
}

.desktop-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 70px 16px 16px;
}

.app {
  width: 90px;
  text-align: center;
}

.app p {
  margin: 0;
  color: white;
}

.app-icon {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 0 auto 6px;
  cursor: pointer;
}

.window {
  position: absolute;
  left: 50%;
  top: calc(50% + 18px);
  transform: translate(-50%, -50%);
  z-index: 5;
  width: min(560px, 90vw);
  max-width: 90vw;
  max-height: calc(100vh - 55px);
  overflow: auto;
  background: linear-gradient(135deg, #00ffff, #55dff2);
  border: 5px solid white;
  border-radius: 10px;
}

.game-window {
  width: min(640px, 92vw);
  top: 70px;
}

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(21, 78, 92, 0.95);
  color: white;
  cursor: move;
  user-select: none;
}

.window-content {
  padding: 10px 20px 20px;
  text-align: center;
  color: #0f1b24;
}

.window-content h1 {
  margin-top: 0;
  color: #f01313;
}

.window-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px auto 0;
}

.close-link {
  border: none;
  background: transparent;
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.app-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 90px;
  margin: 20px;
  cursor: pointer;
  user-select: none; /* Prevents text highlighting when clicked */
}


.app-label {
  color: white;
  font-size: 12px;
  text-align: center;
  padding: 4px 8px;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  word-break: break-word;
  transition: all 0.15s ease; /* Makes the JS hover smooth */
}

.app-icon .icon-graphic {
  transition: filter 0.15s ease;
}

.app-icon:hover .icon-graphic {
  filter: drop-shadow(0 0 8px #009fff);
}

.app-icon:hover .app-label {
  background-color: #007acc;
  border-color: #009fff;
  box-shadow: 0 0 8px rgba(0, 159, 255, 0.6);
}
