@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap");

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #2c2c2c;
}
::-webkit-scrollbar-thumb {
  background: #827aa5;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6f6a90;
}

:root {
  --primary-color: #2c2c2c;
  --secondary-color: #827aa5;
}

.desktop-padding-left {
  padding-left: 4rem;
}
.desktop-padding-bottom {
  padding-bottom: 4rem;
}
.desktop-padding-top {
  padding-top: 0.5rem;
}
.desktop-padding-right {
  padding-right: 0.5rem;
}

* {
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease,
    color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease,
    filter 0.3s ease !important;
  font-family: "Lexend", sans-serif;
}

.app-window {
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.tray-icon {
  @apply p-2 rounded-lg cursor-pointer transform hover:scale-110 flex-shrink-0;
}
.tray-icon.active-app {
  background-color: var(--secondary-color);
  box-shadow: 0 0 10px rgba(130, 122, 165, 0.5);
}
.tray-icon.minimized-app {
  opacity: 0.6;
  filter: grayscale(50%);
}

.app-window {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  min-width: 300px;
  min-height: 200px;
  z-index: 50;
  opacity: 0;
  transform: scale(0.9);
}
.app-window.open {
  opacity: 1;
  transform: scale(1);
}
.app-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}
.app-window.minimized {
  opacity: 0;
  transform: scale(0.8) translateY(20px);
}

#lock-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
}

#lock-screen.opacity-100 {
  pointer-events: auto;
}

#lock-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  -webkit-filter: blur(15px);
  filter: blur(15px);
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}

#lock-screen.opacity-100 #lock-bg {
  opacity: 1;
}

#lock-screen.opacity-0 {
  opacity: 0;
}
#lock-screen.opacity-100 {
  opacity: 1;
}
#lock-bg {
  opacity: 0;
}
#lock-screen.opacity-100 #lock-bg {
  opacity: 1;
}

#trash-app-icon.drag-over {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px var(--secondary-color));
}

#desktop-container {
  background-size: cover;
  background-position: center;
}

.image-preview {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background-color: #1f2937;
}

.theme-preview {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  cursor: pointer;
}
.theme-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(130, 122, 165, 0.5);
}
.theme-preview.selected {
  border: 3px solid var(--secondary-color);
  box-shadow: 0 0 15px rgba(130, 122, 165, 0.7);
}

.step-transition {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.desktop-icon {
  transition: all 0.3s ease;
}
.desktop-icon:hover {
  transform: scale(1.05);
}

#taskbar {
  transition: all 0.4s ease;
}

#user-menu {
  transition: all 0.3s ease;
}

.progress-bar {
  transition: width 0.5s ease;
}

.browser-iframe {
  border: none;
  background: white;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  #taskbar {
    font-size: 0.8rem;
  }

  .app-window {
    min-width: 90vw;
    min-height: 60vh;
  }

  .window-controls button {
    width: 24px;
    height: 24px;
  }

  #desktop-area {
    padding: 1rem;
  }

  .desktop-icon {
    width: 4rem;
  }
}

.window-controls button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

#wizard-card {
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.step-content {
  min-height: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-window.maximizing {
  transition: all 0.3s ease !important;
}

.app-window.maximized {
  transition: all 0.3s ease !important;
}

.tray-icon {
  transition: all 0.3s ease !important;
}

.tray-icon.app-closing {
  opacity: 0 !important;
  transform: scale(0.8) !important;
}

.tray-icon.app-opening {
  animation: trayIconAppear 0.3s ease forwards;
}

@keyframes trayIconAppear {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes trayIconDisappear {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

#antiskid {
  position: absolute;
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 5px 0;
  z-index: 9999;
  min-width: 150px;
  backdrop-filter: blur(5px);
}

#antiskid div {
  padding: 10px 20px;
  cursor: pointer;
  color: #fff;
  user-select: none;
}

#antiskid div:hover {
  background: rgba(255, 255, 255, 0.2);
}

::selection {
  background: #827aa5;
  color: #2c2c2c;
}
