/* ======================================================================================
   ANIMATIONS
   ====================================================================================== */

.icon-hidden {
  opacity: 0;
  transform: translateY(6px);
}

.icon-fade-in {
  animation: iconFadeIn 420ms ease-out forwards;
}

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

#desktop {
  animation: desktopFadeIn 300ms ease-out both;
}

@keyframes desktopFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.scale-in-center {
  animation: scale-in-center .77s cubic-bezier(.25,.46,.45,.94) both;
}

@keyframes scale-in-center {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.slide-in-top {
  animation: slide-in-top .5s cubic-bezier(.165,.84,.44,1) both;
}

@keyframes slide-in-top {
  0% {
    transform: translateY(-1000px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.login-fade-out {
  animation: loginFadeOut 1100ms cubic-bezier(0.2, 0.65, 0.25, 1) forwards;
  pointer-events: none;
  will-change: opacity, transform, filter;
}

@keyframes loginFadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  60% {
    opacity: 1;
    transform: scale(0.995);
    filter: blur(0.4px);
  }
  100% {
    opacity: 0;
    transform: scale(0.97);
    filter: blur(3px);
  }
}

/* start screen (drop-in) */

.znx-start {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(800px 800px at 50% 20%, rgba(170,170,170,.08), transparent 60%), #000;
  pointer-events: all;
}

.znx-start-inner {
  width: min(520px, calc(100vw - 40px));
  padding: 28px 24px;
  border: 4px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.55);
  box-shadow: 0 12px 40px rgba(0,0,0,0.65);
  text-align: center;
}

.znx-start-title {
  font-size: 34px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  user-select: none;
}

.znx-start-sub {
  opacity: 0.8;
  margin-bottom: 18px;
  user-select: none;
}

.znx-power {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 4px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  color: #fff;
  letter-spacing: 0.12em;
  cursor: pointer;
  user-select: none;
}

.znx-power:hover {
  border-color: rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.55);
}

.znx-power:active {
  transform: scale(0.98);
}

.znx-start-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 32px;
  border: 4px solid var(--panel-border,#22272e);
  background: linear-gradient(#060606,#101010);
  color: var(--boot-fg,#cfd3d7);
  text-align: center;
  min-width: 360px;
  box-shadow: 0 18px 40px rgba(0,0,0,.6);
  opacity: 1;
  transform: scale(1);
}

.znx-start-title {
  font: 800 26px/1.2 Oxanium;
  letter-spacing: .6px;
}

.znx-start-text {
  font: 600 14px/1.45 Oxanium;
  opacity: .9;
}

.znx-start-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.znx-start-btn {
  appearance: none;
  cursor: pointer;
  padding: 10px 18px;
  border: 1px solid var(--panel-border,#22272e);
  background: linear-gradient(#1a1a1a,#101010);
  color: var(--boot-fg,#cfd3d7);
  font: 700 12px/1 Oxanium;
}

.znx-start-btn:hover {
  background: linear-gradient(#262626,#161616);
}

.znx-power {
  margin-top: 6px;
  padding: 12px 22px;
  font: 800 13px/1 Oxanium;
  letter-spacing: .6px;
}

.warning-pulse {
  color: #c5c5c5;
  text-shadow: 0 0 6px rgba(200, 200, 200, 0.45);
  animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
  0% {
    text-shadow: 0 0 4px rgba(170,170,170,.35);
  }
  50% {
    text-shadow: 0 0 10px rgba(210,210,210,.55);
  }
  100% {
    text-shadow: 0 0 4px rgba(170,170,170,.35);
  }
}

/* ======================================================================================
   ROOT TOKENS & GLOBAL RESETS
   ====================================================================================== */

:root {
  --white: #ffffff;
  --red: #dc3545;
  --green: #00ff38;
  --pink: #ff00c1;
  --link: #1875ff;
  --window-dark: #0e1111;
  --window-darker: #020202;
  --window-border: #353839;
  --window-border2: #0e1111;
  --boot-bg: #000;
  --boot-fg: #cfd3d7;
  --boot-dim: #343a40;
  --ok: #00ff38;
  --warn: #ffdd57;
  --fail: #dc3545;
  --info: #1875ff;
  --panel-border: #22272e;
  --panel-head: #0d0f12;
  --side-w: 460px;
  --w-time: 12ch;
  --w-val: 18ch;
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1440px;
  --breakpoint-xl: 1600px;
  --breakpoint-xxl: 1920px;
  --clear: #0000;
  --neon-cyan: #00ccff;
  --neon-cyan-soft: rgba(0,204,255,.45);
  --neon-green-soft: rgba(0,255,69,.45);
  --neon-blue-soft: rgba(0,170,255,.45);
  --panel-glow: rgba(0,204,255,.18);
  --panel-glow-strong: rgba(0,204,255,.35);
  --login-bg-dark: #050505;
  --login-bg-mid: #0b0b0b;
  --login-bg-light: #111;
}

/* Base */

/* Utilities */

.hidden {
  display: none !important;
}

.csb, .wb-body {
  scrollbar-width: thin;
  scrollbar-color: var(--window-border) transparent;
}

.csb {
  scrollbar-width: thin;
  scrollbar-color: var(--window-border) transparent;
}

.csb::-webkit-scrollbar, .wb-body::-webkit-scrollbar {
  width: 12px;
}

.csb::-webkit-scrollbar-track, .wb-body::-webkit-scrollbar-track {
  background: transparent;
}

.csb::-webkit-scrollbar-thumb, .wb-body::-webkit-scrollbar-thumb {
  background: var(--window-border);
}

/* ======================================================================================
   DESKTOP SHELL
   ====================================================================================== */

.desktop {
  height: 100vh;
  width: 100vw;
  border: none;
  background: url("../../assets/img/bg/ascii_silhouette_by_nevermorexiii.webp") center / cover no-repeat #000;
}

.desktop-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 1% .5% 0;
}

.icon-dskt {
  color: #fff;
  height: 100%;
  width: 100%;
}

.icon-txt {
  font-size: 1.2em;
  color: #fff;
  text-align: center;
}

.icon-button {
  margin: 0 1%;
  height: 100px;
  width: 100px;
}

.icon-button img, .icon-button svg {
  transition: filter .3s ease;
}

.icon-button span {
  transition: color .2s ease, text-shadow .3s ease;
}

.icon-button:hover img, .icon-button:hover svg {
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 7px rgba(255,255,255,.6));
}

.icon-button:hover span {
  color: #fff;
  text-shadow: 0 0 6px #fff, 0 0 7px rgba(255,255,255,.6);
}

/* Accent hovers */

#app-p2k.icon-button:hover img, #app-p2k.icon-button:hover svg {
  filter: drop-shadow(0 0 6px #dc3545) drop-shadow(0 0 7px rgba(220,53,69,.6));
}

#app-p2k.icon-button:hover span {
  text-shadow: 0 0 12px #dc3545, 0 0 12px rgba(220,53,69,.6);
}

#app-servers.icon-button:hover img, #app-servers.icon-button:hover svg {
  filter: drop-shadow(0 0 6px #00ff38) drop-shadow(0 0 7px rgba(0,255,69,.6));
}

#app-servers.icon-button:hover span {
  text-shadow: 0 0 12px #00ff38, 0 0 12px rgba(0,255,69,.6);
}

#app-readme.icon-button:hover img, #app-readme.icon-button:hover svg {
  filter: drop-shadow(0 0 6px #00ccff) drop-shadow(0 0 7px rgba(0,204,255,.6));
}

#app-readme.icon-button:hover span {
  text-shadow: 0 0 12px #00ccff, 0 0 12px rgba(0,204,255,.6);
}

#app-infocrypt.icon-button:hover img, #app-infocrypt.icon-button:hover svg {
  filter: drop-shadow(0 0 6px #ff8c19) drop-shadow(0 0 7px rgba(255,140,25,.6));
}

#app-infocrypt.icon-button:hover span {
  text-shadow: 0 0 12px #ff8c19, 0 0 12px rgba(255,140,25,.6);
}

/* Top system bar */

#sysnav {
  z-index: 9999;
  height: 2.9em;
  padding: 0 1%;
  background: rgba(14,14,14,.76);
}

