/* Personal OS — Aqua-inspired (own palette, not a Mac clone) */
:root,
[data-theme="light"],
[data-theme="aqua-light"] {
  --bg-desktop: radial-gradient(ellipse at 22% 18%, rgba(139, 92, 246, 0.55) 0%, transparent 48%),
    radial-gradient(ellipse at 78% 72%, rgba(59, 130, 246, 0.4) 0%, transparent 46%),
    linear-gradient(165deg, #1e3a6e 0%, #2a4a8a 28%, #243d7a 55%, #152848 100%);
  --bg-desktop-solid: #243d7a;
  --desk-stars:
    radial-gradient(2.5px 2.5px at 12% 18%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(2px 2px at 28% 42%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(2.5px 2.5px at 48% 12%, rgba(220, 230, 255, 0.9), transparent),
    radial-gradient(2px 2px at 68% 38%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(3px 3px at 88% 22%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(2px 2px at 18% 68%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(2.5px 2.5px at 42% 82%, rgba(200, 210, 255, 0.8), transparent),
    radial-gradient(2px 2px at 62% 58%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2.5px 2.5px at 82% 78%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2px 2px at 8% 48%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 95% 55%, rgba(180, 200, 255, 0.75), transparent),
    radial-gradient(2.5px 2.5px at 55% 35%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(2px 2px at 35% 25%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2.5px 2.5px at 72% 15%, rgba(230, 220, 255, 0.85), transparent),
    radial-gradient(2px 2px at 50% 70%, rgba(255, 255, 255, 0.6), transparent);
  --menubar-bg: rgba(255, 255, 255, 0.72);
  --menubar-text: #1a1a1a;
  --menubar-border: rgba(0, 0, 0, 0.12);
  --dock-bg: rgba(255, 255, 255, 0.55);
  --dock-border: rgba(255, 255, 255, 0.7);
  --icon-label: #fff;
  --icon-label-shadow: rgba(0, 0, 0, 0.55);
  --win-titlebar: linear-gradient(180deg, #e8e8ec 0%, #c8c8d0 50%, #b4b4be 100%);
  --win-titlebar-active: linear-gradient(180deg, #f2f2f6 0%, #d0d0d8 45%, #b8b8c4 100%);
  --win-title: #2c2c32;
  --win-body-bg: #f5f5f8;
  --win-border: rgba(0, 0, 0, 0.28);
  --win-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
  --tl-close: #ff5f57;
  --tl-close-border: #e0443e;
  --tl-min: #febc2e;
  --tl-min-border: #dea123;
  --tl-max: #28c840;
  --tl-max-border: #1aab29;
  --scroll-track: #e4e4ea;
  --scroll-thumb: #5ba3e0;
  --scroll-thumb-hover: #3d8fd0;
  --text: #1c1c22;
  --text-muted: #6a6a78;
  --card-bg: #fff;
  --card-border: #d8d8e0;
  --input-bg: #fff;
  --input-border: #c0c0cc;
  --accent: #3d8fd0;
  --accent-hover: #2a7ab8;
  --danger: #d94a42;
  --row-hover: rgba(61, 143, 208, 0.1);
  --row-selected: rgba(61, 143, 208, 0.22);
  --tag-bg: #e8f2fb;
  --tag-text: #2a6a9e;
  --login-backdrop: radial-gradient(ellipse at 30% 20%, #5b8fd4 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, #8b5cf6 0%, transparent 45%),
    linear-gradient(165deg, #1a2744 0%, #2d3a6e 35%, #1e3a5f 70%, #0f1c33 100%);
}

[data-theme="dark"],
[data-theme="aqua-dark"] {
  --bg-desktop: radial-gradient(ellipse at 22% 18%, rgba(91, 58, 154, 0.55) 0%, transparent 48%),
    radial-gradient(ellipse at 78% 72%, rgba(58, 90, 154, 0.4) 0%, transparent 46%),
    linear-gradient(165deg, #0a1020 0%, #151e38 32%, #0e1a30 65%, #060c18 100%);
  --bg-desktop-solid: #0e1a30;
  --desk-stars:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 28% 42%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 48% 12%, rgba(200, 210, 255, 0.75), transparent),
    radial-gradient(1px 1px at 68% 38%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(2px 2px at 88% 22%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 18% 68%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 42% 82%, rgba(180, 190, 255, 0.65), transparent),
    radial-gradient(1px 1px at 62% 58%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 82% 78%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 8% 48%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 95% 55%, rgba(160, 180, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 55% 35%, rgba(255, 255, 255, 0.45), transparent);
  --menubar-bg: rgba(30, 35, 45, 0.85);
  --menubar-text: #e8e8f0;
  --menubar-border: rgba(255, 255, 255, 0.08);
  --dock-bg: rgba(40, 45, 58, 0.7);
  --dock-border: rgba(255, 255, 255, 0.12);
  --icon-label: #f0f0f8;
  --icon-label-shadow: rgba(0, 0, 0, 0.8);
  --win-titlebar: linear-gradient(180deg, #4a4a58 0%, #3a3a46 50%, #2e2e38 100%);
  --win-titlebar-active: linear-gradient(180deg, #5a5a6a 0%, #444452 45%, #353540 100%);
  --win-title: #ececf4;
  --win-body-bg: #2a2a34;
  --win-border: rgba(0, 0, 0, 0.5);
  --win-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  --scroll-track: #3a3a46;
  --scroll-thumb: #4a90c8;
  --scroll-thumb-hover: #5ba3e0;
  --text: #ececf4;
  --text-muted: #9a9aa8;
  --card-bg: #32323e;
  --card-border: #4a4a58;
  --input-bg: #3a3a48;
  --input-border: #5a5a6a;
  --accent: #5ba3e0;
  --accent-hover: #7ab8eb;
  --danger: #ff6b63;
  --row-hover: rgba(91, 163, 224, 0.12);
  --row-selected: rgba(91, 163, 224, 0.25);
  --tag-bg: #2a3a4e;
  --tag-text: #8ec4f0;
  --login-backdrop: radial-gradient(ellipse at 30% 20%, #3a5a9a 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, #5b3a9a 0%, transparent 45%),
    linear-gradient(165deg, #0a1020 0%, #151e38 35%, #0e1a30 70%, #060c18 100%);
}

/* Midnight Sky — NeoMoonlight-inspired (colors only; own layout) */
[data-theme="midnight-sky"] {
  --bg-desktop: radial-gradient(ellipse at 18% 12%, rgba(46, 196, 182, 0.12) 0%, transparent 42%),
    radial-gradient(ellipse at 82% 78%, rgba(56, 100, 180, 0.22) 0%, transparent 48%),
    linear-gradient(165deg, #050b18 0%, #0a1628 28%, #0c1a32 55%, #06101c 100%);
  --bg-desktop-solid: #0a1628;
  --desk-stars:
    radial-gradient(1.5px 1.5px at 10% 16%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 24% 40%, rgba(180, 240, 230, 0.7), transparent),
    radial-gradient(2px 2px at 46% 10%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 66% 36%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 88% 20%, rgba(46, 196, 182, 0.85), transparent),
    radial-gradient(1px 1px at 16% 70%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 40% 84%, rgba(200, 220, 255, 0.7), transparent),
    radial-gradient(1px 1px at 60% 58%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 80% 76%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 6% 50%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 94% 52%, rgba(160, 220, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 52% 32%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 34% 22%, rgba(46, 196, 182, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 74% 14%, rgba(230, 250, 255, 0.8), transparent);
  --menubar-bg: rgba(8, 16, 32, 0.88);
  --menubar-text: #eef6ff;
  --menubar-border: rgba(46, 196, 182, 0.18);
  --dock-bg: rgba(10, 22, 40, 0.75);
  --dock-border: rgba(46, 196, 182, 0.22);
  --icon-label: #f2f8ff;
  --icon-label-shadow: rgba(0, 0, 0, 0.85);
  --win-titlebar: linear-gradient(180deg, #1a2a44 0%, #122038 50%, #0e1a30 100%);
  --win-titlebar-active: linear-gradient(180deg, #1e3450 0%, #152848 45%, #101f38 100%);
  --win-title: #f0f7ff;
  --win-body-bg: #0e1a2e;
  --win-border: rgba(46, 196, 182, 0.2);
  --win-shadow: 0 14px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(46, 196, 182, 0.12);
  --scroll-track: #122038;
  --scroll-thumb: #2ec4b6;
  --scroll-thumb-hover: #3dd9ca;
  --text: #f2f7ff;
  --text-muted: #8fa3bd;
  --card-bg: rgba(16, 28, 48, 0.92);
  --card-border: rgba(46, 196, 182, 0.16);
  --input-bg: #121f36;
  --input-border: rgba(120, 150, 180, 0.35);
  --accent: #2ec4b6;
  --accent-hover: #3dd9ca;
  --danger: #ff6b7a;
  --row-hover: rgba(46, 196, 182, 0.1);
  --row-selected: rgba(46, 196, 182, 0.22);
  --tag-bg: rgba(46, 196, 182, 0.16);
  --tag-text: #7aefe4;
  --login-backdrop: radial-gradient(ellipse at 30% 20%, rgba(46, 196, 182, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(56, 100, 180, 0.25) 0%, transparent 45%),
    linear-gradient(165deg, #050b18 0%, #0a1628 35%, #0c1a32 70%, #040810 100%);
}

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

html,
body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-desktop-solid);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* —— Login —— */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--login-backdrop);
  z-index: 1000;
}

.login-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 30% 45%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 75% 35%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 85% 70%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 20% 75%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 45% 85%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 65% 55%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 90% 25%, rgba(200, 220, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 5% 55%, rgba(255, 255, 255, 0.5), transparent);
  pointer-events: none;
  animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.login-card {
  position: relative;
  width: min(380px, 92vw);
  padding: 36px 32px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #1a1a22;
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.logo-orb {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff 0%, #7eb8f0 35%, #3d7ab5 70%, #1e4a7a 100%);
  box-shadow: 0 6px 20px rgba(61, 122, 181, 0.5), inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.login-logo h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1a1a28;
}

.login-sub {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #6a6a78;
}

.field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 14px;
  height: 44px;
  background: #f4f4f8;
  border: 1px solid #d0d0dc;
  border-radius: 999px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field:focus-within {
  border-color: #5ba3e0;
  box-shadow: 0 0 0 3px rgba(91, 163, 224, 0.25);
  background: #fff;
}

.field-icon {
  flex-shrink: 0;
  font-size: 0.95rem;
  opacity: 0.7;
}

.field input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 0;
  min-width: 0;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 4px 16px;
  font-size: 0.875rem;
  color: #4a4a58;
  cursor: pointer;
  user-select: none;
}

.btn-signin {
  display: block;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #6bb0e8 0%, #3d8fd0 50%, #2a7ab8 100%);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(61, 143, 208, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: filter 0.15s, transform 0.1s;
}

.btn-signin:hover {
  filter: brightness(1.06);
}

.btn-signin:active {
  transform: scale(0.98);
}

.login-error {
  margin: 12px 0 0;
  text-align: center;
  color: #d94a42;
  font-size: 0.875rem;
}

/* —— Desktop shell —— */
.desktop {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--bg-desktop-solid);
  background-image: var(--desk-stars), var(--bg-desktop);
  background-attachment: fixed;
}

.menubar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 12px;
  background: var(--menubar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--menubar-border);
  color: var(--menubar-text);
  font-size: 13px;
  z-index: 200;
  user-select: none;
  flex-shrink: 0;
}

.menubar-left,
.menubar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.apple-mark {
  font-size: 15px;
  opacity: 0.9;
}

.menu-item {
  padding: 2px 6px;
  border-radius: 4px;
  cursor: default;
}

.menu-item.active {
  font-weight: 600;
}

.menu-item:hover {
  background: rgba(61, 143, 208, 0.25);
}

.theme-toggle,
.logout-btn {
  background: transparent;
  border: none;
  color: var(--menubar-text);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
}

.theme-toggle:hover,
.logout-btn:hover {
  background: rgba(61, 143, 208, 0.25);
}

.clock {
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  text-align: right;
}

.desktop-surface {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.icon-grid {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 1;
}

.desk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 88px;
  padding: 8px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--icon-label);
}

.desk-icon:hover,
.desk-icon:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  outline: none;
}

.desk-icon-img,
.dock-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: block;
}

.storage-icon {
  background:
    linear-gradient(145deg, #8ec5f0 0%, #3d8fd0 40%, #2a6aa0 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.25);
  position: relative;
}

.storage-icon::before {
  content: "";
  position: absolute;
  inset: 12px 10px 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, #e8f4fc, #b8d8f0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.storage-icon::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
}

.desk-icon-label {
  font-size: 12px;
  text-align: center;
  text-shadow: 0 1px 3px var(--icon-label-shadow);
  line-height: 1.25;
  word-break: break-word;
}

.windows-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.windows-layer .os-window {
  pointer-events: auto;
}

/* —— Dock —— */
.dock {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 16px 12px;
  margin: 0 auto 10px;
  width: fit-content;
  background: var(--dock-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--dock-border);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 150;
  flex-shrink: 0;
}

.dock-item {
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.15s;
}

.dock-item:hover {
  transform: translateY(-6px) scale(1.08);
}

.dock-item .dock-icon {
  width: 48px;
  height: 48px;
}

/* —— Window chrome —— */
.os-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 360px;
  min-height: 240px;
  background: var(--win-body-bg);
  border: 1px solid var(--win-border);
  border-radius: 10px;
  box-shadow: var(--win-shadow);
  overflow: hidden;
  outline: none;
}

.os-window.active .titlebar {
  background: var(--win-titlebar-active);
}

.os-window.minimized {
  display: none;
}

.os-window.maximized {
  border-radius: 0;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.titlebar {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 8px 0 12px;
  background: var(--win-titlebar);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
  gap: 8px;
}

.titlebar:active {
  cursor: grabbing;
}

.titlebar-title {
  flex: 1;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--win-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.titlebar-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.win-close {
  width: 28px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--win-title);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0;
}

.win-close:hover {
  opacity: 1;
  background: rgba(217, 74, 66, 0.18);
  color: var(--danger, #d94a42);
}

.win-close:active {
  transform: scale(0.96);
}

.window-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--win-body-bg);
  color: var(--text);
}

/* Blue-ish Aqua scrollbars */
.window-body::-webkit-scrollbar,
.sm-scroll::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

.window-body::-webkit-scrollbar-track,
.sm-scroll::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 6px;
}

.window-body::-webkit-scrollbar-thumb,
.sm-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7ab8eb, var(--scroll-thumb));
  border-radius: 6px;
  border: 2px solid var(--scroll-track);
}

.window-body::-webkit-scrollbar-thumb:hover,
.sm-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

/* Firefox */
.window-body,
.sm-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  z-index: 2;
}

.resize-handle::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(128, 128, 140, 0.5);
  border-bottom: 2px solid rgba(128, 128, 140, 0.5);
}

/* —— Storage Manager app —— */
.sm-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 420px;
}

.sm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
  background: var(--card-bg);
  flex-shrink: 0;
}

.sm-tabs {
  display: flex;
  gap: 4px;
  margin-right: 8px;
}

.sm-tab {
  padding: 6px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
}

.sm-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.sm-search {
  flex: 1;
  min-width: 160px;
  display: flex;
  gap: 6px;
}

.sm-search input {
  flex: 1;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--input-bg);
  outline: none;
}

.sm-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 163, 224, 0.25);
}

.sm-btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  cursor: pointer;
  white-space: nowrap;
}

.sm-btn:hover {
  border-color: var(--accent);
}

.sm-btn.primary {
  background: linear-gradient(180deg, #6bb0e8, var(--accent));
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.sm-btn.danger {
  color: var(--danger);
  border-color: var(--danger);
}

.sm-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.sm-list {
  width: 42%;
  min-width: 200px;
  border-right: 1px solid var(--card-border);
  overflow: auto;
}

.sm-detail {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.sm-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--card-border);
  cursor: pointer;
}

.sm-row:hover {
  background: var(--row-hover);
}

.sm-row.selected {
  background: var(--row-selected);
}

.sm-row-title {
  font-weight: 600;
}

.sm-row-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.sm-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
}

.sm-form h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.sm-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.sm-form input,
.sm-form select,
.sm-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  font-weight: 400;
  color: var(--text);
}

.sm-form textarea {
  min-height: 72px;
  resize: vertical;
}

.sm-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.sm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.sm-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 11px;
  font-weight: 500;
}

.sm-locs {
  margin-top: 8px;
}

.sm-loc-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

.sm-loc-row select {
  width: 140px;
  flex-shrink: 0;
}

.sm-loc-row input {
  flex: 1;
}

.sm-loc-remove {
  border: none;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.sm-result-line {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 2px 0;
  color: var(--text);
}

.sm-result-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--card-border);
}

.sm-result-item .sm-row-title {
  margin-bottom: 4px;
}

.sm-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--tag-bg);
  color: var(--tag-text);
  margin-right: 4px;
}


