* { box-sizing: border-box; user-select: none; }
html,body {
  height: 100%;
  margin:0;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial;
  background:#0b1220;
  color:#fff;
  overflow:hidden;
}

#desktop {
  width: 100%;
  height: 100vh;
  background-image: url('images/wallpaper1920by1080.png');
  background-size: cover;
  background-position: center;
  position: relative;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#desktop::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(0.8px) saturate(140%);
  background: rgba(11,18,32,0.25);
  z-index: 0;
}

#desktop-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.desktop-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(125,211,252,0.15);
  opacity: 0;
  animation: particleMove linear infinite;
}

@keyframes particleMove {
  0% { transform: translateY(0px) translateX(0px); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-400px) translateX(200px); opacity: 0; }
}

.shape {
  position: absolute;
  width: var(--size, 50px);
  height: var(--size, 50px);
  background: rgba(125,211,252,0.05);
  border-radius: 50%;
  left: var(--left, 50%);
  top: var(--top, 50%);
  animation: floatShape linear infinite;
  animation-duration: var(--duration, 30s);
  z-index: 0;
}

@keyframes floatShape {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-40px) rotate(180deg); }
  100% { transform: translateY(0) rotate(360deg); }
}

#boot-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,8,20,0.95), rgba(0,0,0,0.95));
  z-index: 9999;
  opacity: 1;
}
#boot-logo { font-size: 3em; color: #7dd3fc; font-weight: 700; }
#boot-logo span { color:#c7f9ff; }
.boot-text { margin-top: 8px; color: #cbd5e1; opacity: 0.95; }

#boot-screen.fade-out { animation: bootFade 0.9s forwards; }
@keyframes bootFade { to { opacity:0; pointer-events:none; } }

#login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: linear-gradient(135deg, #0b1220, #1a1f36, #0b1220);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  overflow: hidden;
  backdrop-filter: blur(18px);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#particle-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(125,211,252,0.5);
  opacity: 0;
  animation: particleMove linear infinite;
}

#login-box {
  position: relative;
  background: rgba(35,35,55,0.5);
  padding: 42px 52px;
  border-radius: 20px;
  border: 1px solid rgba(125,211,252,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 420px;
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translateY(-30px) scale(0.975);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow: inset 0 0 6px rgba(255,255,255,0.05),
              0 0 16px rgba(125,211,252,0.15),
              0 8px 12px rgba(0,0,0,0.3);
  animation: loginBoxPulse 6s ease-in-out infinite alternate,
             loginBoxIn 0.8s ease forwards;
}

@keyframes loginBoxPulse {
  0% {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 0 16px rgba(14,165,233,0.2),
                0 0 20px rgba(124,58,237,0.15);
  }
  100% {
    transform: translateY(1px) scale(1.005);
    box-shadow: 0 0 22px rgba(14,165,233,0.25),
                0 0 28px rgba(124,58,237,0.2);
  }
}

#login-box h2 {
  margin-bottom: 25px;
  color: #7dd3fc;
  font-size: 1.55rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 4px rgba(125,211,252,0.2);
  animation: fadeIn 0.8s ease forwards;
}

#login-box input {
  width: 100%;
  padding: 14px 16px;
  margin: 10px 0;
  border-radius: 12px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: rgba(255,255,255,0.04);
  color: #fff;
  transition: all 0.3s ease, box-shadow 0.4s ease;
  border-bottom: 2px solid rgba(255,255,255,0.15);
}

#login-box input:focus {
  transform: scale(1.02);
  border-color: #0ea5e9;
  box-shadow: 0 2px 10px rgba(14,165,233,0.3);
}

#login-buttons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 18px;
}

#login-buttons button {
  flex: 1;
  margin: 0 6px;
  padding: 12px 0;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg,#0ea5e9,#7c3aed,#0ea5e9);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  background-size: 200% 100%;
  transition: all 0.25s ease, background-position 1.5s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 4px rgba(0,255,255,0.1);
}

#login-buttons button:hover {
  transform: scale(1.03);
  background-position: 100% 0;
  box-shadow: 0 0 14px rgba(125,211,252,0.25);
}

#login-error {
  margin-top: 14px;
  color: #f87171;
  font-size: 0.88rem;
}

.hidden { display: none; }

@keyframes loginBoxIn {
  from { opacity: 0; transform: translateY(-30px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

#desktop-icons {
  position:absolute; top:22px; left:22px;
  display:flex; flex-direction:column; gap:18px;
  z-index: 2;
}
.icon {
  width:88px; text-align:center; color:white; cursor:pointer;
  padding:6px; border-radius:8px;
  transition: background .12s, transform .08s, box-shadow .2s ease;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.icon img { width:48px; height:48px; margin:0 auto 6px; display:block; }
.icon:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
  box-shadow: 0 0 2px rgba(0,255,255,0.08);
}

#taskbar {
  position:absolute; bottom:10px; left:10px; right:10px; height:50px;
  display:flex; align-items:center; justify-content:space-between;
  padding:6px 10px; border-radius:14px;
  background: rgba(10, 12, 20, 0.55);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45),
              inset 0 1px 0 rgba(255,255,255,0.05),
              0 0 4px rgba(0,255,255,0.05);
  backdrop-filter: blur(10px) saturate(160%);
  z-index: 2;
}

