/* ==================================================================
   rec.html · 竖屏录制启动页
   Desktop-oriented control panel next to a phone-shaped stage.
   ================================================================== */

/* style.css locks html/body to the viewport for the stage page; this page is
   a normal scrolling document, so let it through. */
html {
  overflow-y: auto;
  height: auto;
}

body {
  position: static;
  margin: 0;
  min-height: 100%;
  height: auto;
  overflow: visible;
  background:
    radial-gradient(ellipse 70% 60% at 12% 0%, rgba(99, 245, 165, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 88% 100%, rgba(255, 122, 217, 0.07), transparent 60%),
    #05030a;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* The stage stays dead-centre (so the eyes look into the laptop camera) and
   the options live in a column on the right, which keeps the whole page on
   one screen without scrolling. */
.rec {
  position: relative;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rec-body {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  flex: 1;
}

.rec-head { max-width: 820px; }

.rec-head-row {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.rec-eyebrow {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: rgba(99, 245, 165, 0.7);
}
.rec-head h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.04em;
}
.rec-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(249, 238, 247, 0.54);
}

/* lower band: stage on the left, options on the right */
.rec-stage-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(360px, 92vw);
  margin: 0 auto;
}



/* ---- stage ------------------------------------------------------- */



.rec-stage {
  position: relative;
  border-radius: 30px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rec-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 0 8px 8px;
  font-size: 10px;
  color: rgba(249, 238, 247, 0.42);
}

.rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #79ffc9;
  box-shadow: 0 0 8px #79ffc9;
  flex: none;
}

.rec-url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9.5px;
}

.rec-open,
.rec-restart {
  flex: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(249, 238, 247, 0.8);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.rec-restart { width: 26px; padding: 5px 0; }

.rec-open:hover,
.rec-restart:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.rec-iframe {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 130px);
  margin: 0 auto;
  border: 0;
  border-radius: 24px;
  background: #05030a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 24px 70px rgba(0, 0, 0, 0.6);
}
.rec-ratio-note {
  flex: none;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(249, 238, 247, 0.34);
  font-variant-numeric: tabular-nums;
}

.rec-stage { width: 100%; }

/* ---- panel ------------------------------------------------------- */

.rec-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 340px;
  max-height: 100%;
  overflow-y: auto;
  gap: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.rec-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rec-label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(249, 238, 247, 0.42);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rec-label output {
  color: rgba(99, 245, 165, 0.85);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.rec-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rec-seg button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(249, 238, 247, 0.7);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.rec-seg button:hover { background: rgba(255, 255, 255, 0.08); }

.rec-seg button.is-active {
  color: #05140d;
  background: #79ffc9;
  border-color: #79ffc9;
  font-weight: 600;
}

.rec-themes button::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--swatch, #fff);
  vertical-align: 1px;
  box-shadow: 0 0 8px var(--swatch, #fff);
}

.rec-range {
  width: 100%;
  accent-color: #79ffc9;
}

.rec-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: rgba(249, 238, 247, 0.7);
  cursor: pointer;
}

.rec-toggle input { accent-color: #79ffc9; width: 15px; height: 15px; }

.rec-recording {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.rec-recording-title {
  margin: 14px 0 8px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(249, 238, 247, 0.42);
}

.rec-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(249, 238, 247, 0.62);
}

.rec-steps b { color: rgba(200, 255, 224, 0.95); font-weight: 600; }

.rec-steps code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
}

.rec-keyboard {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.9;
  color: rgba(249, 238, 247, 0.44);
}

kbd {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  text-align: center;
  color: rgba(249, 238, 247, 0.8);
}

/* status dot + text; sits in the top band on wide windows */
.rec-head-row {
  grid-area: head;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.rec-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(249, 238, 247, 0.4);
}

.rec-foot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #79ffc9;
  box-shadow: 0 0 8px #79ffc9;
}

/* Narrow windows cannot hold a right-hand rail: stack the options under
   the stage again. */
@media (max-width: 1100px) {
  .rec { align-items: center; }
  .rec-body {
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
  }
  .rec-panel {
    position: static;
    width: min(620px, 100%);
    max-height: none;
    margin-top: 12px;
  }
  /* keep the 9:16 stage, sized by height so it never gets squashed;
     the page may scroll a little in this narrow case */
  .rec-iframe {
    width: auto;
    height: min(58vh, 620px);
    max-height: none;
  }
}

@media (max-width: 900px) {
  .rec { padding: 14px 12px 16px; }
  .rec-foot { justify-content: center; }
}

/* wide-but-short windows: the right-hand rail still needs the height */
@media (min-width: 1101px) and (max-height: 860px) {
  .rec { padding-top: 12px; gap: 8px; }
  .rec-iframe { max-height: calc(100vh - 150px); }
}

/* the bar's right-hand action is a link back to the landscape page */
.rec-back {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 24px;
}
