/* ==========================================================
   MERIDIAN ONLINE — интерактивный предпросмотр лаунчера
   Окно рисуется в «родном» размере 1280×768 и масштабируется под экран.
   ========================================================== */

.lp {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .35s ease, visibility .35s;
}
.lp.is-open { visibility: visible; opacity: 1; }
.lp__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(31, 124, 255, .35), transparent 60%),
    rgba(4, 10, 28, .82);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}
.lp__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translateY(30px) scale(.96);
  transition: transform .5s var(--ease, cubic-bezier(.22, 1, .36, 1));
}
.lp.is-open .lp__stage { transform: none; }
.lp.is-minimizing .lp__stage { transform: translateY(60vh) scale(.2); opacity: 0; transition: transform .45s ease-in, opacity .45s ease-in; }

.lp__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  color: #fff;
}
.lp__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
}
.lp__badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #3cc4ff; box-shadow: 0 0 10px #3cc4ff; }
.lp__close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  transition: background .2s ease;
}
.lp__close:hover { background: rgba(255, 255, 255, .2); }

.lp__frame { position: relative; width: 1280px; height: 768px; }

/* ==========================================================
   ОКНО ЛАУНЧЕРА — скриншот + «живые» слои поверх
   Все координаты — в пикселях исходного скриншота 1280×768.
   ========================================================== */
.lw {
  --lw-blue: #2563ea;
  --lw-blue-2: #3b74f5;
  --lw-muted: #9aa1ae;
  --lw-green: #22c55e;
  --lw-font: "Inter", "Segoe UI", Arial, sans-serif;

  position: absolute;
  left: 0; top: 0;
  width: 1280px;
  height: 768px;
  transform: scale(var(--lw-scale, 1));
  transform-origin: 0 0;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  font-family: var(--lw-font);
  background: #0e111a;
  box-shadow: 0 60px 120px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .07);
  user-select: none;
  -webkit-user-select: none;
}
.lw input { user-select: text; -webkit-user-select: text; }
/* :where() — нулевая специфичность, чтобы не перебивать стили ниже */
.lw :where(button) { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
.lw :where(a) { color: inherit; text-decoration: none; }

.lw__base, .lw__base img { position: absolute; inset: 0; width: 1280px; height: 768px; display: block; pointer-events: none; }

/* Слой-заплатка поверх текста скриншота */
.lw-ov { position: absolute; white-space: nowrap; font-family: var(--lw-font); }

/* Прозрачная кликабельная зона с подсветкой */
.lw-hot { position: absolute; display: block; border-radius: 8px; transition: background .2s ease, box-shadow .2s ease; }
.lw-hot:hover { background: rgba(255, 255, 255, .045); }
.lw-hot:focus-visible { outline: 2px solid var(--lw-blue-2); outline-offset: 2px; }

/* ---------- Левая панель ---------- */
.lw-online {
  left: 200px; top: 63px;
  height: 18px;
  min-width: 16px;
  padding: 0 6px 0 1px;
  line-height: 18px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--lw-green);
  background: #0e111a;
}

.lw-server-hot { left: 36px; top: 150px; width: 289px; height: 74px; border-radius: 9px; }
.lw-server-hot:active { transform: scale(.995); }
.lw-players {
  left: 40px; top: 41px;
  height: 18px;
  padding: 0 8px 0 1px;
  line-height: 18px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--lw-muted);
  background: #262930;
}
.lw-offline-badge {
  position: absolute;
  left: 187px; top: 17px;
  width: 56px; height: 21px;
  display: none;
  place-items: center;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .3px;
  color: #fff;
  background: #ef4444;
}
.lw-server-hot.is-offline .lw-offline-badge { display: grid; }