#start-button {
  width:40px; height:36px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,0.04);
  border:none; color:#e6f7ff; font-size:18px; cursor:pointer;
  transition: transform .2s, box-shadow .3s;
}
#start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 4px rgba(0,255,255,0.1);
}

#taskbar-apps { display:flex; gap:8px; align-items:center; margin-left:6px; }
.tb-app {
  min-width:44px; height:36px; padding:6px 8px;
  border-radius:8px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,0.03);
  color:#eaf6ff; font-size:16px;
  transition: box-shadow .3s, background .3s;
}
.tb-app.active {
  background: linear-gradient(90deg,#4f46e5,#06b6d4);
  box-shadow: 0 0 6px rgba(0,255,255,0.12);
}
.tb-app:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 4px rgba(0,255,255,0.1);
}

#start-menu {
  position: absolute;
  bottom: 72px;
  left: 16px;
  min-width: 570px;
  width: max-content;
  background: rgba(8, 10, 16, 0.55);
  border-radius: 14px;
  padding: 14px 16px;
  display: none;
  box-shadow: 0 0 6px rgba(0,255,255,0.05);
  backdrop-filter: blur(18px) saturate(140%);
  transition: opacity 0.2s ease;
}
#start-menu h3 {
  margin: 0 0 10px 0;
  color: #7dd3fc;
  font-size: 1.05em;
  display: inline-block;
  text-shadow: 0 0 1px rgba(0,255,255,0.08);
}
.start-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: #d9eafb;
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 8px;
  transition: background .2s, box-shadow .2s;
}
#start-menu h3 + .start-item { margin-left: 8px; }
.start-item:last-child { margin-right: 0; }
.start-item:hover {
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 2px rgba(0,255,255,0.05);
}

.window {
  position:absolute;
  width:560px; height:360px;
  border-radius:12px; overflow:hidden;
  box-shadow: 0 0 8px rgba(0,255,255,0.05), 0 10px 20px rgba(0,0,0,0.45);
  background: rgba(250,250,255,0.12);
  color:#e8eefc;
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(22px) saturate(160%);
  transition: box-shadow 0.3s;
}
.window:hover { box-shadow: 0 0 10px rgba(0,255,255,0.08), 0 10px 24px rgba(0,0,0,0.45); }

.titlebar {
  height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 10px;
  cursor: move;
  background: linear-gradient(90deg, rgba(14,165,233,0.85), rgba(124,58,237,0.85));
  color:white;
  font-weight:600;
  text-shadow: 0 0 1px rgba(0,255,255,0.08);
}
.titlebar .title { font-size: 0.95rem; }
.titlebar button {
  border:none; background:transparent;
  color:white; font-size:1rem;
  cursor:pointer; padding:4px 8px; border-radius:6px;
  transition: background .2s, box-shadow .2s;
}
.titlebar button:hover {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 2px rgba(0,255,255,0.08);
}

.content {
  padding:12px;
  height: calc(100% - 38px);
  overflow:auto;
}

textarea {
  width:100%; height:100%;
  border:none; outline:none; resize:none;
  background: rgba(255,255,255,0.1);
  font-family: Consolas, "Courier New", monospace;
  font-size:14px; padding:10px;
  color:#e6f7ff; border-radius:6px;
}

#termout {
  background: rgba(0,10,25,0.8);
  color:#9ae6b4;
  padding:8px;
  border-radius:6px;
  font-family:monospace;
  white-space:pre-wrap;
  min-height:140px;
  box-shadow: inset 0 0 4px rgba(0,255,255,0.05);
}
#termin {
  width:100%;
  margin-top:8px;
  padding:8px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color:#e6f7ff;
}

#notifications {
  position:fixed; top:12px; right:12px;
  display:flex; flex-direction:column; gap:8px; z-index:20000;
}
.notification {
  background: rgba(40,40,70,0.85);
  padding:10px 14px;
  border-radius:10px;
  box-shadow: 0 4px 8px rgba(0,255,255,0.05);
  color:#fff;
  font-size:0.9rem;
  animation:notifyShow 0.4s ease forwards;
}

.explorer-button {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #e6f7ff;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.explorer-button:hover {
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 4px rgba(255,255,255,0.08);
  transform: translateY(-1px);
}
.explorer-button:active {
  background: rgba(255,255,255,0.15);
  box-shadow: inset 0 0 3px rgba(0,0,0,0.05);
  transform: translateY(0);
}

@keyframes notifyShow { from { opacity:0; transform: translateY(-12px);} to {opacity:1; transform: translateY(0);} }
