/* app.css — standalone roulette page chrome.
   The cabinet itself is styled by slot_machine.css (kept as-is); the lever
   rules below are the one override — in the main app the lever is decoration,
   here it's the control. */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #0d0d12;
  overflow: hidden;
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
}

#root {
  width: 100%;
  height: 100%;
}

/* ── LEVER — clickable, unlike the main app's decorative one ─────────────── */
/* .slot-machine-overlay sets pointer-events:none; the lever opts back in. */
.slot-lever-area {
  pointer-events: auto;
  cursor: default;
  outline: none;
}

.slot-lever-area.pullable {
  cursor: pointer;
}

/* Idle invitation — a soft pulse on the ball so it reads as "pull me".
   Uses box-shadow only: the ball's transform is translateX(-50%) and the arm
   owns the pull animation, so animating transform here would fight both. */
.slot-lever-area.pullable .slot-lever-ball {
  animation: leverBeckon 2.2s ease-in-out infinite;
}

.slot-lever-area.pullable:hover .slot-lever-ball,
.slot-lever-area.pullable:focus-visible .slot-lever-ball {
  animation: none;
  box-shadow:
    inset -8px -10px 16px rgba(0,0,0,.5),
    inset 6px 7px 13px rgba(255,255,255,.45),
    0 13px 24px rgba(0,0,0,.55),
    0 0 26px 6px rgba(255,90,90,.75);
}

@keyframes leverBeckon {
  0%, 100% {
    box-shadow:
      inset -8px -10px 16px rgba(0,0,0,.5),
      inset 6px 7px 13px rgba(255,255,255,.45),
      0 13px 24px rgba(0,0,0,.55),
      0 0 0 0 rgba(255,90,90,0);
  }
  50% {
    box-shadow:
      inset -8px -10px 16px rgba(0,0,0,.5),
      inset 6px 7px 13px rgba(255,255,255,.45),
      0 13px 24px rgba(0,0,0,.55),
      0 0 22px 4px rgba(255,90,90,.5);
  }
}

/* ── CONTROL PANEL ───────────────────────────────────────────────────────── */
.ro-panel {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  background: rgba(16, 16, 24, 0.92);
  border: 1px solid rgba(215, 173, 68, 0.35);
  border-radius: 12px;
  padding: 12px 14px 14px;
  width: 268px;
  color: #e8e2cf;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.ro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ro-title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  color: #f0d47a;
}

.ro-hide-btn {
  background: transparent;
  border: 1px solid #3a3a4c;
  color: #9a9482;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  font-size: 11px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
}

.ro-hide-btn:hover {
  border-color: #d7ad44;
  color: #fff;
}

/* Floating restore button shown while the panel is hidden. */
.ro-show-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(16, 16, 24, 0.75);
  border: 1px solid rgba(215, 173, 68, 0.35);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity .15s ease, border-color .15s ease;
}

.ro-show-btn:hover {
  opacity: 1;
  border-color: #f0d47a;
}

.ro-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ro-mode-btn {
  background: #1c1c28;
  border: 1px solid #3a3a4c;
  color: #cfc9b8;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
}

.ro-mode-btn:hover {
  border-color: #d7ad44;
  color: #fff;
}

.ro-mode-btn.active {
  background: linear-gradient(180deg, #8a6418, #5a4110);
  border-color: #f0d47a;
  color: #fff3c0;
  font-weight: 700;
}

/* ── SOUND ───────────────────────────────────────────────────────────────── */
.ro-sound {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2a2a38;
}

.ro-mute-btn {
  background: #1c1c28;
  border: 1px solid #3a3a4c;
  border-radius: 6px;
  width: 28px;
  height: 26px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

.ro-mute-btn:hover {
  border-color: #d7ad44;
}

.ro-vol {
  flex: 1;
  min-width: 0;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #2a2a38;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.ro-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f0d47a, #8a6418);
  border: 1px solid #fff0bb;
  cursor: pointer;
}

.ro-vol::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f0d47a, #8a6418);
  border: 1px solid #fff0bb;
  cursor: pointer;
}

.ro-vol-num {
  font-size: 10px;
  color: #9a9482;
  width: 32px;
  text-align: right;
  flex: none;
}

.ro-status {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: #9a9482;
  min-height: 2.6em;
}

/* ── НА ГЛАВНУЮ ──────────────────────────────────────────────────────────── */
.ro-back {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #2a2a38;
  font-size: 11px;
  color: #9a9482;
  text-decoration: none;
  transition: color .15s ease;
}

.ro-back:hover {
  color: #f0d47a;
}

/* ── MOBILE ──────────────────────────────────────────────────────────────── */
/* Панель и автомат больше не накладываются: медиа-запросы сжимают
   .slot-machine-overlay, а автомат сам вписывается в неё (SlotMachine.jsx
   меряет overlay, а не окно). */

/* Телефон в альбомной ориентации: панель — узкая колонка слева. */
@media (max-height: 520px) {
  .slot-machine-overlay { left: 208px; }

  .ro-panel {
    top: 8px;
    left: 8px;
    bottom: 8px;
    width: 192px;
    padding: 8px 10px 10px;
    box-sizing: border-box;
    overflow-y: auto;
  }

  .ro-modes { grid-template-columns: 1fr; }
  .ro-status { min-height: 0; }
}

/* Телефон в портретной ориентации: панель прижата к низу. */
@media (max-width: 700px) and (min-height: 521px) {
  .slot-machine-overlay { bottom: 208px; }

  .ro-panel {
    top: auto;
    bottom: 8px;
    left: 8px;
    right: 8px;
    width: auto;
    padding: 8px 10px 10px;
    box-sizing: border-box;
  }

  .ro-status { min-height: 0; }
}

/* Панель скрыта (✕) — весь экран отдаётся автомату. */
body.ro-panel-hidden .slot-machine-overlay {
  inset: 0;
}
