﻿* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
  background: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.scene {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 100, 0, .19), transparent 34%),
    radial-gradient(circle at 80% 78%, rgba(255, 79, 0, .08), transparent 30%),
    linear-gradient(120deg, rgba(8, 8, 8, .96), rgba(10, 10, 10, .89));
}

.shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .44), transparent 60%),
    linear-gradient(0deg, rgba(0, 0, 0, .32), transparent 55%);
}

.accent {
  position: absolute;
  pointer-events: none;
  opacity: .5;
  filter: blur(1px);
  background: linear-gradient(90deg, #ff4d00, #ff9300);
}

.accent-a {
  width: 42vw;
  height: 2px;
  left: -6vw;
  top: 18vh;
  transform: rotate(-13deg);
}

.accent-b {
  width: 30vw;
  height: 1px;
  right: -5vw;
  bottom: 16vh;
  transform: rotate(-13deg);
}

.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 56px 72px;
}

.brand {
  position: absolute;
  top: 48px;
  left: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 20;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #111;
  font-size: 31px;
  font-weight: 950;
  transform: skew(-9deg);
  background: linear-gradient(135deg, #ffb000, #ff4d00 62%, #ff2500);
  clip-path: polygon(15% 0, 100% 0, 84% 42%, 100% 100%, 12% 100%, 0 73%, 18% 50%, 0 22%);
  text-shadow: 0 1px 0 rgba(255,255,255,.18);
}

.brand-name {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
}

.brand-name span {
  color: #ff6500;
}

.brand-sub {
  margin-top: 4px;
  color: rgba(255,255,255,.42);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
}

.page {
  position: absolute;
  left: 72px;
  top: 145px;
  width: min(730px, calc(100vw - 144px));
  height: calc(100vh - 205px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-14px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.page.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.hero-copy {
  margin-bottom: 28px;
}

.hero-copy h1,
.page-head h2,
.confirm-card h2 {
  margin: 0;
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 900;
  letter-spacing: -1.5px;
}

.menu-list {
  width: 430px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.menu-button {
  width: 100%;
  height: 68px;
  padding: 0 22px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(20,20,20,.78);
  backdrop-filter: blur(14px);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  transition: .16s ease;
}

.menu-button:hover,
.settings-nav-card:hover {
  border-color: rgba(255, 101, 0, .65);
  background: rgba(40, 24, 15, .86);
  transform: translateX(5px);
}

.menu-button.primary {
  border-color: rgba(255, 101, 0, .55);
  background: linear-gradient(90deg, rgba(255,78,0,.28), rgba(30,20,15,.82));
}

.menu-button.danger:hover {
  border-color: rgba(255, 65, 55, .64);
  background: rgba(56, 16, 16, .82);
}

.arrow {
  color: #ff6900;
  font-size: 22px;
  font-weight: 600;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.back {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  cursor: pointer;
  background: rgba(20,20,20,.82);
  font-size: 23px;
  transition: .15s ease;
}

.back:hover {
  border-color: #ff6500;
  background: rgba(255, 101, 0, .14);
}

.eyebrow {
  margin-bottom: 4px;
  color: #ff6500;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 3px;
}

.page-head h2 {
  font-size: 34px;
}

.settings-menu {
  width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-nav-card {
  min-height: 84px;
  padding: 17px 20px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  background: rgba(17,17,17,.83);
  transition: .16s ease;
}

.settings-nav-card div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.settings-nav-card b {
  font-size: 14px;
  letter-spacing: .9px;
}

.settings-nav-card div span {
  color: rgba(255,255,255,.48);
  font-size: 12px;
  font-weight: 600;
}

.controls-menu {
  width: 620px;
}

.reset-card {
  border-color: rgba(255, 85, 49, .23);
}

.reset-card:hover {
  border-color: rgba(255, 85, 49, .65);
  background: rgba(58, 19, 13, .82);
}

.reset-icon {
  color: #ff5c2a;
  font-size: 27px;
}

.scroll-panel {
  width: 700px;
  height: calc(100% - 86px);
  overflow-y: auto;
  padding-right: 10px;
}

.scroll-panel::-webkit-scrollbar,
.binding-list::-webkit-scrollbar {
  width: 4px;
}

.scroll-panel::-webkit-scrollbar-thumb,
.binding-list::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(255, 101, 0, .55);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  padding-bottom: 26px;
}

.setting-card,
.toggle,
.wide-action {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  background: rgba(18,18,18,.84);
}

.setting-card {
  padding: 17px 18px 15px;
  min-height: 90px;
}

.setting-card.full {
  grid-column: 1 / -1;
}

.setting-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
}

.setting-top b {
  color: #ff6b00;
}

input[type="range"] {
  width: 100%;
  height: 5px;
  border-radius: 10px;
  appearance: none;
  outline: none;
  background: rgba(255,255,255,.12);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  border: 3px solid #161616;
  border-radius: 50%;
  cursor: pointer;
  background: #ff6500;
  box-shadow: 0 0 0 1px rgba(255,101,0,.6);
}

.toggle {
  min-height: 58px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  transition: .15s ease;
}

.toggle:hover {
  border-color: rgba(255,101,0,.45);
}

.toggle-dot {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 22px;
  border-radius: 30px;
  background: rgba(255,255,255,.12);
  transition: .16s ease;
}

.toggle-dot::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #aaa;
  transition: .16s ease;
}

.toggle.on .toggle-dot {
  background: rgba(255,101,0,.37);
}

.toggle.on .toggle-dot::after {
  left: 23px;
  background: #ff6500;
}

.wide-action {
  grid-column: 1 / -1;
  min-height: 58px;
  padding: 0 18px;
  cursor: pointer;
  color: #ff7a1a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .8px;
  transition: .15s ease;
}

.wide-action:hover {
  border-color: #ff6500;
  background: rgba(255,101,0,.10);
}

/* ========================================================================== */
/* КЛАВИШИ                                                                    */
/* ========================================================================== */

.binding-page {
  width: min(920px, calc(100vw - 144px));
}

.binding-panel {
  width: 100%;
  height: calc(100% - 86px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(12,12,12,.88);
}

.binding-header,
.binding-row {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 145px 145px 145px;
  align-items: center;
  gap: 9px;
}

.binding-header {
  min-height: 44px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.36);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.binding-header span:not(:first-child) {
  text-align: center;
}

.binding-list {
  height: calc(100% - 44px);
  overflow-y: auto;
  padding: 8px;
}

.binding-row {
  min-height: 52px;
  padding: 5px;
  border-bottom: 1px solid rgba(255,255,255,.045);
}

.binding-row:last-child {
  border-bottom: 0;
}

.binding-name {
  padding-left: 9px;
  color: rgba(255,255,255,.82);
  font-size: 11px;
  font-weight: 800;
}

.binding-key {
  min-height: 37px;
  padding: 0 7px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255,255,255,.055);
  font-size: 10px;
  font-weight: 900;
  transition: .13s ease;
}

.binding-key:hover {
  border-color: rgba(255,101,0,.68);
  color: #ff7417;
  background: rgba(255,101,0,.10);
}

.binding-key.empty {
  color: rgba(255,255,255,.26);
}

/* ========================================================================== */
/* CAPTURE                                                                    */
/* ========================================================================== */

.capture-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.67);
  backdrop-filter: blur(7px);
}

.capture-overlay.hidden {
  display: none;
}

.capture-box {
  width: 420px;
  padding: 28px;
  border: 1px solid rgba(255,101,0,.40);
  border-radius: 16px;
  text-align: center;
  background: rgba(14,14,14,.97);
  box-shadow: 0 22px 70px rgba(0,0,0,.48);
}

.capture-title {
  color: #ff6500;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.4px;
}

.capture-hint {
  margin: 19px 0 8px;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.capture-sub {
  color: rgba(255,255,255,.38);
  font-size: 11px;
}

.capture-cancel {
  width: 100%;
  height: 45px;
  margin-top: 20px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255,255,255,.055);
  font-weight: 900;
}

.capture-cancel:hover {
  border-color: rgba(255,101,0,.5);
}

/* ========================================================================== */
/* EXIT                                                                       */
/* ========================================================================== */

.page[data-page="exit"] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.page[data-page="exit"].active {
  pointer-events: auto;
}

.confirm-card {
  width: 420px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 17px;
  text-align: center;
  background: rgba(15,15,15,.95);
  box-shadow: 0 25px 80px rgba(0,0,0,.5);
}

.warn-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 17px;
  border: 1px solid rgba(255,86,49,.38);
  border-radius: 50%;
  color: #ff5a32;
  background: rgba(255,86,49,.08);
  font-size: 25px;
  font-weight: 900;
}

