:root {
  color-scheme: light;
  --ink: #2a1b13;
  --muted: #7a6254;
  --paper: #fff9ef;
  --line: rgba(113, 47, 28, 0.18);
  --red: #a72f24;
  --red-dark: #7a1d17;
  --gold: #d7a33f;
  --green: #1e6655;
  --shadow: 0 18px 50px rgba(81, 35, 18, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: #f7efe3;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px min(7vw, 84px) 96px;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(37, 18, 10, 0.72), rgba(70, 27, 17, 0.42), rgba(255, 244, 220, 0.12)),
    url("../assets/nanyue-blessing-bg.png") center / cover no-repeat;
}

.hero__content {
  position: relative;
  max-width: 920px;
  color: #fff7e8;
  text-shadow: 0 2px 16px rgba(20, 10, 4, 0.42);
  text-align: center;
}

.brand-line {
  display: inline-flex;
  font-size: 17px;
  font-weight: 700;
  color: #f7d188;
  margin-bottom: 22px;
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 209, 136, 0.62);
}

h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero h1 {
  color: #ffd56d;
  background: linear-gradient(180deg, #fff8cb 0%, #ffd56d 42%, #f09a28 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 22px rgba(67, 19, 8, 0.52);
}

.hero p {
  max-width: 780px;
  margin: 24px 0 0;
  font-size: 20px;
  line-height: 1.7;
}

.hero-subcopy {
  margin-left: auto;
  margin-right: auto;
}

.video-stage {
  margin: 34px auto 0;
  width: min(860px, 100%);
  display: grid;
  gap: 10px;
}

.video-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 235, 194, 0.58);
  background: rgba(35, 14, 10, 0.72);
  box-shadow: 0 18px 46px rgba(20, 10, 4, 0.34);
}

.video-stage span {
  color: #ffe8b6;
  font-weight: 700;
  font-size: 15px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
  justify-content: center;
}

.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}

.primary-link {
  background: #f1c15f;
  color: #4b1b11;
}

.ghost-link {
  border: 1px solid rgba(255, 235, 194, 0.72);
  color: #fff3d4;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 480px) minmax(320px, 560px);
  gap: 28px;
  align-items: start;
  max-width: 1120px;
  margin: -64px auto 0;
  padding: 0 24px 44px;
  position: relative;
  z-index: 2;
}

.panel,
.poster-panel {
  background: rgba(255, 250, 241, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-panel {
  padding: 28px;
}

.panel-title {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.panel-title span {
  font-size: 22px;
  font-weight: 800;
}

.panel-title small {
  color: var(--muted);
  line-height: 1.5;
}

form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid rgba(122, 98, 84, 0.32);
  border-radius: 6px;
  background: #fff;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 163, 63, 0.18);
}

button {
  border: 0;
  border-radius: 6px;
  min-height: 46px;
  padding: 0 18px;
  background: var(--red);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  background: var(--red-dark);
}

.result {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: grid;
  gap: 12px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff3df;
  border-radius: 6px;
  padding: 12px 14px;
}

.result-row strong {
  color: var(--red-dark);
  font-size: 24px;
}

.share-box {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
}

.share-tip {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#downloadPoster,
#copyLink {
  background: var(--green);
}

.poster-panel {
  padding: 18px;
}

canvas {
  width: 100%;
  display: block;
  border-radius: 6px;
  background: #ead7bd;
}

.rules {
  max-width: 1120px;
  margin: 0 auto 56px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.rule-item {
  border-top: 3px solid var(--gold);
  background: rgba(255, 250, 241, 0.82);
  padding: 18px;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.rule-item strong {
  color: var(--red-dark);
  font-size: 18px;
}

.rule-item span {
  color: var(--muted);
  line-height: 1.6;
  font-size: 17px;
}

.rule-item a {
  color: var(--red-dark);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 29, 23, 0.36);
}

.info-page {
  min-height: 100vh;
  padding: 28px 24px 56px;
  background:
    linear-gradient(180deg, rgba(255, 249, 232, 0.9), rgba(247, 239, 227, 0.98)),
    url("./assets/nanyue-blessing-bg.png") center / cover fixed;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.9);
  color: var(--red-dark);
  text-decoration: none;
  font-weight: 800;
  border: 1px solid var(--line);
}

.info-hero {
  max-width: 920px;
  margin: 80px auto 28px;
  text-align: center;
  color: var(--ink);
}

.info-hero.compact {
  margin-top: 52px;
}

.info-hero span {
  color: var(--red-dark);
  font-weight: 900;
  font-size: 20px;
}

.info-hero h1 {
  margin-top: 16px;
  font-size: clamp(38px, 6vw, 70px);
}

.info-hero p {
  margin: 22px auto 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.8;
}

.ghost-link.dark {
  border-color: rgba(122, 29, 23, 0.34);
  color: var(--red-dark);
  background: rgba(255, 250, 241, 0.72);
}

.store-grid {
  max-width: 980px;
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.store-grid a {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 18px 20px;
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.94);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(81, 35, 18, 0.11);
}

@media (max-width: 860px) {
  .hero {
    min-height: 86vh;
    padding: 42px 18px 92px;
  }

  .hero p {
    font-size: 17px;
  }

  .primary-link,
  .ghost-link {
    width: 66%;
    min-width: 220px;
    font-size: 17px;
  }

  .workspace,
  .rules {
    grid-template-columns: 1fr;
  }

  .workspace {
    margin-top: -54px;
  }

  .share-box,
  .button-row {
    grid-template-columns: 1fr;
  }

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