:root {
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --accent: #f5c542;
  --accent-2: #7dd3fc;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(125, 211, 252, 0.16), transparent 34%),
    radial-gradient(circle at right, rgba(245, 197, 66, 0.12), transparent 28%),
    linear-gradient(180deg, #08101d 0%, #0b1020 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  padding: 24px;
}

.app {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 1;
}

.sub {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 70ch;
  line-height: 1.5;
}

/* Logo in the top-right */
.brand-logo {
  width: clamp(120px, 16vw, 240px);
  height: auto;
  max-height: 130px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
  align-items: center;
}

.toolbar button {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(180deg, #f7cf72, #d8a92f);
  color: #10203b;
}

.page-info {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}

.viewer {
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  padding: 18px;
}

.spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
  min-height: 72vh;
}

canvas {
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 2px 4px 8px;
}

.footer-links a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 700;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  body {
    padding: 12px;
  }

  .hero,
  .toolbar,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo {
    width: clamp(100px, 30vw, 180px);
    max-height: 110px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .spread {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}