* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #1a1a2e;
  color: #eee;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.view {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hidden {
  display: none !important;
}

/* Lobby View */
#lobby-view {
  max-width: 400px;
  margin: 50px auto;
  padding: 30px;
  background: #16213e;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

h1 {
  margin-bottom: 30px;
  text-align: center;
  color: #e94560;
}

.form-group {
  width: 100%;
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: #aaa;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #0f0f23;
  color: #fff;
  font-size: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: #e94560;
}

.divider {
  width: 100%;
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #333;
}

.divider span {
  position: relative;
  background: #16213e;
  padding: 0 15px;
  color: #666;
  font-size: 14px;
}

.btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #e94560;
  color: #fff;
}

.btn-primary:hover {
  background: #ff6b6b;
}

.btn-secondary {
  background: #0f3460;
  color: #fff;
}

.btn-secondary:hover {
  background: #1a4a7a;
}

.btn-danger {
  background: #c92a2a;
  color: #fff;
}

.btn-danger:hover {
  background: #e03131;
}

.btn-control {
  width: auto;
  padding: 12px 20px;
  background: #0f3460;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.btn-control:hover {
  background: #1a4a7a;
}

.btn-control.active {
  background: #c92a2a;
}

.btn-control .icon {
  font-size: 24px;
}

.btn-control .label {
  font-size: 12px;
}

.room-info {
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  background: #0f3460;
  border-radius: 6px;
}

.room-info p {
  margin-bottom: 10px;
  color: #4ade80;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #1a4a7a;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  color: #aaa;
}

.info-row .value {
  font-family: monospace;
  font-weight: bold;
  color: #fff;
}

.error {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  background: rgba(201, 42, 42, 0.2);
  border: 1px solid #c92a2a;
  border-radius: 6px;
  color: #ff6b6b;
  text-align: center;
}

/* Room View */
#room-view {
  width: 100%;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 15px 20px;
  background: #16213e;
  border-radius: 8px;
  margin-bottom: 20px;
}

.room-header h2 {
  font-size: 18px;
  color: #fff;
}

.room-header h2 span {
  color: #e94560;
  font-family: monospace;
}

#participant-count {
  color: #aaa;
  font-size: 14px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  width: 100%;
  margin-bottom: 20px;
}

.video-tile {
  position: relative;
  background: #0f0f23;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

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

.video-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  font-size: 14px;
  color: #fff;
}

/* Screen share tile - visually distinct with border */
.video-tile.screen-tile {
  border: 2px solid #4ade80;
}

.video-tile.screen-tile .video-label {
  background: rgba(74, 222, 128, 0.8);
  color: #000;
  font-weight: 600;
}

.controls-bar {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  background: #16213e;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 600px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .controls-bar {
    flex-wrap: wrap;
  }
}
