* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 3rem;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.hero-section {
  text-align: center;
  color: white;
  margin-bottom: 3rem;
}

.hero-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 1rem;
  color: #333;
}

.card p {
  color: #666;
  margin-bottom: 1.5rem;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.join-form input {
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn.primary {
  background: #667eea;
  color: white;
}

.btn.primary:hover {
  background: #5a67d8;
}

.btn.secondary {
  background: #48bb78;
  color: white;
}

.btn.secondary:hover {
  background: #38a169;
}

.btn.danger {
  background: #f56565;
  color: white;
}

.btn.danger:hover {
  background: #e53e3e;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 3px;
}

.icon-btn:hover {
  background: #f0f0f0;
}

.features {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
}

.features h3 {
  margin-bottom: 2rem;
  color: #333;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.feature-icon {
  font-size: 2rem;
}

/* Room Page Styles */
.room-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.room-header {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.room-info {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.room-code-display {
  background: #323232;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 1.1rem;
}

.room-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.main-content {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.screen-share-container {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1rem;
}

.screen-share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.screen-share-view {
  background: #000;
  border-radius: 10px;
  height: 400px;
  position: relative;
  overflow: hidden;
}

.screen-share-view video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.no-screen-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  text-align: center;
}

.participants-section {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1rem;
}

.participants-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.participant {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: white;
  border-radius: 5px;
}

.participant.sharing {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
}

.participant-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #667eea;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.participant-name {
  flex: 1;
}

.sharing-badge {
  font-size: 0.8rem;
  background: #f59e0b;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}

.chat-section {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  margin: 1rem 0;
  padding: 0.5rem;
}

.chat-message {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 5px;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.message-sender {
  font-weight: bold;
  color: #667eea;
}

.message-time {
  color: #999;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
}

.chat-input-area input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem;
  background: white;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left: 4px solid #48bb78;
}

.toast.error {
  border-left: 4px solid #f56565;
}

.toast.info {
  border-left: 4px solid #667eea;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .room-content {
    grid-template-columns: 1fr;
  }

  .room-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .room-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .screen-share-view {
    height: 300px;
  }
}
