:root {
  --bg-main: #0b0b0c;
  --bg-secondary: #151313;
  --card: rgba(22, 18, 18, 0.72);
  --card-border: rgba(212, 170, 79, 0.20);
  --text: #f5e7b2;
  --muted: #cbb37a;
  --accent: #d4aa4f;
  --accent-hover: #be9438;
  --accent-soft: rgba(212, 170, 79, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(212, 170, 79, 0.06), transparent 20%),
    radial-gradient(circle at top right, rgba(212, 170, 79, 0.10), transparent 22%),
    radial-gradient(circle at bottom left, rgba(212, 170, 79, 0.08), transparent 18%),
    linear-gradient(135deg, var(--bg-main), var(--bg-secondary));
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.01) 2px,
      rgba(255,255,255,0.01) 4px
    );
  pointer-events: none;
  z-index: 0;
}

.glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
}

.glow-one {
  width: 260px;
  height: 260px;
  top: 8%;
  left: 8%;
  background: rgba(212, 170, 79, 0.24);
}

.glow-two {
  width: 300px;
  height: 300px;
  right: 8%;
  bottom: 10%;
  background: rgba(212, 170, 79, 0.18);
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  min-height: 100vh;
  padding: 30px 0;
}

.card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 40px 24px 28px;
  text-align: center;
}

.brand-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.brand-logo img {
  width: min(260px, 58vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

.viewer-card {
  padding: 18px;
}

.pdf-shell {
  background: rgba(10, 10, 10, 0.45);
  border: 1px solid rgba(212, 170, 79, 0.14);
  border-radius: 18px;
  min-height: 70vh;
  overflow: hidden;
}

.pdf-top-info {
  text-align: center;
  padding: 14px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(212, 170, 79, 0.12);
  background: rgba(212, 170, 79, 0.04);
}

#page-info {
  display: inline-block;
}

.pdf-canvas-wrap {
  position: relative;
  width: 100%;
  min-height: 300px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

#pdf-render,
#pdf-render-next {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  max-width: calc(100% - 36px);
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
  background: #fff;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#pdf-render {
  z-index: 2;
  opacity: 1;
}

#pdf-render-next {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

#pdf-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid rgba(212, 170, 79, 0.12);
  background: rgba(212, 170, 79, 0.04);
}

#pdf-controls button {
  min-width: 110px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(212, 170, 79, 0.18);
  border-radius: 12px;
  background: rgba(212, 170, 79, 0.08);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

#pdf-controls button:hover {
  background: rgba(212, 170, 79, 0.16);
}

.pdf-bottom-action {
  display: flex;
  justify-content: center;
  padding: 0 16px 22px;
  background: rgba(212, 170, 79, 0.04);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #e1bb61, #c99733);
  color: #111111;
  box-shadow: 0 10px 24px rgba(212, 170, 79, 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #e7c875, #bf8d29);
}

.fallback-box {
  display: none;
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 767px) {
  .wrap {
    padding: 20px 14px 40px;
  }

  .hero-card {
    padding: 28px 18px 22px;
  }

  .viewer-card {
    padding: 12px;
  }

  .brand-logo img {
    width: min(220px, 72vw);
  }

  .pdf-canvas-wrap {
    min-height: 240px;
    padding: 10px;
  }

  #pdf-render,
  #pdf-render-next {
    top: 10px;
    max-width: calc(100% - 20px);
  }

  #pdf-controls button {
    min-width: 96px;
    min-height: 40px;
    font-size: 14px;
  }

  .pdf-bottom-action {
    padding: 0 12px 18px;
  }
}