* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #111;
  color: #fff;
  font-family: Arial, "Noto Sans KR", sans-serif;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  min-height: 60px;
  padding: 12px;
  background: #202020;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#roomLabel {
  margin-top: 4px;
  font-size: 12px;
  color: #aaa;
}

#status {
  padding: 7px 10px;
  background: #333;
  border-radius: 999px;
  font-size: 13px;
}

.controls {
  padding: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: #171717;
  border-bottom: 1px solid #333;
}

.controls input,
.controls button {
  height: 40px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #292929;
  color: #fff;
  padding: 0 10px;
}

.controls button {
  cursor: pointer;
}

.controls button:disabled {
  opacity: 0.45;
}

.summaryPanel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  background: #121212;
  border-bottom: 1px solid #333;
}

.summaryCard {
  padding: 12px;
  background: #1b1b1b;
  border: 1px solid #333;
  border-radius: 12px;
}

.summaryTitle {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
}

.participantsMain {
  padding: 12px;
}

h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.participantsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.participantTile {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 14px;
  overflow: hidden;
  min-height: 320px;
}

.tileHeader {
  min-height: 44px;
  padding: 8px 10px;
  background: #252525;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.tileName {
  font-weight: bold;
  font-size: 14px;
}

.tileBadges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  padding: 4px 7px;
  border-radius: 999px;
  background: #444;
  color: #ccc;
  font-size: 11px;
}

.badge.active {
  background: #1f7a3a;
  color: #fff;
}

.videoWrap {
  height: 240px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.participantVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.videoNotice {
  color: #aaa;
  font-size: 15px;
}

.tileMeterWrap {
  height: 14px;
  margin: 10px;
  background: #2a2a2a;
  border-radius: 999px;
  overflow: hidden;
}

.tileMeterBar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #33b15f, #e6b800, #d94343);
  transition: width 0.08s linear;
}

.tileMeterText {
  padding: 0 10px 12px;
  font-size: 13px;
  color: #ddd;
}

.logBox {
  margin: 0 12px 12px;
  padding: 12px;
  background: #181818;
  border: 1px solid #333;
  border-radius: 12px;
}

pre {
  min-height: 120px;
  max-height: 220px;
  overflow: auto;
  color: #ccc;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .summaryPanel {
    grid-template-columns: 1fr;
  }

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

  .videoWrap {
    height: 300px;
  }
}

.captionBox {
  margin: 0 12px 12px;
  padding: 12px;
  background: #181818;
  border: 1px solid #333;
  border-radius: 12px;
}

.captionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.captionHeader h3 {
  margin: 0;
}

.captionHeader button,
.captionControls button {
  height: 36px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #292929;
  color: #fff;
  padding: 0 10px;
  cursor: pointer;
}

.captionControls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.captionControls input {
  flex: 1;
  height: 38px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #222;
  color: #fff;
  padding: 0 10px;
}

.latestCaption {
  margin-top: 12px;
  min-height: 72px;
  padding: 14px;
  background: #202020;
  border-radius: 10px;
  border: 1px solid #333;
  color: #aaa;
}

.captionSpeaker,
.captionMeta {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 6px;
}

.captionTranslated {
  font-size: 24px;
  line-height: 1.35;
  font-weight: bold;
  color: #fff;
}

.captionOriginal {
  margin-top: 6px;
  font-size: 15px;
  color: #bbb;
}

.captionList {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.captionItem {
  padding: 10px;
  background: #222;
  border-radius: 8px;
  border: 1px solid #333;
}

.captionItemTranslated {
  font-size: 17px;
  font-weight: bold;
  line-height: 1.35;
}

.captionItemOriginal {
  margin-top: 4px;
  font-size: 13px;
  color: #bbb;
}

@media (max-width: 760px) {
  .captionControls {
    flex-direction: column;
  }

  .captionControls button {
    width: 100%;
  }

  .captionTranslated {
    font-size: 21px;
  }
}

.voiceCaptionControls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.voiceCaptionControls select,
.voiceCaptionControls button {
  height: 38px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #292929;
  color: #fff;
  padding: 0 10px;
}

.voiceCaptionControls button {
  cursor: pointer;
}

.voiceCaptionControls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.voiceCaptionStatus {
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #111;
  border: 1px solid #333;
  color: #ccc;
  font-size: 13px;
}

@media (max-width: 760px) {
  .voiceCaptionControls {
    flex-direction: column;
  }

  .voiceCaptionControls select,
  .voiceCaptionControls button {
    width: 100%;
  }
}

.voiceCaptionControls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.voiceCaptionControls select,
.voiceCaptionControls button {
  height: 38px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #292929;
  color: #fff;
  padding: 0 10px;
}

.voiceCaptionControls button {
  cursor: pointer;
}

.voiceCaptionControls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.voiceCaptionStatus {
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #111;
  border: 1px solid #333;
  color: #ccc;
  font-size: 13px;
}

@media (max-width: 760px) {
  .voiceCaptionControls {
    flex-direction: column;
  }

  .voiceCaptionControls select,
  .voiceCaptionControls button {
    width: 100%;
  }
}

.audioUploadControls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.audioUploadControls button {
  height: 38px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #292929;
  color: #fff;
  padding: 0 10px;
  cursor: pointer;
}

.audioUploadControls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .audioUploadControls {
    flex-direction: column;
  }

  .audioUploadControls button {
    width: 100%;
  }
}