.lw-install {
  position: absolute;
  left: 36px; top: 595px;
  width: 289px; height: 63px;
  padding: 18px 17px 0 17px;
  border-radius: 9px;
  background: #0b0e15;
  border: 1px solid #191c25;
}
.lw-install__row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 800; line-height: 15px; }
.lw-install__pct { color: var(--lw-blue-2); font-variant-numeric: tabular-nums; }
.lw-install__bar { margin-top: 7px; height: 4px; border-radius: 4px; background: #171a21; overflow: hidden; }
.lw-install__bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #2f6bff, #3cc4ff);
  box-shadow: 0 0 10px rgba(59, 116, 245, .8);
  transition: width .2s linear;
}
.lw-install__meta { display: block; margin-top: 4px; font-size: 10px; font-weight: 600; color: var(--lw-muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-install.is-done .lw-install__pct { color: var(--lw-green); }
.lw-install.is-done .lw-install__bar i { background: var(--lw-green); box-shadow: 0 0 10px rgba(34, 197, 94, .7); }

.lw-main-btn {
  position: absolute;
  left: 36px; top: 672px;
  width: 289px; height: 59px;
  border-radius: 9px;
  font-family: var(--lw-font);
  font-size: 17px !important;
  font-weight: 900 !important;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #fff;
  background: var(--lw-blue) !important;
  transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}
.lw-main-btn:hover { background: var(--lw-blue-2) !important; box-shadow: 0 12px 28px -10px rgba(37, 99, 234, .9); }
.lw-main-btn:active { transform: translateY(1px); }
.lw-main-btn.is-pause { background: #1c2232 !important; }
.lw-main-btn.is-play { background: linear-gradient(90deg, #16a34a, #22c55e) !important; }
.lw-main-btn.is-play:hover { box-shadow: 0 12px 28px -10px rgba(34, 197, 94, .9); }
.lw-main-btn:disabled { cursor: progress; opacity: .85; }

/* ---------- Аккаунт ---------- */
.lw-account__hot { left: 406px; top: 36px; width: 262px; height: 54px; border-radius: 10px; }
.lw-nick {
  left: 63px; top: 25px;
  max-width: 150px;
  height: 20px;
  padding-right: 6px;
  line-height: 20px;
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #151723;
}
.lw-account__chev {
  position: absolute;
  left: 217px; top: 13px;
  width: 28px; height: 28px;
  display: none;
  place-items: center;
  border-radius: 7px;
  color: #c9cfdb;
  background: #1d2030;
  border: 1px solid rgba(255, 255, 255, .1);
}
.lw-account__chev svg { width: 16px; height: 16px; transform: rotate(180deg); }
.lw-account.is-open .lw-account__chev { display: grid; }
.lw-account__menu {
  position: absolute;
  left: 406px; top: 96px;
  z-index: 8;
  width: 262px;
  padding: 16px;
  border-radius: 10px;
  background: #12141d;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, .8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.lw-account.is-open .lw-account__menu { opacity: 1; visibility: visible; transform: none; }
.lw-account__menu .lw-btn { width: 100%; height: 38px; }
.lw-hint { display: block; margin: 6px 0 12px; font-size: 11px; font-weight: 600; color: var(--lw-muted); }
.lw-hint.is-error { color: #f87171; }

/* ---------- Кнопки окна ---------- */
.lw-ctrl { top: 36px; width: 36px; height: 36px; border-radius: 7px; }
.lw-ctrl--settings { left: 1110px; }
.lw-ctrl--min { left: 1154px; }
.lw-ctrl--close { left: 1198px; }
.lw-ctrl:hover { background: rgba(255, 255, 255, .1); }
.lw-ctrl--close:hover { background: rgba(239, 68, 68, .55); }

/* ---------- Вкладки ---------- */
.lw-tab {
  position: absolute;
  top: 115px;
  height: 38px;
  border-radius: 7px;
  font-family: var(--lw-font);
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .2px;
  text-transform: uppercase;
  color: #a7adbb !important;
  background: #151724 !important;
  border: 1px solid rgba(255, 255, 255, .05) !important;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.lw-tab:hover { color: #fff !important; background: #1b1e2e !important; }
.lw-tab.is-active {
  color: #fff !important;
  background: #1f2436 !important;
  border: 1.5px solid #3f66e0 !important;
}

/* ---------- Содержимое вкладок ---------- */
.lw-pane {
  position: absolute;
  left: 406px; top: 178px;
  width: 500px; height: 553px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 40px;
  border-radius: 10px;
  background: rgba(15, 18, 28, .8);
  border: 1px solid rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
          backdrop-filter: blur(22px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.lw-pane.is-active { opacity: 1; visibility: visible; transform: none; }
.lw-pane__icon {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(150deg, #3b74f5, #1d4ed8);
  box-shadow: 0 14px 30px -10px rgba(37, 99, 234, .8);
  margin-bottom: 22px;
}
.lw-pane__icon svg { width: 30px; height: 30px; }
.lw-pane h3 { font-size: 30px; font-weight: 900; letter-spacing: -.4px; margin-bottom: 10px; }
.lw-pane p { font-size: 14px; line-height: 1.55; color: #b4bccb; max-width: 390px; margin-bottom: 26px; font-weight: 500; }
.lw-pane p b { color: #fff; }

/* ---------- Соцсети ---------- */
.lw-social { left: 948px; width: 266px; height: 56px; border-radius: 9px; }
.lw-social:hover { background: rgba(255, 255, 255, .05); }

/* ---------- Кнопки внутри модалок ---------- */
.lw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  font-family: var(--lw-font);
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #fff !important;
  background: var(--lw-blue) !important;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.lw-btn:hover { background: var(--lw-blue-2) !important; box-shadow: 0 10px 24px -8px rgba(37, 99, 234, .85); }
.lw-btn:active { transform: translateY(1px); }
.lw-btn--ghost { background: #1c1d24 !important; border: 1px solid rgba(255, 255, 255, .07) !important; }
.lw-btn--ghost:hover { background: #25262f !important; box-shadow: none; }

.lw-field-label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: #a3aab8; }
.lw-input {
  width: 100%;
  height: 43px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .05);
  background: #08090d;
  color: #fff;
  font: 800 14px var(--lw-font);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lw-input:focus { border-color: var(--lw-blue); box-shadow: 0 0 0 3px rgba(37, 99, 234, .25); }
.lw-input.is-error { border-color: #ef4444; }

/* ---------- Модалки внутри окна ---------- */
.lw-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(5, 6, 10, .62);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.lw-modal.is-open { opacity: 1; visibility: visible; }
.lw-modal__box {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #0f1014;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .85);
  transform: translateY(16px) scale(.97);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
  overflow: hidden;
}
.lw-modal.is-open .lw-modal__box { transform: none; }
.lw-modal__box--settings { width: 704px; height: 598px; }
.lw-modal__box--sm { width: 480px; }
.lw-modal__head {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 85px;
  flex: none;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.lw-modal__icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  color: #4f86ff;
  background: rgba(37, 99, 234, .14);
  border: 1px solid rgba(59, 116, 245, .35);
}
.lw-modal__icon svg { width: 19px; height: 19px; }
.lw-modal__head h3 { flex: 1; font-size: 17px; font-weight: 900; letter-spacing: .3px; text-transform: uppercase; }
.lw-modal__close {
  display: grid !important;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50% !important;
  color: #c9cfdb !important;
  background: rgba(255, 255, 255, .08) !important;
  transition: background .2s ease, transform .25s ease;
}
.lw-modal__close svg { width: 16px; height: 16px; }
.lw-modal__close:hover { background: rgba(255, 255, 255, .16) !important; transform: rotate(90deg); }

.lw-modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 32px 30px;
  scrollbar-width: thin;
  scrollbar-color: #33353f transparent;
}
.lw-modal__body::-webkit-scrollbar { width: 6px; }
.lw-modal__body::-webkit-scrollbar-thumb { background: #33353f; border-radius: 6px; border: 0; }
.lw-modal__body::-webkit-scrollbar-track { background: transparent; }
.lw-section {
  margin: 28px 0 18px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #2f6bff;
}
.lw-section--gap { margin-top: 72px; }

.lw-path { position: relative; display: grid; grid-template-columns: 1fr 88px; gap: 12px; margin-bottom: 26px; }
.lw-path .lw-btn { height: 43px; padding: 0; font-size: 12px !important; }
.lw-picker {
  position: absolute;
  right: 0; top: 51px;
  z-index: 5;
  width: 290px;
  padding: 8px;
  border-radius: 10px;
  background: #171920;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, .85);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.lw-picker.is-open { opacity: 1; visibility: visible; transform: none; }
.lw-picker__title { padding: 6px 10px 8px; font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--lw-muted); }
.lw-picker button {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  transition: background .15s ease;
}
.lw-picker button::before {
  content: "";
  width: 18px; height: 14px;
  flex: none;
  background: linear-gradient(#f5c451, #e0a526);
  clip-path: polygon(0 0, 40% 0, 50% 18%, 100% 18%, 100% 100%, 0 100%);
}
.lw-picker button:hover { background: rgba(37, 99, 234, .2) !important; }

.lw-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  height: 75px;
  border-radius: 10px;
  background: #131418;
  border: 1px solid rgba(255, 255, 255, .06);
  cursor: pointer;
  transition: border-color .2s ease;
}
.lw-switch-row:hover { border-color: rgba(255, 255, 255, .13); }
.lw-switch-row b { display: block; font-size: 14.5px; font-weight: 800; }
.lw-switch-row small { display: block; font-size: 12.5px; font-weight: 600; color: #9aa1ae; margin-top: 5px; }

.lw-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 50px; height: 28px;
  margin: 0;
  border-radius: 28px;
  background: #2b2d35;
  cursor: pointer;
  transition: background .25s ease;
}
.lw-switch::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.lw-switch:checked { background: var(--lw-blue); }
.lw-switch:checked::after { transform: translateX(22px); }
.lw-switch:focus-visible { outline: 2px solid var(--lw-blue-2); outline-offset: 2px; }

.lw-modal__foot {
  display: flex;
  justify-content: flex-end;
  flex: none;
  height: 87px;
  align-items: center;
  padding: 0 32px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.lw-btn--save { height: 48px; padding: 0 21px; font-size: 14.5px !important; letter-spacing: .5px; }

.lw-play { padding: 36px 36px 32px; text-align: center; }
.lw-play__logo {
  display: inline-grid;
  place-items: center;
  width: 72px; height: 72px;
  border-radius: 18px;
  background: #151822;
  border: 1px solid rgba(255, 255, 255, .07);
  margin-bottom: 20px;
}
.lw-play__logo img { width: 44px; height: 44px; }
.lw-play h3 { font-size: 22px; font-weight: 900; margin-bottom: 10px; }
.lw-play p { font-size: 14px; line-height: 1.55; color: #a3aab8; font-weight: 500; margin-bottom: 26px; }
.lw-play__actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.lw-play__actions .lw-btn { height: 48px; }

/* Тост внутри окна */
.lw-toast {
  position: absolute;
  left: 50%; bottom: 28px;
  z-index: 30;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: #1a1d27;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .7);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  white-space: nowrap;
}
.lw-toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.lw-toast.is-success { border-color: rgba(34, 197, 94, .5); }

/* ---------- Скриншот-кнопка на сайте ---------- */
.launcher-shot__try {
  position: absolute;
  right: 16px; bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: rgba(31, 124, 255, .92);
  box-shadow: 0 14px 30px -8px rgba(31, 124, 255, .8);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  transition: transform .3s ease, background .3s ease;
}
.launcher-shot__play {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue, #1f7cff);
}
.launcher-shot__play::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: tryPulse 1.8s ease-out infinite;
}
@keyframes tryPulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.9); opacity: 0; }
}
.launcher-shot__play svg { width: 14px; height: 14px; margin-left: 2px; }
.launcher-shot:hover .launcher-shot__try { transform: scale(1.05); background: #1f7cff; }
.launcher-shot { cursor: pointer; }

/* На телефоне */
@media (max-width: 640px) {
  .lp { padding: 10px; }
  .lp__badge { font-size: 11px; padding: 6px 10px; }
  .lp__close { font-size: 12px; padding: 6px 12px; }
  .launcher-shot__try { right: 10px; bottom: 10px; font-size: 12px; padding: 6px 12px 6px 6px; }
  .launcher-shot__play { width: 24px; height: 24px; }
}

@media (max-width: 640px) and (orientation: portrait) {
  .lp__stage::after {
    content: "Поверни телефон горизонтально — так лаунчер будет крупнее";
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .7);
    text-align: center;
  }
}