/* —— Theme picker —— */
.theme-picker {
  position: relative;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  padding: 6px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: var(--win-shadow);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.theme-option {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.theme-option:hover {
  background: var(--row-hover);
}

.theme-option.active {
  background: var(--row-selected);
  color: var(--accent);
  font-weight: 600;
}

[data-theme="midnight-sky"] .menu-item:hover,
[data-theme="midnight-sky"] .theme-toggle:hover,
[data-theme="midnight-sky"] .logout-btn:hover {
  background: rgba(46, 196, 182, 0.2);
}

[data-theme="midnight-sky"] .sm-btn.primary {
  background: linear-gradient(180deg, #4ad4c6, var(--accent));
  color: #041018;
}

[data-theme="midnight-sky"] .sm-tab.active {
  color: #041018;
}

[data-theme="midnight-sky"] .sm-search input:focus {
  box-shadow: 0 0 0 2px rgba(46, 196, 182, 0.28);
}

/* —— Celebs icon —— */
.celebs-icon {
  background:
    linear-gradient(145deg, #5ee0d2 0%, #2ec4b6 42%, #1a8f92 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.25);
  position: relative;
}

.celebs-icon::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 0 -2px rgba(255, 255, 255, 0.75);
}

.celebs-icon::after {
  content: "";
  position: absolute;
  bottom: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 12px;
  border-radius: 12px 12px 4px 4px;
  background: rgba(255, 255, 255, 0.85);
}

/* —— Celeb Database app —— */
.cb-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 420px;
}

.cb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
  background: var(--card-bg);
  flex-shrink: 0;
  justify-content: space-between;
}

.cb-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1;
  min-width: 220px;
}

