* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

/* =========================================================
   OPERATOR UI
========================================================= */

.operator-page {
  background: #0d1210;
  color: #ffffff;
  min-height: 100vh;
  padding-bottom: 100px;
}

.operator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 38px;
  background: #121915;
  border-bottom: 1px solid #26332b;
}

.brand {
  color: #d8bb55;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 4px;
}

.operator-header h1 {
  margin: 5px 0 0;
  font-size: 28px;
  letter-spacing: 1px;
}

.program-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #819087;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}

.program-indicator strong {
  color: #ffffff;
}

.program-indicator i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4242;
  box-shadow: 0 0 12px rgba(239, 66, 66, .6);
}

.module-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 20px 38px 0;
  gap: 8px;
}

.tab {
  border: 1px solid #34433a;
  background: #151d18;
  color: #849289;
  padding: 17px 10px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

.tab:hover {
  color: #ffffff;
  background: #1b2720;
}

.tab.active {
  color: #ffffff;
  background: #075f36;
  border-color: #138651;
}

.operator-main {
  margin: 0 38px;
  background: #121915;
  border: 1px solid #29372f;
  border-radius: 0 0 12px 12px;
  min-height: 530px;
}

.module {
  display: none;
  padding: 34px;
}

.module.active {
  display: block;
}

.module-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 34px;
}

.preview-tag {
  color: #84938a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
}

.module-title h2 {
  margin: 5px 0 0;
  font-size: 30px;
}

.take-button {
  background: #b32027;
  color: white;
  border: 1px solid #e34b50;
  border-radius: 8px;
  padding: 16px 28px;
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
}

.take-button:hover {
  background: #d02b32;
}

.module label {
  display: block;
  margin: 20px 0 8px;
  color: #8f9c94;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.large-input,
.raffle-entry input,
.money-input,
textarea {
  width: 100%;
  background: #0d1210;
  color: white;
  border: 2px solid #334139;
  border-radius: 8px;
  outline: none;
}

.large-input,
.raffle-entry input {
  padding: 16px;
  font-size: 20px;
}

.large-input:focus,
.raffle-entry input:focus,
textarea:focus,
.money-input:focus-within {
  border-color: #158b54;
}

.timer-display {
  text-align: center;
  font-size: 112px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  margin: 25px 0 40px;
}

.preset-row,
.control-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 12px 0;
}

.preset-row button,
.control-row button {
  background: #1b2720;
  color: white;
  border: 1px solid #3a4a40;
  border-radius: 7px;
  padding: 13px 22px;
  cursor: pointer;
  font-weight: 800;
}

.preset-row button:hover,
.control-row button:hover {
  background: #26352c;
}

textarea {
  min-height: 260px;
  padding: 18px;
  resize: vertical;
  font-size: 18px;
  line-height: 1.5;
}

.slider-control {
  margin-top: 24px;
}

.slider-control input {
  width: 100%;
}

.raffle-entry {
  display: grid;
  grid-template-columns: 170px 1fr 160px;
  gap: 10px;
}

.raffle-entry button,
.publish-button {
  background: #087443;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.raffle-entry button:hover,
.publish-button:hover {
  background: #0a8d51;
}

.raffle-working-list {
  margin-top: 24px;
}

.raffle-row {
  display: grid;
  grid-template-columns: 150px 1fr 45px;
  gap: 10px;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #29362e;
}

.raffle-row strong {
  color: #e4c65b;
}

.raffle-row button {
  background: transparent;
  color: #d86666;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

.publish-button {
  width: 100%;
  padding: 17px;
  margin-top: 25px;
  letter-spacing: 1px;
}

.money-input {
  display: flex;
  align-items: center;
  padding-left: 18px;
}

.money-input span {
  color: #d8bb55;
  font-size: 36px;
  font-weight: 800;
}

.money-input input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  padding: 15px;
  font-size: 34px;
}

.live-bid-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding: 20px;
  background: #0d1210;
  border: 1px solid #29372f;
  border-radius: 8px;
}

.live-bid-preview span {
  color: #819087;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.live-bid-preview strong {
  color: #e4c65b;
  font-size: 32px;
}

.operator-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
  background: #080c0a;
  border-top: 1px solid #2d3932;
  color: #829087;
  font-size: 12px;
  letter-spacing: 2px;
  z-index: 50;
}

.operator-footer strong {
  color: #ffffff;
}

.operator-footer button {
  background: #202a24;
  color: white;
  border: 1px solid #46534b;
  border-radius: 7px;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 800;
}

/* =========================================================
   PROGRAM OUTPUT
========================================================= */

.program-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #052f23;
  color: #ffffff;
}

