body, html {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  font-family: 'Montserrat', sans-serif;
  background: #d5c8ff;
  overflow: hidden;
  box-sizing: border-box;
}
.top-header {
  width: 100vw;
  box-sizing: border-box;
  padding-top: 32px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 10;
  position: relative;
}
.logo-bar-centered {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 18px;
  margin-top: 0;
}
#mainLogo {
  width: 520px;
  height: 110px;
  display: block;
  background: none !important;
  border: none;
  padding: 0;
  box-shadow: none !important;
}
.desc-bar {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 20px;
}
.desc-text {
  display: block;
  max-width: 900px;
  width: 90vw;
  padding: 32px 36px;
  background: none;
  color: #7d5fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 2.1rem;
  font-weight: 500;
  text-align: center;
  border: 3px solid #a18aff;
  border-radius: 28px;
  box-sizing: border-box;
  letter-spacing: 0.01em;
  line-height: 1.26;
  word-break: break-word;
}
main {
  min-height: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  pointer-events: none;
  z-index: 5;
}
.centered {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  pointer-events: auto;
}
.main-btn {
  width: 260px;
  height: 62px;
  border: none;
  border-radius: 16px;
  background: #a18aff;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 2px 16px rgba(130,90,255,0.10);
  transition: background 0.2s;
  outline: none;
  margin: 0;
}
.main-btn:hover {
  background: #7d5fff;
}
#room {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.room-bg {
  position: fixed;
  z-index: 1;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #d5c8ff;
  border-radius: 36px;
  box-sizing: border-box;
}
#blocks, .bottom-panel {
  position: relative;
  z-index: 3;
}
.blocks {
  flex: 1;
  width: 100vw;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 92px;
}
.block {
  background: #a18aff;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3.2rem;
  box-shadow: 0 2px 32px rgba(130,90,255,0.10);
  margin: 0;
  width: 100vw;
  height: calc(100vh - 92px);
  max-width: 100vw;
  max-height: calc(100vh - 92px);
  min-width: 320px;
  min-height: 220px;
  border: 2px solid #7d5fff;
  box-sizing: border-box;
  transition: box-shadow 0.15s;
}
.blocks.two {
  gap: 12px;
  justify-content: center;
}
.blocks.two .block {
  width: calc(50vw - 6px);
  height: calc(100vh - 92px);
  margin: 0;
  font-size: 2.2rem;
  min-width: 220px;
  border: 2px solid #7d5fff;
  box-sizing: border-box;
}
.bottom-panel {
  width: 100vw;
  min-height: 92px;
  background: #fff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -2px 18px rgba(130,90,255,0.10);
  display: flex;
  flex-direction: row;
  align-items: center;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 5;
  padding: 0 0 0 0;
}
.room-code {
  margin-left: 38px;
  font-size: 1.13rem;
  color: #8f5fff;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: left;
}
.panel-controls {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
}
.control-btn {
  font-size: 2.2rem;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.control-btn.off {
  opacity: 0.35;
}
#room video.fullscreen-video {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: calc(100vh - 92px);
  z-index: 2;
  object-fit: contain;
  background: #000;
}
#myVideo[style*="position: fixed"] {
  right: 32px !important;
  left: auto !important;
  bottom: 110px !important;
  top: auto !important;
  margin: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18) !important;
  border: 3px solid #fff !important;
  background: #222;
  z-index: 40 !important;
  object-fit: cover !important;
  transition: width 0.24s, height 0.24s, top 0.24s, left 0.24s, right 0.24s, bottom 0.24s;
}
.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 18px;
  padding: 34px 44px 36px 44px;
  box-shadow: 0 0 30px rgba(0,0,0,0.14);
  z-index: 1000;
  min-width: 380px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.modal-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-title {
  width: 100%;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  margin-top: 0;
  letter-spacing: -1px;
}
.modal-inputs {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
}
#modalError {
  color: #ff5f5f;
  font-size: 1.07rem;
  min-height: 28px;
  margin-top: 10px;
  text-align: center;
}
.modal-buttons {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
}
.hidden {
  display: none !important;
}
@media (max-width: 700px) {
  html, body {
    width: 100vw;
    min-width: 100vw;
    overflow-x: hidden;
  }
  .logo-bar-centered {
    margin-top: 10px;
    margin-bottom: 10px;
  }
  #mainLogo {
    width: 92vw;
    min-width: 0;
    max-width: 100vw;
    height: auto;
  }
  .desc-bar {
    margin-bottom: 12px;
    width: 100vw;
    min-width: 0;
  }
  .desc-text {
    font-size: 1.05rem;
    padding: 14px 2vw;
    border-radius: 12px;
    width: 96vw;
    min-width: 0;
    box-sizing: border-box;
  }
  main {
    height: 100vh;
    width: 100vw;
    min-width: 0;
    min-height: 0;
    left: 0; right: 0; top: 0; bottom: 0;
  }
  .centered {
    gap: 18px;
    width: 100vw;
    min-width: 0;
  }
  .main-btn {
    width: 90vw;
    max-width: 98vw;
    min-width: 0;
    height: 52px;
    font-size: 1.18rem;
    border-radius: 12px;
    margin: 0 auto;
    display: block;
  }
  .modal-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }
  .modal {
    min-width: 0;
    width: 94vw;
    padding: 14px 5vw 26px 5vw;
    border-radius: 12px;
    box-sizing: border-box;
  }
  .modal-title {
    font-size: 1.15rem;
    margin-bottom: 14px;
  }
  .modal-content {
    width: 100%;
    min-width: 0;
  }
  .modal-inputs input[type="text"], .modal-inputs input[type="password"] {
    width: 100%;
    min-width: 0;
    font-size: 1.03rem;
    padding: 10px 8px;
    border-radius: 8px;
  }
  .block {
    min-width: 0;
    width: 90vw;
    font-size: 1rem;
    min-height: 96px;
  }
  .blocks.two {
    flex-direction: column !important;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
  }
  .blocks.two .block {
    width: 90vw;
    height: 35vh;
    min-width: 0;
    min-height: 96px;
    font-size: 1.12rem;
  }
  #myVideo[style*="position: fixed"] {
    right: 7vw !important;
    bottom: 7vw !important;
    left: auto !important;
    top: auto !important;
    max-width: 40vw !important;
    max-height: 22vw !important;
    min-width: 54px !important;
    min-height: 38px !important;
  }
}
@media (max-width: 1200px) {
  .block {
    font-size: 2rem;
  }
  .blocks.two .block {
    font-size: 1.5rem;
  }
  .blocks.two {
    gap: 8px;
  }
  .modal {
    min-width: 260px;
  }
  .modal-title {
    font-size: 1.3rem;
  }
  #myVideo[style*="position: fixed"] {
    right: 18px !important;
    bottom: 18px !important;
  }
}
input[type="text"], input[type="password"] {
  width: 100%;
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid #d1b3ff;
  margin-bottom: 0;
  font-size: 1.09rem;
  outline: none;
  background: #f3f0ff;
  text-align: center;
}
input[type="text"]:focus, input[type="password"]:focus {
  border-color: #a18aff;
}