:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #06111f;
  color: #e5edf7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 15%, rgba(34, 211, 238, 0.2), transparent 32rem),
    linear-gradient(135deg, #07111f 0%, #0f172a 54%, #111827 100%);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #7dd3fc;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.06;
}

.sub {
  max-width: 680px;
  color: #b7c7d8;
  font-size: 18px;
  line-height: 1.7;
}

.status {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid rgba(125, 211, 252, 0.38);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #bae6fd;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.panel,
.preview {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  background: #07111f;
  color: #f8fafc;
  font: inherit;
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #7dd3fc;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 14px;
}

.segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.segments button {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #07111f;
  color: #dbeafe;
  padding: 10px 12px;
}

.segments button.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
  color: #e0f2fe;
}

.formulaFields {
  display: grid;
  gap: 12px;
}

.hidden {
  display: none;
}

button {
  border: 0;
  border-radius: 6px;
  background: #38bdf8;
  color: #082f49;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  padding: 13px 18px;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.preview {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 520px;
  padding: 18px;
}

.videoLikeExample {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 92px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #000000;
  color: #f5f5f5;
  font-family: "Times New Roman", serif;
  font-size: 26px;
  text-align: center;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

.videoBox {
  display: grid;
  place-items: center;
  min-height: 390px;
  border: 1px dashed rgba(125, 211, 252, 0.28);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.46);
  color: #94a3b8;
  overflow: hidden;
}

video {
  display: block;
  width: 100%;
  max-height: 520px;
  background: #020617;
}

.download {
  justify-self: center;
  margin-top: 14px;
  color: #7dd3fc;
}

.hint {
  margin: 16px 4px 0;
  color: #9fb0c4;
  line-height: 1.7;
}

.donateSection {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: center;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.68);
}

.donateCopy h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.donateCopy p:last-child {
  margin: 0;
  color: #b7c7d8;
  line-height: 1.75;
}

.donateGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.donateCard {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.38);
  text-align: center;
}

.donateCard a {
  display: block;
  width: 100%;
}

.donateCard img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: #ffffff;
}

.donateCard strong {
  color: #f8fafc;
  font-size: 20px;
}

.donateCard span {
  color: #9fb0c4;
  font-size: 13px;
}

.siteFooter {
  padding: 22px 12px 32px;
  text-align: center;
}

.siteFooter a {
  color: #9fb0c4;
  text-decoration: none;
}

.siteFooter a:hover {
  color: #e0f2fe;
}

pre {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 180px;
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 6px;
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}

@media (max-width: 900px) {
  .hero,
  .workspace,
  .donateSection {
    grid-template-columns: 1fr;
    display: grid;
  }

  .status {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .grid,
  .donateGrid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 20px, 1180px);
    padding: 24px 0;
  }
}

/* Mobile polish */
body {
  overflow-x: hidden;
}

.panel,
.preview,
.donateCopy,
.donateGrid,
.donateCard {
  min-width: 0;
}

input,
select,
textarea {
  min-width: 0;
}

.videoLikeExample,
.videoBox {
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .preview {
    min-height: auto;
  }

  .videoBox {
    min-height: 320px;
  }
}

@media (max-width: 560px) {
  .grid,
  .donateGrid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 20px, 1180px);
    padding: 24px 0;
  }

  .hero {
    gap: 14px;
    margin-bottom: 18px;
  }

  h1 {
    font-size: 32px;
    line-height: 1.12;
  }

  .sub {
    margin-bottom: 0;
    font-size: 15px;
    line-height: 1.65;
  }

  .status {
    width: 100%;
    text-align: center;
  }

  .workspace {
    gap: 16px;
  }

  .panel,
  .preview,
  .donateSection {
    padding: 14px;
  }

  .videoBox {
    min-height: 230px;
  }

  button {
    width: 100%;
    min-height: 46px;
  }

  .donateCard {
    grid-template-columns: 96px 1fr;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .donateCard img {
    width: 96px;
  }
}
