@font-face {
  font-family: "FZYanSong";
  src: url("./assets/FZYanSong-Zhong.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #f8f7ee;
  --muted: rgba(248, 247, 238, 0.72);
  --gold: #ffd21a;
  --gold-deep: #a77608;
  --blue: #050a32;
  --red: #b51d16;
  --shadow: rgba(0, 0, 0, 0.58);
  --poster-w: min(92vw, 1500px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  font-family: "FZYanSong", "方正颜宋简体_中", "FZYanSJW_Zhong", "STSong", serif;
  background:
    radial-gradient(circle at 78% 88%, rgba(181, 29, 22, 0.42), transparent 24rem),
    radial-gradient(circle at 18% 8%, rgba(24, 86, 160, 0.28), transparent 28rem),
    #02051d;
}

button,
input {
  font: inherit;
}

.deck-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  padding: 26px 360px 104px 34px;
}

.poster-frame {
  width: var(--poster-w);
  max-height: calc(100vh - 150px);
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.48);
}

.poster {
  --bg-img: url("./assets/thinker-wide.png");
  --quote-size: clamp(42px, 4.4vw, 82px);
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #07091d;
}

.stage-bg,
.stage-bg::before,
.stage-bg::after {
  position: absolute;
  inset: 0;
  z-index: -5;
  content: "";
}

.stage-bg {
  background-image: var(--bg-img);
  background-size: cover;
  background-position: center;
  transform: scale(1.015);
  filter: saturate(1.12) contrast(1.1) brightness(0.54);
  transition: background-image 360ms ease, filter 360ms ease, transform 700ms ease;
}

.stage-bg::before {
  background:
    linear-gradient(90deg, rgba(3, 6, 31, 0.96) 0%, rgba(4, 8, 37, 0.88) 40%, rgba(4, 7, 30, 0.58) 68%, rgba(4, 7, 24, 0.78) 100%),
    radial-gradient(circle at 12% 64%, rgba(255, 206, 29, 0.17), transparent 13rem),
    radial-gradient(circle at 88% 94%, rgba(230, 41, 24, 0.68), transparent 22rem);
}

.stage-bg::after {
  background:
    linear-gradient(116deg, transparent 0 38%, rgba(255, 255, 255, 0.08) 39%, transparent 47%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 32%),
    radial-gradient(circle at 72% 18%, rgba(45, 93, 190, 0.18), transparent 20rem);
  mix-blend-mode: screen;
}

.poster.variant-1 {
  --bg-img: url("./assets/thinker-vertical.png");
}

.poster.variant-1 .stage-bg {
  background-size: cover;
  background-position: 83% 48%;
  filter: saturate(1.06) contrast(1.08) brightness(0.58);
}

.poster.variant-2 .stage-bg {
  background-position: 38% 52%;
  filter: saturate(1.28) contrast(1.12) brightness(0.56);
}

.poster.variant-3 .stage-bg {
  transform: scale(1.06) translateX(-1.8%);
  filter: saturate(1.08) contrast(1.2) brightness(0.52);
}

.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.34;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1.7px);
  background-size: 34px 34px, 47px 47px;
  mix-blend-mode: overlay;
}

.ink-scratches {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
  background:
    linear-gradient(92deg, transparent 0 8%, rgba(255, 255, 255, 0.28) 8.15%, transparent 8.5%),
    linear-gradient(178deg, transparent 0 76%, rgba(255, 255, 255, 0.16) 76.2%, transparent 76.55%);
}

.brand {
  position: absolute;
  top: 52px;
  left: 56px;
  display: flex;
  gap: 22px;
  align-items: center;
  letter-spacing: 0.08em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.42);
}

.enso {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.brand-title {
  font-size: clamp(25px, 2.1vw, 42px);
  font-family: "Times New Roman", "FZYanSong", serif;
  font-weight: 500;
}

.brand-sub {
  margin-top: 6px;
  font-size: clamp(12px, 1.1vw, 18px);
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.12em;
}

.quote-block {
  position: absolute;
  left: 58px;
  top: 31%;
  width: min(74%, 1010px);
  transform: translateY(-6%);
  animation: liftIn 460ms ease both;
}

.poster.align-center .quote-block {
  left: 8%;
  top: 30%;
  width: 84%;
}

.poster.align-bottom .quote-block {
  top: 38%;
  width: 78%;
}

.quote-mark {
  position: absolute;
  top: -92px;
  left: -8px;
  font-family: Georgia, serif;
  font-size: clamp(118px, 11vw, 190px);
  line-height: 1;
  color: var(--gold);
  opacity: 0.82;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
}

.quote-text {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 1100px;
  font-size: var(--quote-size);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0.015em;
  text-wrap: balance;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.28),
    0 13px 34px rgba(0, 0, 0, 0.62);
}

.quote-text .gold {
  color: var(--gold);
  text-shadow:
    0 0 16px rgba(255, 210, 26, 0.26),
    0 5px 24px rgba(0, 0, 0, 0.68);
}

.quote-text.small {
  font-size: 0.86em;
}

