:root {
  color-scheme: dark;
  font-family: Roboto, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(94, 80, 242, 0.38), transparent 34%),
    linear-gradient(180deg, #091123 0%, #060913 100%);
}

body {
  color: #f6f8ff;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.scene-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.scene-canvas.is-dragging {
  cursor: grabbing;
}

.overlay-panel {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10;
  width: min(420px, calc(100vw - 48px));
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(10, 15, 28, 0.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 64px rgba(2, 6, 18, 0.42);
}

.overlay-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.overlay-copy {
  margin: 0.4rem 0 0;
  color: rgba(232, 238, 255, 0.74);
  font-size: 0.92rem;
  line-height: 1.5;
}

.status-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.status-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(214, 222, 255, 0.58);
}

.status-value {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.94rem;
  font-weight: 600;
  color: #f9fbff;
  word-break: break-word;
}

.controls-copy {
  margin: 14px 0 0;
  color: rgba(232, 238, 255, 0.78);
  font-size: 0.84rem;
  line-height: 1.55;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f6f8ff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.quick-link:hover,
.quick-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(145, 101, 255, 0.46);
}

.open-ac2-button {
  appearance: none;
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.45rem;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2764ff 0%, #675bff 58%, #9165ff 100%);
  box-shadow: 0 18px 40px rgba(39, 100, 255, 0.26);
  cursor: pointer;
}

.open-ac2-button:hover {
  filter: brightness(1.06);
}

.open-ac2-button:focus-visible {
  outline: 3px solid rgba(70, 113, 255, 0.3);
  outline-offset: 4px;
}

.open-ac2-button:disabled {
  cursor: wait;
  filter: saturate(0.82);
  opacity: 0.82;
}

.scene-help {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(10, 15, 28, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(236, 241, 255, 0.84);
  font-size: 0.82rem;
  line-height: 1.5;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ac2-modal[hidden] {
  display: none;
}

.ac2-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.ac2-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, 0.56);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ac2-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1280px, calc(100vw - 32px));
  height: min(780px, calc(100vh - 32px));
  transform: translate(-50%, -50%);
  border-radius: 28px;
  overflow: hidden;
  background: #050814;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 36px 80px rgba(3, 8, 22, 0.45);
}

.ac2-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #050814;
}

@media (max-width: 960px) {
  .overlay-panel {
    top: 16px;
    left: 16px;
    width: calc(100vw - 32px);
  }

  .scene-help {
    right: 16px;
    bottom: 16px;
    max-width: calc(100vw - 32px);
  }

  .ac2-panel {
    width: 100vw;
    height: calc(100vh - 24px);
    top: 24px;
    left: 0;
    transform: none;
    border-radius: 22px 22px 0 0;
  }
}
