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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f0f;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 800px;
  padding: 2rem 1.5rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.subtitle {
  color: #888;
  margin-bottom: 2rem;
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: #aaa;
  font-size: 0.9rem;
}

input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="url"]:focus {
  border-color: #4a9eff;
}

button {
  padding: 0.75rem 1.5rem;
  background: #4a9eff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #3a8eef;
}

button:disabled {
  background: #333;
  cursor: not-allowed;
}

/* Invite link */
.invite-section {
  display: none;
  margin-top: 2rem;
  padding: 1.5rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
}

.invite-section.visible {
  display: block;
}

.invite-link {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.invite-link input {
  flex: 1;
}

.invite-link button {
  white-space: nowrap;
}

/* Room page */
.room-container {
  width: 100%;
  max-width: 1200px;
  padding: 1rem 1.5rem;
}

.video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

video {
  width: 100%;
  display: block;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  color: #888;
  font-size: 0.85rem;
}

.viewers {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.viewer-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
}

/* Overlays */
.overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10;
  flex-direction: column;
  gap: 1rem;
}

.overlay.visible {
  display: flex;
}

.overlay-text {
  color: #fff;
  font-size: 1.1rem;
}

.overlay button {
  padding: 1rem 2rem;
  font-size: 1.2rem;
}

/* Connection status */
.connection-status {
  padding: 0.5rem 1rem;
  background: #ff9800;
  color: #000;
  text-align: center;
  font-size: 0.85rem;
  display: none;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.connection-status.visible {
  display: block;
}

.connection-status.error {
  background: #f44336;
  color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1.5rem 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .room-container {
    padding: 0.5rem;
  }
}