.cb-search-row input[type="search"],
.cb-search-row select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
}

.cb-search-row input[type="search"] {
  flex: 1;
  min-width: 140px;
  border-radius: 999px;
  padding: 0 12px;
}

.cb-search-row select {
  min-width: 130px;
}

.cb-search-row input:focus,
.cb-search-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(46, 196, 182, 0.2);
}

.cb-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.cb-list {
  width: 36%;
  min-width: 200px;
  border-right: 1px solid var(--card-border);
  overflow: auto;
}

.cb-detail {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.cb-profile-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.cb-profile-header h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.cb-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: #041018;
  background: linear-gradient(145deg, #5ee0d2, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.cb-section {
  margin-bottom: 16px;
}

.cb-section-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cb-section-title::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--accent);
}

.cb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 14px;
}

.cb-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.cb-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

.cb-field-value {
  color: var(--text);
  word-break: break-word;
}

.cb-notes {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.cb-roles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cb-role-card {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.cb-role-show {
  font-weight: 600;
}

.cb-role-char {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.cb-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0 12px;
}

.cb-role-edit {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

.cb-role-edit input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
}

@media (max-width: 720px) {
  .cb-role-edit {
    grid-template-columns: 1fr;
  }
  .cb-list {
    width: 42%;
  }
}


[hidden] {
  display: none !important;
}

/* —— Auth / setup —— */
.setup-banner {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #2a4a6a;
  background: linear-gradient(180deg, #e8f4ff, #d6ebfa);
  border: 1px solid #b8d4ec;
  border-radius: 12px;
}

[data-theme="midnight-sky"] .login-card {
  background: rgba(12, 22, 40, 0.92);
  color: #e8f0ff;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(46, 196, 182, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="midnight-sky"] .login-logo h1 {
  color: #f0f6ff;
}

[data-theme="midnight-sky"] .login-sub {
  color: #8aa0b8;
}

[data-theme="midnight-sky"] .field {
  background: rgba(8, 16, 32, 0.7);
  border-color: rgba(46, 196, 182, 0.28);
}

[data-theme="midnight-sky"] .field:focus-within {
  border-color: #2ec4b6;
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.22);
  background: rgba(10, 20, 36, 0.95);
}

[data-theme="midnight-sky"] .field input {
  color: #e8f0ff;
}

[data-theme="midnight-sky"] .field input::placeholder {
  color: #6a8098;
}

[data-theme="midnight-sky"] .remember {
  color: #a8bcd0;
}

[data-theme="midnight-sky"] .setup-banner {
  color: #c8f0ea;
  background: linear-gradient(180deg, rgba(46, 196, 182, 0.18), rgba(46, 196, 182, 0.08));
  border-color: rgba(46, 196, 182, 0.35);
}

[data-theme="midnight-sky"] .btn-signin {
  background: linear-gradient(180deg, #3dd6c6 0%, #2ec4b6 50%, #1a9a8e 100%);
  box-shadow: 0 2px 8px rgba(46, 196, 182, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.menu-btn {
  background: transparent;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0 8px;
  height: 100%;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.user-chip {
  font-size: 12px;
  opacity: 0.85;
  margin-right: 6px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— Mute Your Mic icon —— */
.mym-icon {
  background:
    linear-gradient(145deg, #ff8fd8 0%, #c44dff 42%, #5b2dff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.25);
  position: relative;
}

.mym-icon::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 14px;
  border: 2.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.mym-icon::after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: -8px 0 0 -2px rgba(255, 255, 255, 0.55), 8px 0 0 -2px rgba(255, 255, 255, 0.55);
}

/* —— Mute Your Mic app —— */
.mym-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 440px;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(196, 77, 255, 0.18), transparent 50%),
    radial-gradient(ellipse at 90% 20%, rgba(91, 45, 255, 0.12), transparent 45%),
    var(--win-body-bg);
}

.mym-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
  background: var(--card-bg);
  flex-shrink: 0;
}

.mym-back {
  border: none;
  background: transparent;
  color: var(--accent, #3d8fd0);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.mym-back:hover {
  background: rgba(127, 127, 160, 0.12);
}

.mym-chrome-title {
  font-weight: 650;
  letter-spacing: -0.02em;
}

.mym-chrome-spacer {
  flex: 1;
}

.mym-stage {
  flex: 1;
  overflow: auto;
  padding: 16px 18px 24px;
}

.mym-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.mym-hero-orb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ff8fd8, #5b2dff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 20px rgba(91, 45, 255, 0.35);
  flex-shrink: 0;
}

.mym-hero h2 {
  margin: 0;
  font-size: 1.25rem;
}

.mym-hero p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  opacity: 0.75;
}

.mym-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.mym-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.mym-cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mym-tile:hover .mym-cover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.mym-cover-gloss {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 38%, transparent 55%);
  pointer-events: none;
}

.mym-cover-emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.mym-cover-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.mym-tile-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px;
}

.mym-tile-title {
  font-weight: 650;
  font-size: 0.95rem;
}

.mym-tile-sub {
  font-size: 0.78rem;
  opacity: 0.65;
}

.mym-game-banner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 120px;
  margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.mym-game-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 20px;
  color: #fff;
}

