body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #fceed2;
  background-image: url(icons/background.png);
  background-position: center;
  background-size: 23.7vmin;
  background-repeat: no-repeat;
  color: #e2e8f0;
  user-select: none;
  min-height: 100vh;
}

#desktop {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  height: calc(100vh - 56px - 52px);
  width: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  align-items: flex-start;
  padding-bottom: 52px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: linear-gradient(90deg, #101115, #11161f);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 2000;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-user,
.navbar-time {
  font-size: 0.95rem;
}

.navbar-time {
  color: #b7bdc5;
}

.icon {
  width: 140px;
  min-height: 180px;
  text-align: center;
  color: #171718;
  cursor: pointer;
  padding: 14px 12px 12px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-start;
  gap: 8px;
  background: transparent;
  transition: transform 0.2s ease;
}
 
.icon:hover {
  transform: translateY(-2px);
}
 
.icon-img {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  background: transparent;
  border: none;
}
 
.icon span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 700;
  color: #474646;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 2px 6px;
  border-radius: 6px;
  max-height: calc(1.4em * 2);
}

/* WinBox Window Styling */
.winbox {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.wb-header {
  background: linear-gradient(90deg, #1d4ed8, #0f172a);
  color: #f8fafc;
  font-weight: bold;
  cursor: move;
  user-select: none;
  touch-action: none;
}

.wb-header span {
  color: #f8fafc;
}

.wb-header button {
  color: #f8fafc;
}

.wb-header:active {
  opacity: 0.95;
}

.wb-body {
  background: #0f172a;
  color: #e2e8f0;
  min-height: 0;
  overflow: hidden;
}

.window-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
  background: #0f172a;
}

.document-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 15px;
  background: #0f172a;
}

.folder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
}

.folder-back {
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}

.folder-back:hover {
  background: rgba(59, 130, 246, 0.9);
}

.folder-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
}

.folder-items {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}

.window-content .icon {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  flex-grow: 0;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}

.carousel-slide {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.4);
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
  pointer-events: auto;
}

.carousel-control:hover {
  background: rgba(59, 130, 246, 0.9);
}

.carousel-control.left {
  left: 18px;
}

.carousel-control.right {
  right: 18px;
}

.carousel-caption {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  font-size: 0.9rem;
}

.preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

#winbox-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  align-items: center;
  height: clamp(48px, 7vh, 56px);
  padding: 6px 8px;
  box-sizing: border-box;
  background: linear-gradient(90deg, #0f172a, #111827);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 999;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#winbox-taskbar::-webkit-scrollbar {
  display: none;
}

#winbox-taskbar > div {
  height: 34px;
  min-width: 0;
  max-width: min(240px, 65vw);
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  box-sizing: border-box;
}

#winbox-taskbar > div > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#winbox-taskbar > div > button {
  flex: 0 0 28px;
  min-height: 28px;
}

@media (max-width: 480px) {
  #winbox-taskbar {
    height: 48px;
    padding: 6px 4px;
  }

  #winbox-taskbar > div {
    max-width: 70vw;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}
