/* ============================================================
   DmytroOS — base / reset
   ============================================================ */

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

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  font-family: var(--font-sys);
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--text-1);
  background: #000;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

img { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--selection); }

/* mode gating — JS sets <html data-mode="desktop|ios"> */
[data-mode="ios"] #desktop { display: none; }
[data-mode="desktop"] #ios { display: none; }

[hidden] { display: none !important; }

/* No-JS / crawler fallback: the full text version of DmytroOS, generated into
   the <noscript> by tools/build_seo.js. Only rendered when JS is off. */
.noscript-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  background: var(--win-bg);
  color: var(--text-1);
  line-height: 1.5;
}
.noscript-content h1 { font-size: 26px; margin-bottom: 8px; }
.noscript-content h2 { font-size: 20px; margin: 30px 0 10px; border-top: 1px solid var(--separator); padding-top: 16px; }
.noscript-content h3 { font-size: 16px; margin-top: 16px; }
.noscript-content p { margin: 4px 0; }
.noscript-content ul { margin: 6px 0 6px 20px; }
.noscript-content a { color: var(--accent); }

/* selectable text inside app content */
.app-body, .app-body * { user-select: text; }

/* unread badge on app icons (dock + springboard) */
.app-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.app-badge.is-blinking { animation: badge-blink 1.1s ease-in-out infinite; }
@keyframes badge-blink { 50% { opacity: .15; } }

/* Processed game icons are already full-bleed app art.
   Keep OS chrome from wrapping them in a second tile or heavy shadow. */
.game-icon-img {
  display: block;
  padding: 0;
  background: transparent;
  object-fit: cover;
}

.fg-icon.game-icon-img,
.gd-icon.game-icon-img,
.si-gicon.game-icon-img,
.dock-item img.game-icon-img,
.sp-row img.game-icon-img,
.sb-icon img.game-icon-img {
  box-shadow: none;
}

/* scrollbars (WebKit) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(128, 128, 134, .5); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