.confirm-card h2 {
  font-size: 27px;
}

.confirm-actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirm {
  height: 48px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.confirm.secondary {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}

.confirm.danger-fill {
  background: linear-gradient(135deg, #ff5e23, #e32618);
}

/* ========================================================================== */
/* TOAST                                                                      */
/* ========================================================================== */

.toast {
  position: absolute;
  z-index: 300;
  left: 50%;
  bottom: 38px;
  padding: 12px 18px;
  border: 1px solid rgba(255,101,0,.38);
  border-radius: 9px;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  background: rgba(15,15,15,.94);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  transition: .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  border-color: rgba(255,70,55,.48);
  color: #ff9a8e;
}

@media (max-width: 1100px) {
  .shell {
    padding-left: 44px;
    padding-right: 44px;
  }

  .brand {
    left: 44px;
  }

  .page {
    left: 44px;
    width: calc(100vw - 88px);
  }

  .binding-page {
    width: calc(100vw - 88px);
  }

  .binding-header,
  .binding-row {
    grid-template-columns: minmax(190px, 1fr) 120px 120px 120px;
  }
}


/* ==========================================================================
   EVENCE RP - CENTERED LARGE PAUSE MENU
   Main menu only. Settings/bindings keep their existing functional layout.
   ========================================================================== */

.page[data-page="root"] {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 660px;
  height: auto;
  transform: translate(-50%, -50%) scale(.985);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.page[data-page="root"].active {
  transform: translate(-50%, -50%) scale(1);
}

.page[data-page="root"] .hero-copy {
  width: 100%;
  margin: 0 0 26px 0;
  text-align: center;
}

.page[data-page="root"] .hero-copy h1 {
  font-size: clamp(46px, 4vw, 68px);
  letter-spacing: -2px;
  line-height: 1;
}

.page[data-page="root"] .menu-list {
  width: 100%;
  gap: 14px;
}

.page[data-page="root"] .menu-button {
  width: 100%;
  height: 90px;
  padding: 0 34px 0 40px;
  border-radius: 16px;
  font-size: 21px;
  letter-spacing: .7px;
  background: rgba(32, 32, 32, .84);
  border-color: rgba(255, 255, 255, .15);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

.page[data-page="root"] .menu-button.primary {
  background:
    linear-gradient(90deg,
      rgba(211, 99, 0, .86) 0%,
      rgba(114, 62, 18, .74) 50%,
      rgba(38, 32, 28, .88) 100%);
  border-color: rgba(255, 159, 0, .88);
}

.page[data-page="root"] .menu-button:hover {
  transform: scale(1.015);
}

.page[data-page="root"] .arrow {
  font-size: 30px;
}

/* Center the brand directly above the main menu, like the requested mockup. */
.brand {
  top: calc(50% - 390px);
  left: 50%;
  transform: translateX(-50%);
  gap: 16px;
}

.brand-mark {
  width: 70px;
  height: 70px;
  font-size: 42px;
}

.brand-name {
  font-size: 25px;
  letter-spacing: 2.4px;
}

.brand-sub {
  font-size: 12px;
  letter-spacing: 5px;
}

/* Keep secondary pages comfortably centered too. */
.page:not([data-page="root"]):not([data-page="exit"]) {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateX(-14px);
  width: min(900px, calc(100vw - 120px));
  height: min(760px, calc(100vh - 120px));
}

.page:not([data-page="root"]):not([data-page="exit"]).active {
  transform: translate(-50%, -50%) translateX(0);
}

.settings-menu {
  width: min(680px, 100%);
}

.scroll-panel {
  width: 100%;
}

.controls-menu {
  width: min(760px, 100%);
}

.binding-page {
  width: min(980px, calc(100vw - 100px)) !important;
}

@media (max-width: 900px), (max-height: 760px) {
  .brand {
    top: 34px;
  }

  .page[data-page="root"] {
    width: min(620px, calc(100vw - 60px));
    top: 54%;
  }

  .page[data-page="root"] .menu-button {
    height: 74px;
    font-size: 18px;
  }

  .page[data-page="root"] .hero-copy h1 {
    font-size: 44px;
  }
}