#programCanvas {
  position: relative;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(224, 188, 62, .18),
      transparent 24%
    ),
    radial-gradient(
      circle at 15% 85%,
      rgba(16, 132, 86, .35),
      transparent 32%
    ),
    linear-gradient(
      135deg,
      #07563d 0%,
      #063c2e 48%,
      #03251c 100%
    );
}

.program-screen {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  padding: 6cqh 6cqw;
}

.program-screen.active {
  display: flex;
}

.program-eyebrow {
  position: absolute;
  top: 6cqh;
  left: 6cqw;
  font-size: 1.2cqw;
  font-weight: 800;
  letter-spacing: .28em;
  opacity: .8;
}

#program-hold {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hold-title {
  font-size: 5.5cqw;
  line-height: .95;
  font-weight: 300;
  letter-spacing: .04em;
}

.hold-title span {
  display: block;
  color: #e4c65b;
  font-weight: 800;
  margin: 1cqh 0;
}

#program-countdown {
  align-items: center;
  justify-content: center;
}

.program-timer {
  font-size: 20cqw;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.06em;
}

.program-timer.overtime {
  color: #ff4d4d;
}

.teleprompter-screen {
  background: #000000;
  padding: 0;
}

.prompt-mask {
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 35cqh 8cqw 20cqh;
}

.program-prompt {
  color: white;
  font-weight: 600;
  line-height: 1.35;
  white-space: pre-wrap;
  text-align: center;
  will-change: transform;
}

#program-raffle {
  flex-direction: column;
  align-items: center;
  padding-top: 12cqh;
}

.raffle-title {
  margin: 0 0 4cqh;
  font-size: 4cqw;
  letter-spacing: .08em;
}

.program-raffle-list {
  width: 82%;
}

.program-raffle-row {
  display: grid;
  grid-template-columns: 25% 75%;
  padding: 1.4cqh 2cqw;
  border-bottom: 1px solid rgba(255,255,255,.18);
  font-size: 2.1cqw;
}

.program-raffle-row strong {
  color: #e4c65b;
}

.raffle-footer {
  position: absolute;
  bottom: 5cqh;
  font-size: 1.2cqw;
  letter-spacing: .08em;
  opacity: .75;
}

#program-auction {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.program-auction-item {
  max-width: 80%;
  font-size: 4.3cqw;
  line-height: 1.05;
  font-weight: 600;
  margin-bottom: 7cqh;
}

.current-bid-label {
  font-size: 1.2cqw;
  font-weight: 800;
  letter-spacing: .35em;
  opacity: .7;
}

.program-auction-bid {
  margin-top: 1.5cqh;
  color: #e4c65b;
  font-size: 11cqw;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
}

@media (max-width: 800px) {
  .module-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .raffle-entry {
    grid-template-columns: 1fr;
  }

  .timer-display {
    font-size: 80px;
  }
}

/* =========================================================
   FIXED 16:9 PROGRAM CANVAS
   Program is always composed at 1920x1080 geometry.
   The complete canvas scales proportionally to fit the
   available Program window without changing layout.
   ========================================================= */

.program-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

.program-page #programCanvas {
  position: absolute;
  width: 1920px;
  height: 1080px;

  /*
   * --program-scale and placement are calculated below.
   * CSS transform preserves the 1920x1080 composition.
   */
  left: 50%;
  top: 50%;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(var(--program-scale, 1));
}

/*
 * Program content historically uses vw/vh units.
 * Inside a transformed fixed canvas those units would still
 * reference the browser viewport. These custom viewport units
 * make 1vw = 19.2px and 1vh = 10.8px for Program Output.
 *
 * Existing program styles are overridden below where needed.
 */

.program-page .program-screen {
  width: 1920px;
  height: 1080px;
}



