* {
  box-sizing: border-box;
}

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

#meetingApp {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topBar {
  height: 56px;
  padding: 8px 12px;
  background: #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #333;
}

.brand {
  white-space: nowrap;
}

.controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.controls select,
.controls input,
.controls button {
  height: 34px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #2a2a2a;
  color: #fff;
  padding: 0 8px;
}

.controls input {
  width: 90px;
}

.controls button {
  cursor: pointer;
}

.controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  min-height: 0;
}

#jitsiContainer {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #000;
}

#subtitlePanel {
  height: 100%;
  min-height: 0;
  background: #151515;
  border-left: 1px solid #333;
  display: flex;
  flex-direction: column;
}

.subtitleBox {
  padding: 12px;
  border-bottom: 1px solid #333;
}

.label {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 8px;
}

.original {
  font-size: 16px;
  line-height: 1.4;
  color: #ddd;
  min-height: 24px;
}

.translated {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: bold;
  color: #fff;
  min-height: 28px;
}

#sharedSubtitle {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.subtitleItem {
  padding: 10px;
  margin-bottom: 8px;
  background: #222;
  border-radius: 8px;
}

.subtitleSpeaker {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 5px;
}

.subtitleOriginal {
  font-size: 14px;
  color: #ccc;
  line-height: 1.4;
}

.subtitleTranslated {
  margin-top: 4px;
  font-size: 17px;
  color: #fff;
  font-weight: bold;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .topBar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .controls {
    flex-wrap: wrap;
  }

  main {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 280px;
  }

  #subtitlePanel {
    border-left: 0;
    border-top: 1px solid #333;
  }
}
