body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Orbitron', sans-serif;
  overflow: hidden;
  background: radial-gradient(ellipse at bottom, #1b0033 0%, #000010 100%);
  color: white;
}

canvas#stars {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 0 !important;
  background: transparent !important;
}


.desktop {
  position: absolute;
  top: 20px;
  left: 2.5px;
  bottom: 40px; /* Leave room for taskbar */
  width: 100px;  /* narrow column on left */
  display: flex;
  flex-direction: column;  /* vertical stack */
  align-items: center;     /* center horizontally */
  gap: 2px;               /* space between icons */
  padding: 0;
  overflow-y: auto;        /* scroll if too many icons */
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100px;     /* wider for bigger icons */
  height: 110px;
  text-align: center;
  color: white;
  font-family: Orbitron, sans-serif;
  font-size: 30px;  /* bigger emoji */
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s;
}

.icon:hover {
  transform: scale(1.15);
}

.icon span {
  margin-top: 10px;
  font-size: 12px;
  user-select: none;
}


.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: rgba(30, 0, 60, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 -2px 10px rgba(200, 100, 255, 0.3);
}

.taskbar .start {
  font-weight: bold;
  color: #a368df;
  font-size: 1rem;
  margin-right: 10px;
}


.taskbar .right-group {
  display: flex;
  align-items: center;
  margin-left: auto; /* push group to right */
  margin-right: 23px; /* space from right edge */
  gap: 10px; /* space between time and battery */
}

.taskbar .time {
  font-size: 0.9rem;
  color: #a368df;
}

.taskbar .battery {
  font-size: 0.9rem;
  color: #a368df;
  user-select: none;
}




.search-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.search-icon img {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 4px #8F00FF);
  transition: transform 0.3s ease;
}

.search-icon:hover img {
  transform: scale(1.15);
}

.search-popup {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 90%;
  height: 300px;
  background: rgba(15, 5, 30, 0.95);
  border: 1px solid #a368df;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(160, 32, 240, 0.5);
  z-index: 999;
  display: none;
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.search-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

.search-recents {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 1rem;
}

.search-recents h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #a368df;
}

.recent-apps {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.recent-app {
  background: #1e003c;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: white;
  box-shadow: 0 0 6px rgba(160, 32, 240, 0.3);
  cursor: pointer;
  transition: background 0.2s ease;
}

.recent-app:hover {
  background: rgba(160, 32, 240, 0.2);
}

.search-bar-popup {
  border-top: 1px solid #a368df;
  padding-top: 1rem;
}

.search-bar-popup input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border-radius: 25px;
  border: none;
  outline: none;
  font-family: 'Orbitron', sans-serif;
  background: #0D0D2B;
  color: #a368df;
  box-shadow: 0 0 8px rgba(160, 32, 240, 0.3);
}


.window-icon {
  font-size: 20px;
  cursor: pointer;
  user-select: none;
  padding: 0 8px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  color: #a368df;
  box-shadow: 0 0 6px rgba(160, 32, 240, 0.6);
  line-height: 1;
}


.window-icon:hover {
  background-color: rgba(160, 32, 240, 0.2);
  transform: scale(1.15);
}

.taskbar .search-bar {
  display: flex;
  align-items: center;
  background: #0D0D2B;
  border: 1px solid #A020F0;
  border-radius: 25px;
  padding: 5px 12px;
  box-shadow: 0 0 10px rgba(160, 32, 240, 0.4);
  color: #a368df;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  max-width: 90vw;          /* prevents overflow on small screens */
  width: 260px;             /* perfect middle-ground size */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.taskbar .search-bar:hover {
  transform: scale(1.03);
  box-shadow: 0 0 14px rgba(180, 40, 255, 0.6);
}

.taskbar .search-bar input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #a368df;
  padding: 6px 10px;
  width: 100%;
  font-family: 'Orbitron', sans-serif;
  transition: all 0.3s ease;
}

.taskbar .search-bar input:focus {
  transform: scale(1.05);
  filter: drop-shadow(0 0 6px #8F00FF);
}



.taskbar .search-bar input:focus {
  transform: scale(1.05);
  filter: drop-shadow(0 0 6px #8F00FF);
}

.taskbar .search-bar button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 1px 4px;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.taskbar .search-bar button img {
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 0 4px #8F00FF);
}

.taskbar .search-bar button:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px #8F00FF);
}

.taskbar {
  overflow: hidden; /* Prevent shifting from scrollbar */
}

.center-group {
  overflow-x: hidden; /* disable horizontal scroll if not needed */
}

@keyframes slideFadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px); /* maintain X center and animate Y */
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0); /* stay horizontally centered */
  }
}

.search-popup {
  animation: slideFadeInUp 0.4s ease-out;
}


/* ====== New window styles ====== */

.window {
  position: absolute;
  top: 60px;
  left: 60px;
  width: 400px;
  height: 300px;
  background: rgba(20, 10, 40, 0.95);
  border: 1px solid #a080ff;
  border-radius: 10px;
  overflow: hidden;         /* important to contain iframe */
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 12px #a080ff;
  z-index: 10;
}

.window.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  z-index: 9999 !important;
}


.title-bar {
  background: rgba(50, 20, 90, 0.8);
  padding: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  color: #fff;
  font-weight: bold;
  user-select: none;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 4px; /* space between buttons */
  margin-left: auto;
}

.window-controls button {
  background: transparent;
  border: none;
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  color: white; /* or your desired color */
  vertical-align: middle;
}

.window-controls .close {
  color: rgb(255, 255, 255);
  transform: translateY(1px); /* nudge down slightly */
}

iframe {
  flex-grow: 1;
  border: none;
  background: #111;
  width: 100%;
  height: 100%;
}