.mym-game-emoji {
  font-size: 2.8rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.mym-game-banner h2 {
  margin: 0;
  font-size: 1.4rem;
}

.mym-game-banner p {
  margin: 4px 0 0;
  opacity: 0.9;
}

.mym-blurb {
  margin: 0 0 14px;
  font-size: 0.88rem;
  opacity: 0.8;
}

.mym-clips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mym-clip-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  text-decoration: none;
  color: inherit;
}

.mym-clip-slot.empty {
  opacity: 0.72;
}

.mym-clip-thumb {
  position: relative;
  width: 88px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mym-play {
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.mym-clip-title {
  font-weight: 600;
}

.mym-clip-sub {
  font-size: 0.8rem;
  opacity: 0.65;
  margin-top: 2px;
}

.mym-empty {
  padding: 48px 16px;
  text-align: center;
  opacity: 0.7;
}

.mym-error {
  color: #d94a42;
}

/* —— Users manager —— */
.users-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
}

.users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
  background: var(--card-bg);
}

.users-hint {
  font-size: 0.82rem;
  opacity: 0.8;
}

.users-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.users-list {
  width: 38%;
  border-right: 1px solid var(--card-border);
  padding: 8px;
}

.users-detail {
  flex: 1;
  padding: 16px;
}

.users-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 4px;
}