/* FIXED PROGRAM CONTAINER UNITS */
.program-page #programCanvas {
  container-type: size;
}
.prompt-hud{position:absolute;inset:0;z-index:2;pointer-events:none}.prompt-hud-timer{position:absolute;top:4cqh;right:5cqw;font-size:2.2cqw;font-weight:900;font-variant-numeric:tabular-nums;color:#d7ddd9}.prompt-hud-note{position:absolute;left:5cqw;bottom:5cqh;max-width:55cqw;font-size:1.35cqw;line-height:1.25;color:#b9c3bd;text-align:left;white-space:pre-wrap}.prompt-hud-note:empty{display:none}.prompt-live-message{position:absolute;z-index:4;left:12cqw;right:12cqw;bottom:4cqh;padding:2cqh 3cqw;border:3px solid #e4c65b;background:#16130bef;color:#fff;font-size:2.2cqw;font-weight:900;text-align:center;border-radius:1cqw}.prompt-live-message[hidden]{display:none}.teleprompter-screen .prompt-mask{position:relative;z-index:1}


/* =========================================================
   TELEPROMPTER PRESENTER DISPLAY — FINAL LAYOUT

   HEADER  : 12% — Presenter Note + Countdown
   PROMPT  : 88% — Script only
   MESSAGE : Temporary overlay inside lower prompt area

   Nothing in the prompt can enter the protected header.
   ========================================================= */

.teleprompter-screen {
  position: absolute;
  overflow: hidden;
  background: #000;
}

/* ---------- PROTECTED HEADER ---------- */

.teleprompter-screen .prompt-hud {
  position: absolute;
  z-index: 5;

  top: 0;
  left: 0;
  right: 0;
  height: 12cqh;

  padding: 2.2cqh 4cqw;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4cqw;

  background: #050505;
  border-bottom: 1px solid rgba(255,255,255,.18);

  pointer-events: none;
}

/* Presenter note */

.teleprompter-screen .prompt-hud-note {
  position: static;
  inset: auto;

  min-width: 0;
  max-width: none;

  color: #b9c5be;
  font-size: 1.25cqw;
  line-height: 1.25;
  text-align: left;
  white-space: pre-wrap;

  overflow: hidden;
}

.teleprompter-screen .prompt-hud-note:not(:empty)::before {
  content: "NOTE  ";

  color: #d8bb55;
  font-size: .8cqw;
  font-weight: 900;
  letter-spacing: .18em;
}

/* Countdown */

.teleprompter-screen .prompt-hud-timer {
  position: static;
  inset: auto;

  color: #fff;
  font-size: 2.4cqw;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;

  white-space: nowrap;
}


/* ---------- TELEPROMPTER VIEWPORT ---------- */

.teleprompter-screen .prompt-mask {
  position: absolute;
  z-index: 1;

  top: 12cqh;
  left: 0;
  right: 0;
  bottom: 0;

  width: auto;
  height: auto;

  /*
     The first line enters well below the header.
     Scroll transform still works exactly as before.
  */
  padding: 22cqh 8cqw 12cqh;

  overflow: hidden;
  background: #000;
}


/* ---------- LIVE PRESENTER MESSAGE ---------- */

.teleprompter-screen .prompt-live-message {
  position: absolute;
  z-index: 10;

  left: 12cqw;
  right: 12cqw;
  bottom: 4cqh;

  min-height: 11cqh;
  max-height: 18cqh;

  padding: 1.8cqh 3cqw;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(20,18,10,.96);

  border: 3px solid #e4c65b;
  border-radius: 1cqw;

  color: #fff;
  font-size: 2.1cqw;
  line-height: 1.15;
  font-weight: 900;
  text-align: center;
  letter-spacing: .025em;

  overflow: hidden;
}

.teleprompter-screen .prompt-live-message[hidden] {
  display: none;
}



/* =========================================================
   PRESENTER COUNTDOWN WARNINGS
   ========================================================= */

.prompt-hud-timer {
  transition:
    color .45s ease,
    text-shadow .45s ease,
    transform .25s ease;
}

/* 60–31 seconds */
.prompt-hud-timer.timer-caution {
  color: #e4c65b;
  text-shadow: 0 0 .8cqw rgba(228,198,91,.32);
}

/* 30–11 seconds */
.prompt-hud-timer.timer-warning {
  color: #ff4d4d;
  text-shadow: 0 0 1cqw rgba(255,77,77,.40);
}

/* 10 seconds through overtime */
.prompt-hud-timer.timer-critical {
  color: #ff3b3b;
  animation: presenterTimerPulse 1s ease-in-out infinite;
}

@keyframes presenterTimerPulse {
  0%,100% {
    transform: scale(1);
    text-shadow: 0 0 .5cqw rgba(255,59,59,.35);
  }
  50% {
    transform: scale(1.10);
    text-shadow:
      0 0 1.1cqw rgba(255,59,59,.85),
      0 0 2cqw rgba(255,59,59,.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .prompt-hud-timer.timer-critical {
    animation: none;
    text-shadow: 0 0 1cqw rgba(255,59,59,.7);
  }
}



/* =========================================================
   TELEPROMPTER END-OF-SCRIPT MARKER
   ========================================================= */

.program-prompt-end {
  color: #d8bb55;
  font-weight: 900;
  line-height: 1;
  text-align: center;

  /*
   * Large breathing room after the final spoken line.
   * END is an operator/presenter landmark, not script copy.
   */
  margin-top: 2.6em;

  will-change: transform;
}

.program-prompt-end span {
  display: inline-block;
  padding: .35em 1.4em .28em;

  border-top: .08em solid rgba(216,187,85,.7);
  border-bottom: .08em solid rgba(216,187,85,.7);

  letter-spacing: .28em;
  font-size: .82em;
}

