/* ==========================================================================
   Familiar OS – hybrid nostalgic style
   ========================================================================== */

:root {
  --bg: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  --glass: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.12);
  --accent: #00aaff;
  --text: #f0f4f8;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
}

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

body {
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  background-attachment: fixed;
  cursor: default;
}

/* Boot screen */
.boot-screen {
  position: fixed;
  inset: 0;
  background: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s;
  z-index: 9999;
}

.logo {
  font-size: 4.5rem;
  font-weight: bold;
  color: #00ccff;
  text-shadow: 0 0 30px #00aaff;
  margin-bottom: 2rem;
}

.loading-bar {
  width: 320px;
  height: 4px;
  background: #222;
  border-radius: 2px;
  overflow: hidden;
}

.bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #00aaff, #00ffcc);
  animation: load 2.5s forwards;
}

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

.status {
  margin-top: 1.5rem;
  opacity: 0.7;
  font-size: 0.95rem;
}

/* Login */
.login-container {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 360px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-box h1 {
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

input {
  display: block;
  width: 100%;
  padding: 0.9rem;
  margin: 0.8rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 1rem;
}

button {
  width: 100%;
  padding: 0.95rem;
  margin-top: 1rem;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

button:hover { background: #00ccff; }

.error { color: #ff6b6b; margin-bottom: 1rem; }

.small { font-size: 0.82rem; opacity: 0.7; margin-top: 1.2rem; }

/* ── Desktop ─────────────────────────────────────────────── */

.desktop {
  height: 100vh;
  background: var(--bg);
  position: relative;
}

.status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28px;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font-size: 0.82rem;
  z-index: 100;
}

.clock { font-weight: 500; }

.tray span { margin-left: 12px; }

/* Shade (pull from top) */
.shade {
  position: absolute;
  top: -100%; left: 0; right: 0;
  background: rgba(30,40,60,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: top 0.4s cubic-bezier(0.23,1,0.32,1);
  z-index: 90;
  padding: 1rem;
}

.shade.open { top: 0; }

.quick-settings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quick-settings button {
  padding: 1.2rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: white;
}

.notifications .notif {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

/* Icons & preview folders */
.icons {
  position: absolute;
  top: 50px; left: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 1.8rem;
  padding: 1rem;
}

.icon {
  width: 80px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.icon:hover { transform: scale(1.12); }

.icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.icon span {
  display: block;
  font-size: 0.78rem;
  background: rgba(0,0,0,0.4);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.large img { width: 72px; height: 72px; }
.large span { font-weight: 600; }

/* Preview folder style */
.preview-folder {
  width: 140px;
  height: 140px;
  background: rgba(40,60,90,0.25);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.preview-folder .tile {
  background: var(--glass);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  text-align: center;
  padding: 4px;
}

.preview-folder .big {
  grid-column: span 2;
  font-size: 0.9rem;
  font-weight: bold;
}

/* Taskbar */
.taskbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(20,30,50,0.75);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}

.start {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 10px;
  font-weight: bold;
  margin-right: 2rem;
  cursor: pointer;
}

.pinned {
  display: flex;
  gap: 1.4rem;
}

.pinned img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  transition: 0.2s;
}

.pinned img:hover {
  transform: scale(1.25);
  box-shadow: 0 0 20px rgba(0,170,255,0.5);
}

.tray-right {
  margin-left: auto;
  font-size: 0.85rem;
}