/* ================= BODY ================= */
body, html {
  margin:0;
  padding:0;
  width:100%;
  height:100%;
  font-family:"Segoe UI", sans-serif;
  overflow:hidden;
  background:black;
}

/* ================= BOOT SCREEN ================= */
#bootScreen {
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:black;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:20px;
  box-sizing:border-box;
}

#bootLogoTop {
  font-size:80px;
  color:white;
  margin-bottom:20px;
}

#bootLog {
  width:90%;
  max-width:800px;
  height:60%;
  overflow-y:auto;
  font-family:monospace;
  font-size:13px;
  line-height:1.4em;
  color:white;
}

/* ================= BOOT LOGO ANIMATION ================= */
#bootLogoAnimation {
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:black;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  color:white;
  z-index:1000;
}

#logoBig {
  font-size:150px;
  font-weight:bold;
  transition: transform 0.5s, opacity 0.5s;
  color:#f0f0f0;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

#logoOS {
  font-size:60px;
  font-weight:bold;
  opacity:0;
  margin-top:-30px;
  transition: opacity 0.5s, transform 0.5s;
  color:#f0f0f0;
  text-shadow: 0 0 6px rgba(255,255,255,0.5);
}

#fadedText {
  font-size:18px;
  opacity:0;
  color:white;
  margin-top:10px;
  transition: opacity 0.5s;
}

#spinner {
  margin-top:20px;
  font-size:20px;
  opacity:0;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {opacity:0.2;}
  50% {opacity:1;}
  100% {opacity:0.2;}
}

/* ================= DESKTOP ================= */
#desktop {
  display:flex;
  width:100%;
  height:100%;
  background:linear-gradient(135deg,#0f1a2b,#14243a 40%,#1a2e48 70%);
  position:relative;
  overflow:hidden;
}

/* ===== LEFT APP LIST ===== */
#appList {
  position:absolute;
  top:0;
  left:0;
  width:80px;
  height:100%;
  background:rgba(20,30,50,0.7);
  backdrop-filter:blur(10px);
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:10px 0;
  gap:15px;
  z-index:50;
  border-right:1px solid #333;
}

.dock-icon {
  width:50px;
  height:50px;
  background:rgba(255,255,255,0.1);
  display:flex;
  justify-content:center;
  align-items:center;
  border-radius:12px;
  cursor:pointer;
  font-size:24px;
  position:relative;
  transition: background 0.3s;
}

.dock-icon:hover {
  background:rgba(255,255,255,0.2);
}

.dock-icon img {
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:12px;
}

.dock-icon:hover::after {
  content:attr(data-name);
  position:absolute;
  left:60px;
  top:50%;
  transform:translateY(-50%);
  background:rgba(0,0,0,0.8);
  padding:3px 6px;
  border-radius:4px;
  font-size:12px;
  white-space:nowrap;
}

/* ===== BOTTOM APP BAR ===== */
#appBar {
  position:absolute;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  height:60px;
  display:flex;
  align-items:center;
  padding:5px;
  gap:10px;
  background:rgba(20,30,50,0.7);
  border-radius:20px;
  backdrop-filter:blur(10px);
  z-index:999;
}

/* ===== APP WINDOW ===== */
.app-window {
  position:absolute;
  width:80%;
  height:80%;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  display:flex;
  flex-direction:column;
  background:#1c2a44;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 20px 40px rgba(0,0,0,0.6),
             0 5px 15px rgba(0,0,0,0.4);
  z-index:40;
}

.title-bar {
  background:rgba(30,40,60,0.95);
  padding:6px 10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  cursor:move;
  color:white;
  font-weight:600;
}

.title-bar .buttons button {
  background:none;
  border:none;
  color:white;
  cursor:pointer;
  width:22px;
  height:22px;
  border-radius:4px;
  font-size:14px;
  margin-left:5px;
}

.title-bar .buttons button:hover {
  background:rgba(255,255,255,0.15);
}

iframe.app-frame {
  flex:1;
  border:none;
}

/* ===== MORE APPS OVERLAY ===== */
#more-apps-overlay {
  position:absolute;
  inset:0;
  background:rgba(10,15,30,0.96);
  display:none;
  z-index:1000;
  padding:30px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

#moreAppsClose {
  align-self:flex-end;
  font-size:20px;
  cursor:pointer;
  margin-bottom:20px;
}

#more-apps-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(80px,1fr));
  gap:25px;
  width:100%;
  max-width:900px;
}

.more-app-icon {
  width:70px;
  height:70px;
  background:rgba(255,255,255,0.1);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:30px;
  border-radius:12px;
  cursor:pointer;
  position:relative;
}

.more-app-icon img {
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:12px;
}

.more-app-icon:hover::after {
  content:attr(data-name);
  position:absolute;
  top:-25px;
  background:rgba(0,0,0,0.8);
  padding:3px 6px;
  border-radius:4px;
  font-size:12px;
  white-space:nowrap;
}