*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

.debate-body {
  background: #060608;
  color: #e8e8ec;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.debate-canvas {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background-color: #08080a;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

.debate-stage {
  --debate-w: 1920;
  --debate-h: 1080;
  width: calc(var(--debate-w) * 1px);
  height: calc(var(--debate-h) * 1px);
  transform-origin: center center;
  transform: scale(min(100vw / var(--debate-w), 100vh / var(--debate-h)));
  display: grid;
  grid-template-rows: 88px 1fr;
  gap: 12px;
  padding: 12px;
}

.debate-stage[data-state="off"] {
  opacity: 0.35;
}

.debate-top {
  display: grid;
  grid-template-columns: 200px 1fr 240px;
  gap: 12px;
  min-height: 0;
}

.debate-main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
  min-height: 0;
}

.debate-sidebar {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.debate-slot {
  border: 2px solid rgb(255 255 255 / 0.14);
  border-radius: 16px;
  background: rgb(12 12 16 / 0.72);
  backdrop-filter: blur(6px);
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.debate-slot-logo {
  display: grid;
  place-items: center;
  padding: 12px;
}

.debate-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.debate-slot-discord,
.debate-slot-wait {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.debate-wait-count {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  color: #f4f4f6;
  font-variant-numeric: tabular-nums;
}

.debate-wait-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgb(255 255 255 / 0.45);
}

.debate-slot-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.55);
}

.debate-slot-body {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  color: #f4f4f6;
}

.debate-slot-link {
  font-size: 14px;
  color: #a5b4fc;
  text-decoration: none;
}

.debate-slot-chat {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 12px;
  gap: 8px;
}

.debate-chat-frame-wrap {
  position: relative;
  min-height: 0;
  border-radius: 10px;
  border: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(0 0 0 / 0.35);
  overflow: hidden;
}

.debate-chat-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.debate-slot-placeholder {
  margin: 0;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  font-size: 14px;
  color: rgb(255 255 255 / 0.35);
}

.debate-slot-opponent {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.debate-media-frame-opponent {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  flex: 0 0 auto;
  min-height: 0;
}

.debate-media-frame-opponent img,
.debate-media-frame-opponent video {
  object-fit: cover;
}

.debate-slot-main {
  padding: 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
}

.debate-topic {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  color: #e0e7ff;
  padding: 4px 8px;
}

.debate-media-frame {
  border-radius: 12px;
  border: 1px dashed rgb(255 255 255 / 0.12);
  background: rgb(0 0 0 / 0.4);
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.debate-media-frame-main {
  border-style: solid;
}

.debate-media-frame img,
.debate-media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.debate-media-placeholder {
  margin: 0;
  font-size: 13px;
  color: rgb(255 255 255 / 0.28);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hidden {
  display: none !important;
}
