* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.welcome-screen {
  background: white;
  border-radius: 16px;
  padding: 40px 60px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.welcome-screen h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 10px;
}

.subtitle {
  color: #666;
  margin-bottom: 30px;
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.header-buttons {
  display: flex;
  gap: 10px;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-copy {
  background: #3498db;
  color: white;
  padding: 8px 16px;
  font-size: 14px;
}

.btn-copy:hover {
  background: #2980b9;
}

.join-input {
  margin-top: 25px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.join-input input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.join-input input:focus {
  border-color: #667eea;
}

.sharing-screen, .viewing-screen {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 1200px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.header h2 {
  color: #333;
  font-size: 1.5rem;
}

.room-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.room-id {
  font-family: 'Courier New', monospace;
  background: #eee;
  padding: 5px 15px;
  border-radius: 4px;
  color: #333;
}

.video-container {
  position: relative;
  background: #000;
  width: 100%;
  height: calc(100vh - 160px);
  min-height: 600px;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  background: #f8f9fa;
}

.status {
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
}

.status.online {
  background: #d4edda;
  color: #155724;
}

.status.offline {
  background: #f8d7da;
  color: #721c24;
}

.control-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #666;
  font-size: 14px;
}

.control-toggle input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.error-screen {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.error-screen h2 {
  color: #e74c3c;
  margin-bottom: 15px;
}

.error-screen p {
  color: #666;
  margin-bottom: 25px;
}

@media (max-width: 768px) {
  .welcome-screen {
    padding: 30px 20px;
  }
  
  .welcome-screen h1 {
    font-size: 1.8rem;
  }
  
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .room-info {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .status-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}