/* ============================================================
   Authentic Windows 7 Boot & Login Screens
   ============================================================ */

/* ===== WIN 7 BOOT SCREEN ===== */
#boot-screen {
  position: fixed; inset: 0;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: var(--z-boot);
  transition: opacity 0.6s ease;
}
#boot-screen.fade-out { opacity: 0; pointer-events: none; }

.boot-logo-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 200px;
}

/* Windows 7 Four-Color Glowing Orbs Animation */
.win7-boot-logo {
  width: 100px; height: 100px;
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  animation: pulseLogo 3s infinite alternate ease-in-out;
}

.win7-boot-logo > div {
  width: 40px; height: 40px;
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  animation: flyIn 3s forwards ease-in-out;
}
.win7-glow-red { background: #ff5533; top: 5px; left: 5px; animation-delay: 0s; }
.win7-glow-green { background: #44cc44; top: 5px; right: 5px; animation-delay: 0.2s; }
.win7-glow-blue { background: #33aaff; bottom: 5px; left: 5px; animation-delay: 0.4s; }
.win7-glow-yellow { background: #ffcc00; bottom: 5px; right: 5px; animation-delay: 0.6s; }

@keyframes flyIn {
  0% { transform: translate(100px, 100px) scale(0); opacity: 0; }
  50% { transform: translate(0, 0) scale(1); opacity: 1; filter: blur(5px); }
  100% { transform: translate(0, 0) scale(1.1); filter: blur(8px); }
}

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

/* ===== WIN 7 LOGIN SCREEN ===== */
#login-screen {
  position: fixed; inset: 0;
  /* Windows 7 default light blue swirl background */
  background: radial-gradient(circle at 50% 50%, #4da0f0 0%, #1040a0 100%);
  display: flex; flex-direction: column;
  z-index: calc(var(--z-boot) - 1);
  font-family: 'Segoe UI', Tahoma, sans-serif;
  opacity: 0; pointer-events: none;
  transition: opacity 0.8s ease;
}
#login-screen.visible { opacity: 1; pointer-events: all; }
#login-screen.fade-out { opacity: 0; pointer-events: none; }

/* In Win 7, login screen has no top/bottom bars, just center content */
.login-topbar { display: none; }
.login-bottombar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
}

.login-turn-off-btn {
  width: 40px; height: 40px;
  background: rgba(255, 50, 50, 0.8);
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: all 0.2s;
}
.login-turn-off-btn:hover { background: #ff3333; box-shadow: 0 0 15px rgba(255,100,100,0.8); }

.login-bottombar-text { color: rgba(255,255,255,0.7); font-size: 24px; font-weight: 300; }

/* Center Content - Windows 7 Style */
.login-center {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
}

.login-left { display: none; } /* Hide XP left panel */

.login-right {
  display: flex; flex-direction: row;
  align-items: center; justify-content: center;
  gap: 30px;
}

/* User Profile Item - Windows 7 Glass Box */
.login-user-item {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  cursor: pointer;
  padding: 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
  width: 180px;
}
.login-user-item:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.4), 0 4px 10px rgba(0,0,0,0.2);
}

.login-user-avatar {
  width: 90px; height: 90px;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 5px; /* Win7 avatars were slightly rounded squares */
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  object-fit: cover;
}

.login-user-info { display: flex; flex-direction: column; align-items: center; }
.login-user-name {
  color: #fff; font-size: 20px; font-weight: normal;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.login-user-sub {
  color: #ccc; font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* ===== WIN 7 SHUTDOWN DIALOG OVERLAY ===== */
#shutdown-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}
#shutdown-overlay.visible { opacity: 1; pointer-events: all; }

.shutdown-dialog {
  width: 380px;
  background: rgba(200, 220, 240, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  padding: 0; overflow: hidden;
}

.shutdown-title {
  padding: 12px 16px; color: #000; font-size: 14px; font-weight: 500;
  background: rgba(255,255,255,0.4); border-bottom: 1px solid rgba(255,255,255,0.5);
}

.shutdown-content {
  padding: 30px 20px;
  display: flex; justify-content: space-evenly;
}

.shutdown-btn-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.shutdown-btn {
  width: 50px; height: 50px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: all 0.15s;
}
.shutdown-btn-wrap:hover .shutdown-btn { transform: scale(1.05); box-shadow: 0 6px 15px rgba(0,0,0,0.3); }
.shutdown-btn.restart { background: linear-gradient(180deg, #ff9900 0%, #cc7700 100%); }
.shutdown-btn.turnoff { background: linear-gradient(180deg, #ff4444 0%, #cc0000 100%); }
.shutdown-btn-label { color: #222; font-size: 12px; font-weight: 500; }

.shutdown-footer {
  padding: 12px; display: flex; justify-content: flex-end;
  background: rgba(255,255,255,0.3); border-top: 1px solid rgba(255,255,255,0.5);
}
.shutdown-cancel {
  padding: 6px 20px; font-family: 'Segoe UI', sans-serif; font-size: 12px;
  background: rgba(255,255,255,0.8); border: 1px solid #aaa; border-radius: 4px; cursor: pointer;
}
.shutdown-cancel:hover { background: #fff; border-color: #3399ff; box-shadow: 0 0 5px rgba(51,153,255,0.5); }

@media (max-width: 600px) {
  .login-right { flex-direction: column; }
  .login-bottombar { justify-content: center; }
  .login-bottombar-text { display: none; }
}

/* ===== PRE-BOOT SCREEN ===== */
#pre-boot-screen {
  position: fixed; inset: 0;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 999999;
  cursor: pointer;
  color: #fff;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  transition: opacity 0.5s ease;
}
.pre-boot-content {
  text-align: center;
  animation: pulse 2s infinite ease-in-out;
}
.pre-boot-icon {
  font-size: 48px;
  margin-bottom: 15px;
}
.pre-boot-title {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 1px;
}
@keyframes pulse {
  0% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.6; transform: scale(1); }
}
