/* src/styles.css */
:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  --bg: #0d1017;
  --panel: rgba(16, 20, 30, 0.78);
  --panel-strong: rgba(12, 15, 22, 0.95);
  --text: #eef2ff;
  --muted: #98a2b3;
  --accent: #7dd3fc;
  --accent-2: #f59e0b;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(
      circle at top left,
      rgba(125, 211, 252, 0.15),
      transparent 28%),
    radial-gradient(
      circle at bottom right,
      rgba(245, 158, 11, 0.14),
      transparent 24%),
    linear-gradient(
      160deg,
      #0b1020 0%,
      #101726 45%,
      #0a0d14 100%);
  color: var(--text);
}
body {
  min-height: 100vh;
}
button,
input,
select {
  font: inherit;
}
#app {
  min-height: 100vh;
}
.shell {
  width: min(1480px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 16px 0 20px;
}
.viewer-top,
.viewer-frame {
  backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}
.viewer-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 22px;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}
h1,
h2 {
  margin: 0;
  line-height: 1.1;
}
.arrow-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 24, 0.55);
  color: var(--text);
}
.arrow-btn:hover {
  border-color: rgba(125, 211, 252, 0.55);
  transform: translateY(-50%) scale(1.02);
}
.viewer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.viewer-frame {
  border-radius: 26px;
  padding: 20px;
}
.stage {
  margin-top: 16px;
  position: relative;
}
.arrow-btn,
.page-badge {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.arrow-btn {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
}
.arrow-left {
  left: -6px;
}
.arrow-right {
  right: -6px;
}
.arrow-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.viewer-stage {
  display: grid;
  place-items: center;
  min-height: min(76vh, 920px);
  perspective: 1800px;
  overflow: hidden;
}
.page-surface {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}
.page-layer {
  position: absolute;
  inset: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}
.page-layer.one-page {
  width: 100%;
}
.page-layer.two-page {
  width: 100%;
}
.page-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-width: min(44vw, 520px);
  min-height: min(74vh, 840px);
}
.page-slot.blank {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}
.page-slot canvas {
  display: block;
  max-width: min(100%, 1100px);
  max-height: min(74vh, 880px);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  background: #fff;
}
.page-layer.current {
  z-index: 2;
}
.loading {
  color: var(--muted);
  font-size: 1rem;
  padding: 24px;
}
.page-badge {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  font-size: 0.75rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 8px;
  border-radius: 999px;
}
@media (max-width: 900px) {
  .viewer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .viewer-stage {
    min-height: 60vh;
  }
  .page-slot {
    min-width: 100%;
    min-height: 58vh;
  }
  .page-slot canvas {
    max-height: 58vh;
  }
  .arrow-left {
    left: -2px;
  }
  .arrow-right {
    right: -2px;
  }
}