.sys-brand {
  width: 95px;
  height: 100%;
  font-family: "Linear Beam";
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

@media (max-width: 700px) {
  .sys-brand {
    width: 80px;
  }
}

@media (max-width: 350px) {
  .sys-brand {
    width: auto;
    justify-content: center;
    margin-bottom: 4px;
    transform: scale(0.9);
    transform-origin: center;
  }
}

@media (max-width: 250px) {
  .sys-brand {
    transform: scale(0.8);
  }
}

.nav-stats {
  width: 70%;
}

#time, #date {
  margin: 0 10px;
  color: #fff;
}

/* ======================================================================================
   CONTEXT MENUS (desktop + timezone menu)
   ====================================================================================== */

.ctx {
  position: fixed;
  z-index: 2147483600;
  background: linear-gradient(#111111, #0a0a0a);
  color: #cfd3d7;
  border: 1px solid #2f2f2f;
  box-shadow: 0 10px 24px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.03);
  font-family: Oxanium;
  font-size: 12px;
  letter-spacing: .2px;
  min-width: 220px;
  user-select: none;
}

.ctx.hidden {
  display: none;
}

.ctx-list, .ctx-sub {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.ctx-item {
  padding: 6px 10px;
  margin: 2px 0;
  border: 1px solid transparent;
  cursor: default;
  white-space: nowrap;
}

.ctx-item:hover {
  background: linear-gradient(#242424, #171717);
  border-color: #4a4a4a;
}

.ctx-sep {
  height: 1px;
  margin: 6px 4px;
  background: #2a2a2a;
}

/* Submenus */

.has-sub {
  position: relative;
}

.ctx-sub {
  position: absolute;
  top: -6px;
  left: 100%;
  margin-left: 6px;
  background: linear-gradient(#111111, #0a0a0a);
  border: 1px solid #2f2f2f;
  box-shadow: 0 10px 24px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.03);
  display: none;
  min-width: 200px;
}

.has-sub:hover > .ctx-sub {
  display: block;
}

.ctx-sub.left {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 6px;
}

/* Timezone menu caps */

#tz-menu.ctx, #tz-menu .ctx-sub {
  max-height: calc(100vh - 16px);
  overflow: auto;
}

/* ======================================================================================
   sICON APPS — GENERIC SHELL
   ====================================================================================== */

.app {
  position: absolute;
  inset: auto;
  width: 75vw;
  height: 70vh;
  color: #fff;
  border: 5px solid var(--window-dark);
  background: var(--window-darker);
  border-radius: 0;
  overflow: hidden;
}

.app-content {
  height: 100%;
  padding: 0;
  color: #fff;
  background: var(--window-darker);
}

.app-label {
  margin-left: 1%;
  height: 100%;
  width: 100%;
  font-size: 18px;
}

.hidden-window {
  display: none;
}

.app-icon {
  height: 100%;
}

/* File header */

.fd-header {
  margin-top: .664em;
}

.fd-txt {
  margin: 0 0 0 1%;
  font-family: "Linear Beam";
}

.fd-sep {
  width: 100%;
  height: .2em;
  background: var(--window-dark);
}

.app-ctrl {
  margin: 0 1% 0 1%;
}

.header-url {
  width: 100vw;
  height: 2.1em;
  margin: 0 1em;
  padding-left: 1.2%;
  background: var(--window-dark);
  border-radius: 5px;
  font-size: 18px;
  box-shadow: inset 0 0 6px 4px var(--window-border);
}

/* ======================================================================================
    APPS — EXPLORER
   ====================================================================================== */

.window.hidden {
  display: none;
}

.window {
  height: 100%;
}

.filebox {
  height: 100%;
  padding-right: 4%;
}

.filerow {
  height: 25%;
  padding: 1% 2% 0;
  margin-bottom: 4%;
}

.fileimg {
  cursor: pointer;
  height: 5em;
}

.filetxt {
  height: 24px;
  width: 133px;
}

.folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  margin-right: 5%;
}

