/* ---- Desktop ---- */
body {
  background-image: url('./Blackhole.gif');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0;
  height: 100vh;
  overflow: hidden;
}

/* ---- Top bar ---- */
.top-bar {
  position: absolute;
  width: 100%;
  display: flex;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.1);
  color: #fff;
  justify-content: space-between;
  font-family: sans-serif;
  align-items: center;
  z-index: 1000;
}

.top-bar-title {
  margin-left: 16px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.top-bar-badge {
  margin-left: 16px;
  background-color: rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: 16px;
  font-family: sans-serif;
  user-select: none;
}

.top-bar-time {
  margin-right: 16px;
  background-color: rgba(255, 255, 255, 0.125);
  padding: 4px 12px;
  border-radius: 16px;
  font-family: sans-serif;
  user-select: none;
}

/* ---- Windows ---- */
.window-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.3), 0 4px 20px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  color: white;
  font-family: sans-serif;
  min-width: 300px;
  user-select: none;
}

.window-drag-handle {
  width: 100%;
  display: flex;
  align-items: center;
  cursor: move;
  justify-content: space-between;
  margin-bottom: 15px;
}

.win-close {
  width: 16px;
  height: 16px;
  cursor: pointer;
  background-color: #EC6B5E;
  border-radius: 3px;
  margin-left: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif; 
  font-size: 10px;
  font-weight: bold;
  color: #ffffff;
  line-height: 1; 
}

.window-header-title {
  margin: 0px;
  color: #fff;
  font-weight: 500;
}

.header-spacer {
  width: 16px;
  margin-right: 6px;
  height: 16px;
}

/* ---- Window content ---- */
.window-box h1 {
  font-size: 22px;
  margin: 10px 0 5px 0;
}

.window-box h2 {
  font-size: 16px;
  font-weight: 400;
  opacity: 0.8;
  margin: 0 0 10px 0;
}

.window-box p {
  font-size: 14px;
  margin: 0 0 15px 0;
}

.window-box img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

/* ---- Dock ---- */
.dock-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 15px;
  padding: 10px 25px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.dock-container:hover {
  padding: 12px 30px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

.dock-icon {
  position: relative;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  color: white;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

.dock-icon:hover {
  transform: scale(1.25) translateY(-10px);
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.dock-icon.active-app::after {
  content: '';
  position: absolute;
  bottom: -6px;
  width: 4px;
  height: 4px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px #fff;
}

/* ---- Boot screen ---- */
.startup-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0b0d19;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.8s;
}

.startup-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.startup-content {
  text-align: center;
  color: white;
  font-family: sans-serif;
  width: 320px;
}

.boot-progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 12px;
}

.boot-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  transition: width 0.4s ease-out;
}

.startup-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  letter-spacing: 0.5px;
  font-family: monospace;
  min-height: 16px;
}

@keyframes startupFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---- Apps ---- */
.window-box { transform: none; display: flex; flex-direction: column; box-sizing: border-box; padding: 10px; }
.window-box:not(.focused) { opacity: 0.93; }
.window-box.focused { border-color: rgba(255,255,255,0.7); box-shadow: inset 0 0 10px rgba(255,255,255,0.3), 0 10px 40px rgba(0,0,0,0.55); }
/* only the focused window's iframe takes clicks; all are inert while dragging */
.window-box:not(.focused) iframe, body.dragging iframe { pointer-events: none; }