.users-row:hover {
  background: rgba(127, 127, 160, 0.1);
}

.users-row.active {
  background: rgba(61, 143, 208, 0.15);
  border-color: rgba(61, 143, 208, 0.35);
}

[data-theme="midnight-sky"] .users-row.active {
  background: rgba(46, 196, 182, 0.14);
  border-color: rgba(46, 196, 182, 0.35);
}

.users-row-name {
  font-weight: 600;
}

.users-row-meta {
  font-size: 0.75rem;
  opacity: 0.65;
}

.users-dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  margin: 12px 0 18px;
}

.users-dl dt {
  opacity: 0.65;
  font-size: 0.85rem;
}

.users-dl dd {
  margin: 0;
}

.users-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.users-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(127, 127, 160, 0.15);
  border: 1px solid var(--card-border);
}

.users-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.users-tip {
  margin-top: 14px;
  font-size: 0.8rem;
  opacity: 0.75;
  line-height: 1.4;
}

.users-form h2 {
  margin: 0 0 12px;
}

.users-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.users-field input,
.users-field select {
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
}

.users-apps {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 12px 8px;
  margin: 8px 0 12px;
}

.users-apps legend {
  padding: 0 6px;
  font-size: 0.85rem;
}

.users-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.sm-btn.danger {
  background: linear-gradient(180deg, #f07870, #d94a42);
  color: #fff;
  border: none;
}


/* —— Mute Your Mic player —— */
.mym-clip-slot {
  width: 100%;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.mym-clip-thumb {
  overflow: hidden;
  background-color: #222;
}

.mym-clip-thumb .mym-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 12px;
}

.mym-player {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 8, 20, 0.72);
  backdrop-filter: blur(8px);
}

.mym-player[hidden] {
  display: none !important;
}

.mym-player-panel {
  width: min(720px, 100%);
  background: var(--card-bg, #1a1a22);
  border: 1px solid var(--card-border, rgba(255,255,255,0.12));
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.mym-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border, rgba(255,255,255,0.12));
}

.mym-player-title {
  flex: 1;
  font-weight: 650;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mym-player-close {
  border: none;
  background: rgba(127, 127, 160, 0.16);
  color: inherit;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}

.mym-player-close:hover {
  background: rgba(127, 127, 160, 0.28);
}

.mym-video {
  display: block;
  width: 100%;
  max-height: min(420px, 58vh);
  background: #000;
}