.folder:hover {
  text-decoration: underline;
}

.folder-name {
  display: block;
  text-align: center;
}

/* ===========================
   Tabs — JS Driven Only
   =========================== */

.tabs {
  width: 20%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--window-dark);
  font-family: Oxanium;
}

/* Left column buttons */

.tab-links {
  display: flex;
  flex-direction: column;
}

.tab-button {
  width: 100%;
  padding: 10px 12px;
  color: #fff;
  background: var(--window-dark);
  border: none;
  border-bottom: 4px solid var(--window-border2);
  cursor: pointer;
  text-align: left;
  font-size: 1em;
  transition: background .15s ease, text-shadow .15s ease;
}

.tab-button:hover {
  background: var(--window-border2);
}

.tab-button.active {
  background: var(--window-darker);
  text-shadow: 0 0 8px #fff;
}

/* Right content area */

.tab-window {
  width: 80%;
  height: 100%;
  background: var(--window-darker);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Individual tab panels */

.tab-content {
  display: none;
  height: 100%;
  padding: 2% 4% 4%;
  overflow-y: auto;
  background: var(--window-darker);
}

.tab-content.active {
  display: block;
}

/* Nested tabs (if needed later) */

.nested-tab-content {
  display: none;
}

.nested-tab-content.active {
  display: block;
}

/* Prevent WinBox resize handles inside tabs */

.tab-content .ui-resizable-handle {
  display: none;
}

/* ===========================
   File Explorer (fx-*)
   =========================== */

:root {
  --fx-fg: var(--boot-fg, #cfd3d7);
  --fx-dim: #9aa0a6;
  --fx-bg: #0d0d0d;
  --fx-pane: #121212;
  --fx-pane2: #0f0f0f;
  --fx-border: #2f2f2f;
  --fx-accent: #aeb4ba;
  --fx-gap: 16px;
  --fx-rad: 6px;
}

/* Hidden while parked in the page */

.fx-wrap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* When WinBox mounts it */

#wb-parked {
  position: absolute;
  top: -9999px;
  left: -9999px;
  visibility: hidden;
}

.wb-mount {
  width: 100%;
  height: 100%;
}

.wb-pad {
  width: 100%;
  height: 100%;
  background: var(--window-darker);
  color: #fff;
  padding: 3%;
}

.wb-parked {
  position: absolute;
  left: -99999px;
  top: -99999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.znx-file, .znx-file-inner {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.winbox .fx-wrap, .wb-window .fx-wrap {
  position: static;
  left: auto;
  top: auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* App grid: bar + views */

.fx-app {
  min-height: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  color: var(--fx-fg);
  background: linear-gradient(180deg, #070707 0%, #0b0b0b 48%, #080808 100%);
  font-family: Oxanium;
}

/* Top bar */

.fx-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 17px 6px 6px;
  background: #070707;
  border-bottom: 1px solid var(--fx-border);
  --fx-url-row-h: 34px;
}

.fx-bar-row {
  display: contents;
}

.fx-navs {
  display: flex;
  gap: 6px;
}

.fx-nav {
  appearance: none;
  border: 1px solid var(--fx-border);
  background: #111111;
  color: var(--fx-fg);
  min-width: 34px;
  height: var(--fx-url-row-h);
  min-height: var(--fx-url-row-h);
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 12px/1 Oxanium;
  cursor: pointer;
}

.fx-nav:disabled {
  opacity: .5;
  cursor: default;
  background: #111111;
}

.fx-path {
  flex: 1 1 auto;
  min-width: 0;
  height: var(--fx-url-row-h);
  padding: 0 10px;
  display: flex;
  align-items: center;
  border: 1px solid var(--fx-border);
  background: linear-gradient(180deg, #1a1a1a, #111111);
  box-shadow: inset 0 0 8px rgba(0,0,0,.4);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 600 15px/1.1 Oxanium;
}

/* Views */

.fx-views {
  min-height: 0;
  position: relative;
  border-top: 1px solid #222222;
}

.fx-view {
  position: absolute;
  inset: 0;
  display: none;
  background:
    radial-gradient(1600px 400px at 50% -10%, rgba(160,160,160,.08), transparent 60%),
    linear-gradient(180deg, #090909 0%, #0d0d0d 100%);
}

.fx-view.is-active {
  display: block;
}

/* Root folders */

.fx-folders {
  list-style: none;
  margin: 0;
  padding: 20px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.fx-folder {
  display: grid;
  grid-template-rows: minmax(116px, 1fr) auto;
  gap: 0;
  min-height: 152px;
  padding: 0;
  border: 1px solid var(--fx-border);
  background: linear-gradient(180deg, #0b0b0b, #070707);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
  overflow: hidden;
}

.fx-folder:hover {
  border-color: #4a4a4a;
  background: linear-gradient(180deg, #121212, #090909);
}

.fx-folder-ico {
  width: min(92%, 116px);
  height: 100%;
  max-height: 110px;
  object-fit: contain;
  opacity: 1;
  justify-self: center;
  align-self: center;
  margin-top: 6px;
}

.fx-folder-name {
  font: 700 14px/1 Oxanium;
  width: 100%;
  padding: 10px 10px 11px;
  border-top: 1px solid #2a2a2a;
  background: linear-gradient(180deg, rgba(22,22,22,.92), rgba(12,12,12,.95));
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Folder contents */

.fx-grid {
  display: grid;
  gap: 10px;
  padding: 16px 14px 14px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  align-content: start;
}

.fx-file {
  display: grid;
  grid-template-rows: 116px auto;
  gap: 0;
  min-height: 152px;
  height: 152px;
  padding: 0;
  border: 1px solid var(--fx-border);
  background: linear-gradient(180deg, #0a0a0a, #060606);
  color: var(--fx-fg);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55);
  overflow: hidden;
}

.fx-file:hover {
  border-color: #4b4b4b;
  background: linear-gradient(180deg, #131313, #080808);
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .18);
}

.fx-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  border-bottom: 1px solid #2a2a2a;
  background: #111111;
  align-self: stretch;
  justify-self: stretch;
  padding: 14px;
}

.fx-iconic {
  object-fit: contain;
}

.fx-name {
  font: 700 12px/1.2 Oxanium;
  color: var(--fx-fg);
  width: 100%;
  padding: 10px 10px 11px;
  border-top: 1px solid #2a2a2a;
  background: linear-gradient(180deg, rgba(22,22,22,.92), rgba(12,12,12,.95));
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-file[data-open] {
  grid-template-rows: 116px auto;
}

.fx-file[data-open] .fx-thumb {
  background: #151515;
}

.fx-file[data-fx-kind="folder"] .fx-thumb,
.fx-file[data-fx-kind="mount"] .fx-thumb,
.fx-file[data-fx-kind="video"] .fx-thumb,
.fx-file[data-fx-kind="link"] .fx-thumb {
  object-fit: contain;
  padding: 14px;
}

.fx-file[data-fx-kind="image"] .fx-thumb {
  object-fit: cover;
  padding: 0;
}

.fx-name-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  max-width: min(76vw, 520px);
  padding: 6px 9px;
  border: 1px solid var(--fx-border);
  background: linear-gradient(180deg, #111111, #090909);
  color: var(--fx-fg);
  font: 700 11px/1.2 Oxanium;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  z-index: 2147483603;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .65), 0 8px 24px rgba(0, 0, 0, .45);
  transition: opacity .12s ease;
}

.fx-name-tooltip.is-visible {
  opacity: 1;
}

/* Scroll areas */

.fx-scroll {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--fx-border) transparent;
}

.fx-scroll::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.fx-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.fx-scroll::-webkit-scrollbar-thumb {
  background: var(--fx-border);
}

/* Small screens */

@media (max-width:600px) {
  .fx-folders {
    grid-template-columns: repeat(2, minmax(0,1fr));
    padding: 12px;
  }
}

@media (max-width:600px) {
  .fx-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    padding: 12px;
  }
}

/* ===========================
   Image Viewer (iv-*) for WinBox
   =========================== */

.iv-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  display: grid;
  grid-template-rows: 1fr auto;
}

.iv-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}

.iv-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: auto;
  background: #000;
}

.iv-caption {
  padding: 8px 10px;
  color: #cfd3d7;
  background: rgba(15,20,27,.75);
  border-top: 1px solid #2a3139;
  font: 700 12px/1 Oxanium;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===========================
   Settings (stg-*) — unique
   =========================== */

:root {
  --stg-fg: var(--boot-fg, #cfd3d7);
  --stg-dim: #9ea4aa;
  --stg-bg: #0d0d0d;
  --stg-pane: #141414;
  --stg-pane2: #101010;
  --stg-border: #2f2f2f;
  --stg-accent: #b8bec4;
  --stg-ok: #d6d6d6;
  --stg-gap: 14px;
  --stg-rad: 0px;
}

/* Hidden while parked in DOM; WinBox will mount it */

.stg-wrap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* When mounted inside a WinBox, fill it */

.winbox .stg-wrap, .wb-window .stg-wrap {
  position: static;
  left: auto;
  top: auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* App shell */

.stg-app {
  position: relative;
  height: 100%;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  background: linear-gradient(180deg, #121212 0%, #0a0a0a 100%);
  color: var(--stg-fg);
  font-family: Oxanium;
}

.stg-app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 16px 16px;
  opacity: .28;
}

/* Tabs */

.stg-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  padding: 12px 12px 0;
  padding-bottom: 0;
  border-bottom: 2px solid var(--stg-border);
  background: linear-gradient(#141414, #0d0d0d);
  margin-top: 10px;
}

.stg-tab {
  appearance: none;
  border: 1px solid var(--stg-border);
  background: linear-gradient(#1a1a1a,#101010);
  color: var(--stg-fg);
  font: 700 12px/1 Oxanium;
  padding: 10px 14px;
  border-radius: 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.stg-tab.is-active {
  background: #161616;
  border-bottom-color: transparent;
}

/* Panels container */

.stg-panels {
  position: relative;
  z-index: 1;
  min-height: 0;
  display: grid;
}

/* Each panel fills and scrolls */

.stg-panel {
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: linear-gradient(#121212, #0a0a0a);
}

/* Scoped scrollbars */

.stg-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--stg-border) transparent;
}

.stg-panel::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.stg-panel::-webkit-scrollbar-track {
  background: transparent;
}

.stg-panel::-webkit-scrollbar-thumb {
  background: var(--stg-border);
}

.stg-panel.is-active {
  display: block;
}

.stg-section-head {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--stg-border);
  border-left: 3px solid var(--stg-accent);
  background: rgba(18,18,18,.75);
}

.stg-title {
  margin: 0 0 4px;
  font: 800 18px/1.2 Oxanium;
}

.stg-sub {
  margin: 0;
  color: var(--stg-dim);
  font: 700 12px/1.3 Oxanium;
}

/* Carousel */

.stg-carousel {
  margin-top: 10px;
  position: relative;
  display: block;
  padding: 10px 52px;
  border: 1px solid var(--stg-border);
  background: rgba(14,14,14,.78);
}

.stg-navbtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  appearance: none;
  border: 1px solid var(--stg-border);
  background: rgba(17,17,17,.96);
  color: var(--stg-fg);
  font: 800 14px/1 Oxanium;
  width: 34px;
  height: 74px;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

.stg-navbtn:hover {
  background: #1a1a1a;
  border-color: rgba(255,255,255,.15);
}

#stg-bg-prev.stg-navbtn {
  left: 10px;
}

#stg-bg-next.stg-navbtn {
  right: 10px;
}

.stg-viewport {
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  min-height: 0;
  height: min(54vh, 460px);
  width: 100%;
  background: radial-gradient(100% 140% at 50% 50%, #1a1a1a 0%, #101010 100%);
  border: 2px solid var(--stg-border);
  border-radius: var(--stg-rad);
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,255,255,.03);
}

.stg-bg-img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center;
  background: #000000;
  display: block;
}

.stg-bg-name {
  padding: 8px 10px;
  font: 800 12px/1 Oxanium;
  color: var(--stg-fg);
  background: rgba(14,14,14,.94);
  border-top: 1px solid var(--stg-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  letter-spacing: .35px;
  text-transform: uppercase;
}

/* Buttons row */

.stg-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stg-btn {
  appearance: none;
  border: 1px solid var(--stg-border);
  background: linear-gradient(#1a1a1a,#101010);
  color: var(--stg-fg);
  font: 800 12px/1 Oxanium;
  padding: 12px 12px;
  border-radius: 0;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.stg-btn:hover {
  background: #1a1a1a;
  border-color: rgba(255,255,255,.15);
}

.stg-primary {
  background: linear-gradient(#2a2a2a,#181818);
  border-color: color-mix(in srgb, var(--stg-ok) 35%, var(--stg-border) 65%);
}

/* Effects toggle row */

.stg-effect-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--stg-border);
  border-radius: var(--stg-rad);
  background: linear-gradient(#1a1a1a,#101010);
  margin-top: 12px;
}

.stg-effect-info p {
  margin: 6px 0 0;
  color: var(--stg-dim);
}

.stg-mini {
  font: 700 12px/1.3 Oxanium;
}

/* Switch */

.stg-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.stg-switch input {
  display: none;
}

.stg-slider {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: #000;
  border: 1px solid var(--stg-border);
  transition: background .16s ease, border-color .16s ease;
}

.stg-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: #cfd3d7;
  transition: transform .16s ease;
}

/* No rounded corners in settings UI */
.stg-app :is(.stg-tab, .stg-navbtn, .stg-viewport, .stg-btn, .stg-effect-row, .stg-slider, .stg-switch) {
  border-radius: 0 !important;
}

.stg-switch input:checked + .stg-slider {
  background: #1d1d1d;
  border-color: color-mix(in srgb, var(--stg-ok) 35%, var(--stg-border) 65%);
}

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

/* Small screens */

@media (max-width: 700px) {
  .stg-carousel {
    padding: 8px 42px;
  }

  .stg-navbtn {
    width: 28px;
    height: 62px;
  }

  #stg-bg-prev.stg-navbtn {
    left: 6px;
  }

  #stg-bg-next.stg-navbtn {
    right: 6px;
  }

  .stg-viewport {
    height: 34vh;
  }

  .stg-actions {
    grid-template-columns: 1fr;
  }
}
