/* ===== Banana OS — shared styles ===== */
:root {
  --accent: #f6c90e;
  --accent-hover: #ffd83a;
  --accent-text: #1d1600;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.72);
  --acrylic: rgba(30, 30, 34, 0.72);
  --acrylic-strong: rgba(36, 36, 40, 0.86);
  --stroke: rgba(255, 255, 255, 0.09);
  --field: rgba(255, 255, 255, 0.08);
  --field-hover: rgba(255, 255, 255, 0.12);
  --danger: #ff99a4;
  --radius: 8px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ===== Wallpaper ===== */
.wallpaper {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #ffffff;
  transition: filter 0.45s ease, transform 0.45s ease;
}
.wallpaper img {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(86vmin, 1100px);
  transform: translate(-50%, -50%) rotate(-10deg);
  pointer-events: none;
  -webkit-user-drag: none;
  transition: opacity 0.45s ease;
}
/* Sign-in screens: fade the banana instead of blurring it, so the background stays pure white. */
.wallpaper.blurred img { opacity: 0.22; }

/* ===== Common bits ===== */
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #d9d9de, #9fa0a8);
  color: #fff;
  overflow: hidden;
  flex: none;
}
.avatar svg { width: 55%; height: 55%; }
.avatar.initials { background: linear-gradient(145deg, #f8d548, #d9a400); color: var(--accent-text); font-weight: 600; }
.avatar.xl { width: 192px; height: 192px; font-size: 64px; }
.avatar.lg { width: 120px; height: 120px; font-size: 44px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.xs { width: 36px; height: 36px; font-size: 15px; }

.btn {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 6px 18px;
  min-height: 32px;
  transition: background 0.12s;
}
.btn:hover { background: rgba(255, 255, 255, 0.16); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* Owner tag: yellow pill with a crown */
.owner-tag {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  padding: 1px 7px 1px 5px; margin-left: 6px; border-radius: 999px;
  background: linear-gradient(145deg, #ffe066, #f2b705); color: #3a2c00;
  font-size: 11px; font-weight: 700; line-height: 16px; letter-spacing: 0.02em;
  vertical-align: 0.1em; white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(242, 183, 5, 0.35);
}
.owner-tag svg { width: 12px; height: 12px; }
.owner-tag.lg { font-size: 14px; line-height: 20px; padding: 3px 12px 3px 9px; gap: 5px; margin: 0; }
.owner-tag.lg svg { width: 16px; height: 16px; }

/* Windows "dots" spinner */
.dots { position: relative; width: 40px; height: 40px; }
.dots i { position: absolute; inset: 0; opacity: 0; animation: orbit 5.5s infinite; }
.dots i::before {
  content: ""; position: absolute; left: 50%; top: 0;
  width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor;
}
.dots i:nth-child(2) { animation-delay: 0.24s; }
.dots i:nth-child(3) { animation-delay: 0.48s; }
.dots i:nth-child(4) { animation-delay: 0.72s; }
.dots i:nth-child(5) { animation-delay: 0.96s; }
.dots.small { width: 20px; height: 20px; }
.dots.small i::before { width: 3px; height: 3px; margin-left: -1.5px; }
@keyframes orbit {
  0%   { transform: rotate(225deg); opacity: 1; animation-timing-function: ease-out; }
  7%   { transform: rotate(345deg); animation-timing-function: linear; }
  30%  { transform: rotate(455deg); animation-timing-function: ease-in-out; }
  39%  { transform: rotate(690deg); animation-timing-function: linear; }
  70%  { transform: rotate(815deg); opacity: 1; animation-timing-function: ease-out; }
  75%  { transform: rotate(945deg); animation-timing-function: ease-out; }
  76%  { transform: rotate(945deg); opacity: 0; }
  100% { transform: rotate(945deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .dots i { opacity: 1; }
}
