:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #f4f7ff;
  background: #090f1e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #173978, #090f1e 65%);
}

.studio {
  width: min(100% - 32px, 850px);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 28px 0;
}

.logo {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  border-radius: 16px;
  background: linear-gradient(135deg, #00c6ff, #635bff);
  font-size: 32px;
  font-weight: 900;
}

.brand h1 {
  font-size: 20px;
  margin: 0;
}

.brand p, .welcome p, footer {
  color: #aab9d4;
}

.brand p { margin: 5px 0 0; }

.welcome {
  padding: 30px;
  background: rgba(18, 29, 52, .96);
  border: 1px solid #304269;
  border-radius: 24px;
  box-shadow: 0 25px 70px #0005;
  text-align: center;
}

.status {
  color: #46ebba;
  font-size: 14px;
}

h2 {
  font-size: clamp(25px, 5vw, 36px);
  margin-bottom: 10px;
}

.preview {
  position: relative;
  overflow: hidden;
  margin: 25px auto;
  max-width: 660px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #050914;
  border: 1px solid #344a70;
  display: grid;
  place-items: center;
}

.preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#cameraMessage {
  position: absolute;
  color: #b4c1d7;
  pointer-events: none;
}

input {
  display: block;
  width: min(100%, 500px);
  margin: 0 auto 16px;
  padding: 15px;
  border: 1px solid #405478;
  background: #0c162b;
  color: white;
  border-radius: 12px;
  font-size: 16px;
}

.controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

button {
  padding: 14px 22px;
  border: 0;
  border-radius: 12px;
  background: #283b60;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:hover { filter: brightness(1.15); }

#joinBtn {
  background: linear-gradient(110deg, #008cff, #624cff);
  width: min(100%, 500px);
  font-size: 17px;
}

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

#message { font-size: 14px; }

footer {
  text-align: center;
  padding: 28px 0;
  font-size: 13px;
}

@media (max-width: 600px) {
  .brand { padding: 18px 0; }
  .welcome { padding: 20px 15px; }
}

/* Participantes conectados */
#remoteSection {
  margin-top: 28px;
  text-align: left;
}

#remoteSection h3 {
  color: #e7efff;
  font-size: 18px;
  margin-bottom: 15px;
}

#remoteSection[hidden] {
  display: none;
}

.remote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 15px;
}

.remote-participant {
  position: relative;
  overflow: hidden;
  background: #050914;
  border: 1px solid #344a70;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
}

.remote-participant video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remote-participant .participant-name {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, .7);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
}
