* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-purple: #c084fc;
  --secondary-pink: #f0abfc;
  --glass-bg: rgba(0, 0, 0, 0.25);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --frost-bg: rgba(0, 0, 0, 0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  color: var(--text-primary);
}

::selection {
  background: rgba(192, 132, 252, 0.3);
  color: white;
}

::-moz-selection {
  background: rgba(192, 132, 252, 0.3);
  color: white;
}

/* Boot Screen - macOS Style */
.boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 1s ease-out;
  /* Hide cursor during boot */
  cursor: none;
}

.boot-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.boot-content {
  text-align: center;
  animation: bootFadeIn 1.5s ease-out;
}

.boot-logo {
  margin-bottom: 60px;
}

.boot-logo-img {
  width: 80px;
  height: 80px;
  animation: logoGlow 2s ease-in-out infinite alternate;
}

.boot-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: white;
  border-radius: 2px;
  width: 0%;
  animation: progressFill 3s ease-out forwards;
}

@keyframes bootFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoGlow {
  from {
    opacity: 0.8;
  }
  to {
    opacity: 1;
  }
}

@keyframes progressFill {
  to {
    width: 100%;
  }
}

/* Liquid Background */
.liquid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("wallpaper.jpeg") center / cover no-repeat;
  overflow: hidden;
  z-index: 0;
  transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Blur effect for lockscreen */
.lockscreen .liquid-bg {
  filter: blur(8px);
}

.desktop .liquid-bg {
  filter: blur(0px);
}

/* Lockscreen */
.lockscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.lockscreen.active {
  opacity: 1;
  pointer-events: all;
}

.lockscreen-content {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  transform: translateY(20px);
}

/* Lockscreen power button */
.lockscreen-power-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  color: white;
}

.lockscreen-power-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lockscreen-power-btn:active {
  transform: scale(0.95);
}

/* Lockscreen power menu */
.lockscreen-power-menu {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.lockscreen-power-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.power-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.power-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.power-menu-btn.shutdown {
  color: #ef4444;
}

.power-menu-btn.shutdown:hover {
  background: rgba(239, 68, 68, 0.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.time-display {
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-display.moved-up {
  transform: translateY(-80px);
}

.time-display .time {
  font-size: 120px;
  font-weight: 300;
  letter-spacing: -2px;
  margin-bottom: 8px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.time-display .date {
  font-size: 28px;
  font-weight: 400;
  color: var(--text-secondary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.unlock-indicator {
  margin-top: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 16px;
  color: var(--text-secondary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

/* Updated code entry styles for simple input */
.code-entry {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-entry.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.code-input {
  width: 320px;
  max-width: 80vw;
  padding: 18px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  border: 2px solid var(--glass-border);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 400;
  text-align: center;
  outline: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.code-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.code-input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.code-hint {
  font-size: 15px;
  color: var(--text-secondary);
  opacity: 0.8;
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
}

.code-dots {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.code-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.code-dot.filled {
  background: white;
  border-color: white;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.code-dot.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-8px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(8px);
  }
}

.code-message {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-message.error {
  color: #ef4444;
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.numpad-btn {
  width: 70px;
  height: 70px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: white;
  font-size: 24px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.numpad-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.numpad-btn:active {
  transform: scale(0.95);
}

.numpad-btn.delete-btn,
.numpad-btn.enter-btn {
  background: rgba(255, 255, 255, 0.08);
}

.numpad-btn.enter-btn:hover {
  background: linear-gradient(135deg, var(--primary-purple), var(--secondary-pink));
}

.swipe-area {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  cursor: grab;
  z-index: 3;
}

.swipe-area:active {
  cursor: grabbing;
}

/* Desktop */
.desktop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop.active {
  opacity: 1;
  transform: scale(1);
}

/* Islands */
.island {
  position: absolute;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--frost-bg);
  backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  z-index: 100;
  animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.island:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.left-island {
  left: 20px;
}

.right-island {
  right: 20px;
}

.right-island .status-icons svg {
  opacity: 0.6;
}

.right-island .time-display {
  opacity: 0.8;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-purple), var(--secondary-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.username {
  font-size: 14px;
  font-weight: 500;
}

.island-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.island-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-icons svg {
  opacity: 0.9;
}

.status-icons .time-display {
  font-size: 14px;
  font-weight: 500;
  margin-left: 4px;
}

/* Windows Container */
.windows-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 80px;
  z-index: 10;
}

/* Notifications Stack */
.notifications-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.notification {
  background: var(--frost-bg);
  backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateX(400px) scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 350px;
  min-width: 280px;
  pointer-events: all;
}

.notification.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.notification:not(:last-child) {
  transform: translateX(0) scale(0.95);
  opacity: 0.8;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-purple), var(--secondary-pink));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.notification-text {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  user-select: text;
}

.window {
  position: absolute;
  width: 700px;
  max-width: 90vw;
  height: 500px;
  max-height: 70vh;
  background: var(--frost-bg);
  backdrop-filter: blur(50px) saturate(1.8);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
  animation: windowAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 50;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.window.dragging {
  transition: none;
  will-change: transform;
}

.window.focused {
  z-index: 100;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@keyframes windowAppear {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.window-header {
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--glass-border);
  cursor: move;
}

.window-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.window-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.8);
}

.window-content {
  height: calc(100% - 48px);
  padding: 24px;
  overflow-y: auto;
}

/* Settings Window */
.settings-section {
  margin-bottom: 32px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.setting-row:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.setting-info {
  flex: 1;
}

.setting-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.setting-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle input:checked + .toggle-slider {
  background: rgba(255, 255, 255, 0.3);
}

.toggle input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.slider {
  width: 140px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.text-input {
  width: 180px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.select-input {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.select-input option {
  background: #333;
  color: white;
}

.select-input:hover {
  background: rgba(255, 255, 255, 0.08);
}

.select-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