.app-container { flex: 1; min-height: 0; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,0.2); background: #111; color: #fff; display: flex; flex-direction: column; }
.app-container iframe { flex: 1; width: 100%; border: none; background: #fff; }
.pad { padding: 16px; overflow-y: auto; font-family: Arial, sans-serif; user-select: text; }
.pad img { margin-top: 10px; }
.hint { font: 11px Arial, sans-serif; color: #94a3b8; background: #1e1e1e; padding: 4px 10px; }

.browser-toolbar { display: flex; align-items: center; background: #2d2d2d; padding: 6px 10px; gap: 6px; border-bottom: 1px solid #444; }
.browser-toolbar input { flex: 1; background: #1e1e1e; border: 1px solid #555; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 13px; }
.browser-toolbar button, .nasa-btn { background: #3b82f6; border: none; color: #fff; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; text-decoration: none; }
.browser-toolbar button:hover, .nasa-btn:hover { background: #2563eb; }
.browser-toolbar button:disabled { opacity: 0.4; cursor: default; }

.launcher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; overflow-y: auto; font-family: Arial, sans-serif; background: rgba(15,23,42,0.9); }
.launcher-item { display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 14px; border-radius: 10px; cursor: pointer; transition: all 0.2s ease; text-align: center; }
.launcher-item:hover { background: rgba(59,130,246,0.2); border-color: #3b82f6; transform: translateY(-3px); }
.launcher-icon { font-size: 34px; margin-bottom: 6px; }
.launcher-title { font-weight: bold; font-size: 14px; }
.launcher-desc { color: #94a3b8; font-size: 11px; margin-top: 4px; }

.iss { padding: 12px; overflow-y: auto; font-family: Arial, sans-serif; background: linear-gradient(135deg,#0b0d19,#1a1c29); }
.iss-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; font-size: 12px; }
.iss-stats div { background: rgba(255,255,255,0.06); padding: 6px 8px; border-radius: 6px; }
.iss-stats b { display: block; font-size: 15px; color: #60a5fa; }

.term { flex: 1; background: #0c0c0c; font: 13px monospace; color: #4ade80; padding: 10px; overflow-y: auto; user-select: text; }
.term-out { white-space: pre-wrap; }
.term-line { display: flex; gap: 8px; }
.term-line input { flex: 1; background: none; border: none; outline: none; color: #fff; font: inherit; }

.notes { flex: 1; background: #fffbe6; color: #222; border: none; padding: 12px; font: 14px/1.5 Arial, sans-serif; resize: none; outline: none; }
.calc { padding: 12px; background: #1b1b1f; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.calc input { background: #000; color: #fff; border: none; border-radius: 6px; padding: 10px; font-size: 22px; text-align: right; }
.calc-keys { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-keys button { background: #2d2d33; color: #fff; border: none; border-radius: 8px; font-size: 18px; cursor: pointer; }
.calc-keys button:hover { background: #3b82f6; }

.startup-content { width: 360px; }
.startup-logo-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 8px;
  filter: drop-shadow(0 0 24px rgba(59, 130, 246, 0.45));
  animation: startupFloat 2s infinite ease-in-out;
}

.dock-icon { width: 48px; height: 48px; background: none; border: none; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.dock-icon:hover { background: none; box-shadow: 0 10px 20px rgba(0,0,0,0.45); }
.dock-icon svg, .launcher-icon svg { display: block; width: 100%; height: 100%; }
.launcher-icon { width: 52px; height: 52px; font-size: 0; }

/* ---- Theme ---- */
:root { --tint-rgb: 30, 41, 59; --window-alpha: .78; --dock-size: 43px; --accent: #60a5fa; --desktop-tint: rgba(var(--tint-rgb), var(--window-alpha)); }
:root[data-tint="violet"] { --tint-rgb: 76, 29, 149; --accent: #c4b5fd; }
:root[data-tint="neutral"] { --tint-rgb: 31, 41, 55; --accent: #d1d5db; }
.top-bar { min-height: 34px; background: rgba(12, 16, 30, .55); border-bottom-color: rgba(255,255,255,.12); box-shadow: 0 3px 14px rgba(0,0,0,.16); }
.top-bar p { font-size: 12px; }
.top-bar-badge { letter-spacing: .02em; }
.window-box { background: var(--desktop-tint); border-color: rgba(255,255,255,.2); border-radius: 11px; padding: 8px; box-shadow: 0 18px 55px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.12); }
.window-header-title { font-size: 12px; letter-spacing: .02em; }
.window-drag-handle { min-height: 26px; margin-bottom: 7px; }
.app-container { border-color: rgba(255,255,255,.13); }
.dock-container { bottom: 12px; gap: 9px; padding: 8px 14px; background: rgba(14,18,32,.55); border-color: rgba(255,255,255,.16); }
.dock-icon { width: var(--dock-size); height: var(--dock-size); }
.dock-icon.active-app::after { bottom: -4px; }
.iss { height: 100%; box-sizing: border-box; padding: 12px; background: #0b1220; color: #e5edf8; display: flex; flex-direction: column; gap: 10px; }
.iss-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:12px; letter-spacing:.06em; }
.iss-toolbar strong { font-size:12px; }
.iss-live { margin-left:12px; color:#86efac; font-size:10px; letter-spacing:.04em; white-space:nowrap; }
.iss-live i { display:inline-block; width:6px; height:6px; margin-right:5px; border-radius:50%; background:#4ade80; box-shadow:0 0 8px #4ade80; }
.iss-recenter { border:1px solid #334155; background:#172033; color:#dbeafe; border-radius:6px; padding:6px 10px; cursor:pointer; }
.iss-recenter:hover { background:#243550; }
.iss-map { flex:1; min-height:220px; width:100%; border:1px solid #334155; border-radius:7px; overflow:hidden; background:#0c1729; }
.iss-map .leaflet-container { width:100%; height:100%; background:#0c1729; font:12px Arial,sans-serif; }
.iss-map .leaflet-control-attribution { font-size:9px; }
.iss-map-icon { background:transparent; border:0; }
.iss-map-icon span { display:flex; width:32px; height:32px; justify-content:center; align-items:center; border-radius:50%; font-size:20px; background:rgba(15,23,42,.85); border:1px solid #93c5fd; box-shadow:0 0 18px rgba(96,165,250,.55); }
.iss-stats { grid-template-columns:repeat(6,minmax(0,1fr)); gap:7px; margin:0; }
.iss-stat { min-width:0; background:#111d30; border:1px solid #24344b; padding:8px; border-radius:6px; }
.iss-stat span { display:block; color:#94a3b8; font-size:10px; margin-bottom:5px; }
.iss-stat b { display:block; font-size:13px; color:#bfdbfe; overflow-wrap:anywhere; }
.iss-footer { display:flex; justify-content:space-between; gap:8px; color:#8493a8; font-size:10px; }
.iss-links { display:flex; gap:7px; }
.iss-links .nasa-btn { background:#1d4ed8; padding:7px 10px; }
.calendar-app,.files-app,.settings-app { height:100%; box-sizing:border-box; padding:15px; overflow:auto; background:#101827; color:#e5edf8; font:13px Arial,sans-serif; }
.calendar-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.calendar-head strong { font-size:16px; }
.calendar-head button,.setting-options button,.settings-reset { border:1px solid #334155; border-radius:6px; padding:6px 11px; color:#e5edf8; background:#1e293b; cursor:pointer; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; }
.weekday { text-align:center; color:#94a3b8; font-size:11px; padding:5px; }
.calendar-day { min-height:34px; border:1px solid transparent; border-radius:6px; background:#182438; color:#e2e8f0; cursor:pointer; }
.calendar-day:hover,.calendar-day.selected { background:#1d4ed8; border-color:#60a5fa; }
.calendar-day.today { outline:1px solid #60a5fa; }
.calendar-day.has-event::after { content:""; display:block; width:4px; height:4px; border-radius:50%; margin:2px auto 0; background:#fbbf24; }
.calendar-agenda { border-top:1px solid #334155; margin-top:15px; padding-top:12px; display:grid; gap:8px; }
.calendar-agenda span { color:#94a3b8; }
.calendar-agenda input { padding:9px; border-radius:6px; border:1px solid #334155; background:#0b1220; color:#fff; }
.event-list p { margin:5px 0; }
.files-path { background:#0b1220; border:1px solid #273449; padding:9px 11px; border-radius:6px; color:#94a3b8; margin-bottom:10px; }
.files-list { display:grid; gap:5px; }
.file-row { width:100%; display:flex; align-items:center; gap:10px; padding:10px; text-align:left; background:#172235; border:1px solid transparent; color:#e5edf8; border-radius:7px; cursor:pointer; }
.file-row:hover { background:#20314b; border-color:#3b82f6; }
.file-symbol { font-size:21px; color:#93c5fd; width:25px; text-align:center; }
.file-row span:nth-child(2) { display:grid; gap:3px; flex:1; }
.file-row small,.files-foot { color:#94a3b8; font-size:11px; }
.file-arrow { color:#64748b; }
.settings-app h2 { font-size:13px; margin:5px 0 8px; color:#bfdbfe; }
.settings-app p { color:#94a3b8; margin:0 0 12px; }
.settings-app label { display:flex; align-items:center; gap:8px; }
.setting-options { display:flex; gap:8px; }
.setting-options button:hover,.settings-reset:hover { border-color:#60a5fa; }
.setting-options button.active { background:#1d4ed8; border-color:#60a5fa; }
.setting-options { flex-wrap:wrap; margin-bottom:16px; }
.settings-app label { margin:10px 0; }
.settings-app input[type=range] { width:100%; accent-color:#60a5fa; margin-bottom:16px; }
.settings-app .opacity-value { color:#bfdbfe; margin-left:6px; }
.settings-app h2 { margin-top:14px; }
.settings-app h2:first-child { margin-top:0; }
html.reduce-motion * { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
@media(max-width:700px) {
  .window-box { min-width:0; max-width:calc(100vw - 12px); max-height:calc(100vh - 100px); }
  .iss-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .iss-live { display:none; }
  .dock-container { max-width:calc(100vw - 20px); gap:5px; padding:6px 8px; }
  .dock-icon { width:36px; height:36px; }
}


/* ---- Window controls ---- */
.window-controls { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.window-controls button { width:18px; height:18px; padding:0; border:0; border-radius:50%; color:#fff; font:bold 13px/18px Arial,sans-serif; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.window-controls .win-close { background:#ec6b5e; margin:0; font-size:12px; }
.window-controls .win-minimize { background:#eab308; }
.window-controls .win-maximize { background:#22c55e; }
.window-controls button:hover { filter:brightness(1.2); }
.window-header-title { flex:1; text-align:center; }
.header-spacer { width:60px; flex-shrink:0; }
.window-box.maximized { border-radius:8px; }

.dock-icon,
.app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-icon svg,
.app-icon svg {
  display: block;
  margin: auto;
}

/* ---- Who Am I ---- */
.whoami { height:100%; box-sizing:border-box; padding:18px; overflow:auto; background:#101827; color:#e5edf8; font:13px/1.5 Arial,sans-serif; user-select:text; }
.whoami-head { display:flex; align-items:center; gap:14px; margin-bottom:6px; }
.whoami-photo { width:72px; height:72px; flex-shrink:0; border-radius:50%; object-fit:cover; display:flex; align-items:center; justify-content:center; font-size:26px; font-weight:bold; background:linear-gradient(135deg,#60a5fa,#7c3aed); }
.whoami h1 { margin:0 0 3px; font-size:22px; }
.whoami h2 { margin:18px 0 6px; font-size:13px; color:#bfdbfe; }
.whoami p { margin:0; color:#94a3b8; }
.whoami .whoami-about { color:#e5edf8; }
.whoami dl { display:grid; grid-template-columns:110px 1fr; gap:6px 12px; margin:0; }
.whoami dt { color:#94a3b8; }
.whoami dd { margin:0; overflow-wrap:anywhere; }
.whoami a { color:#93c5fd; }