.speaker-card {
  position: absolute;
  right: 72px;
  top: 58%;
  display: grid;
  grid-template-columns: 12px auto;
  column-gap: 14px;
  align-items: center;
  min-width: 190px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.gold-bar {
  grid-row: span 2;
  width: 10px;
  height: 48px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  box-shadow: 0 0 24px rgba(255, 210, 26, 0.48);
}

.speaker-card strong {
  font-size: clamp(30px, 2.2vw, 42px);
  line-height: 1;
}

.speaker-card span {
  font-size: clamp(17px, 1.4vw, 24px);
  color: rgba(255, 255, 255, 0.82);
}

.poster-footer {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 34px;
  display: grid;
  grid-template-columns: 1fr auto 92px;
  gap: 32px;
  align-items: end;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: "Times New Roman", "FZYanSong", serif;
}

.footer-left strong {
  font-size: clamp(28px, 2.2vw, 42px);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.footer-left span {
  font-size: clamp(24px, 2vw, 36px);
  color: rgba(255, 255, 255, 0.84);
}

.event-title {
  font-size: clamp(38px, 4.6vw, 82px);
  font-weight: 900;
  color: white;
  white-space: nowrap;
  transform: rotate(-4deg);
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.7);
}

.qr-fake {
  width: 82px;
  height: 82px;
  border: 4px solid rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(90deg, #111 50%, transparent 50%) 0 0 / 12px 12px,
    linear-gradient(#111 50%, #f5f2df 50%) 0 0 / 12px 12px,
    #f5f2df;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.1), 0 0 26px rgba(255, 209, 26, 0.32);
}

.source-line {
  position: absolute;
  left: 62px;
  bottom: 153px;
  max-width: 72%;
  font-size: clamp(13px, 1vw, 17px);
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.05em;
}

.page-number {
  position: absolute;
  right: 66px;
  bottom: 154px;
  font-family: Georgia, serif;
  font-size: clamp(24px, 2.4vw, 44px);
  color: rgba(255, 255, 255, 0.34);
}

.controls {
  position: fixed;
  left: 34px;
  right: 360px;
  bottom: 23px;
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  gap: 18px;
  align-items: center;
}

.nav-btn,
.floating-actions button,
.panel-head button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  background: rgba(5, 10, 38, 0.62);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-btn {
  height: 58px;
  border-radius: 50%;
  font-size: 48px;
  line-height: 0.7;
}

.nav-btn:hover,
.floating-actions button:hover,
.panel-head button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 210, 26, 0.75);
  background: rgba(9, 18, 66, 0.82);
}

.control-center {
  display: grid;
  gap: 8px;
}

.progress-label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.08em;
}

.range {
  width: 100%;
  accent-color: var(--gold);
}

.hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
}

.side-panel {
  position: fixed;
  top: 22px;
  right: 24px;
  bottom: 22px;
  width: 308px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(2, 5, 27, 0.62);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  transition: transform 260ms ease;
}

.side-panel.collapsed {
  transform: translateX(calc(100% - 54px));
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-head strong,
.panel-head span {
  display: block;
}

.panel-head strong {
  font-size: 20px;
}

.panel-head span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.panel-head button,
.floating-actions button {
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 13px;
}

.quote-list {
  overflow: auto;
  padding: 10px;
}

.quote-list button {
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-align: left;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.quote-list button.active {
  color: white;
  border-color: rgba(255, 210, 26, 0.65);
  background: linear-gradient(90deg, rgba(255, 210, 26, 0.18), rgba(255, 255, 255, 0.05));
}

.quote-list .item-no {
  color: var(--gold);
  margin-right: 8px;
  font-family: Georgia, serif;
}

.floating-actions {
  position: fixed;
  left: 34px;
  top: 24px;
  display: flex;
  gap: 10px;
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(-6%);
    filter: blur(0);
  }
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .deck-shell {
    height: auto;
    min-height: 100vh;
    padding: 74px 18px 124px;
  }

  .poster-frame {
    width: min(100%, 1100px);
  }

  .side-panel {
    top: auto;
    left: 18px;
    right: 18px;
    bottom: 16px;
    width: auto;
    height: 178px;
  }

  .side-panel.collapsed {
    transform: translateY(calc(100% - 54px));
  }

  .controls {
    left: 18px;
    right: 18px;
    bottom: 204px;
  }

  .floating-actions {
    left: 18px;
  }

  .speaker-card,
  .qr-fake {
    display: none;
  }

  .poster-footer {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 760px) {
  .poster-frame {
    aspect-ratio: 9 / 16;
    max-height: 74vh;
  }

  .poster {
    --quote-size: clamp(35px, 8.5vw, 62px);
  }

  .brand {
    top: 28px;
    left: 24px;
    gap: 12px;
  }

  .enso {
    width: 42px;
    height: 42px;
  }

  .brand-sub,
  .source-line,
  .page-number,
  .event-title {
    display: none;
  }

  .quote-block,
  .poster.align-center .quote-block,
  .poster.align-bottom .quote-block {
    left: 26px;
    right: 24px;
    top: 28%;
    width: auto;
  }

  .quote-mark {
    top: -68px;
  }

  .poster-footer {
    left: 26px;
    bottom: 28px;
    right: 26px;
    display: block;
  }

  .footer-left strong {
    font-size: 28px;
  }

  .footer-left span {
    font-size: 22px;
  }
}
