/* ========================================
   📡 Broadcasting Styles
   Transmisión en tiempo real
   ======================================== */

/* Status Bar */
#broadcast-status {
  position: fixed;
  bottom: 30px;
  left: 20px;
  display: none; /* Changed from flex to none by default */
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 100;
  backdrop-filter: blur(10px);
  border: 2px solid #e2e8f0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  color: #334155;
}

.status-offline {
  color: #94a3b8;
}

.status-idle {
  color: #10b981;
  animation: pulse 2s infinite;
}

.status-teacher {
  color: #3b82f6;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-student {
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.room-code {
  background: #f1f5f9;
  color: #334155;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  letter-spacing: 2px;
  font-weight: bold;
  border: 1px solid #cbd5e1;
}

.student-count {
  background: #e0f2fe;
  padding: 4px 10px;
  border-radius: 8px;
  color: #0369a1;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Notifications */
.broadcast-notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  z-index: 1000;
  transition: bottom 0.3s ease;
  max-width: 300px;
  text-align: center;
}

.broadcast-notification.show {
  bottom: 30px;
}

.notification-info {
  background: #3b82f6;
  color: white;
}

.notification-success {
  background: #10b981;
  color: white;
}

.notification-warning {
  background: #f59e0b;
  color: white;
}

.notification-error {
  background: #ef4444;
  color: white;
}

/* Broadcasting Dropdown */
.broadcast-modern-dropdown .lang-overlay-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.broadcast-modern-dropdown .lang-title {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 8px;
  justify-content: center;
}

.broadcast-modern-dropdown .lang-option {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.broadcast-modern-dropdown .lang-option:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.broadcast-modern-dropdown .btn-icon {
  transition: all 0.2s;
}

.broadcast-modern-dropdown .btn-icon:hover {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

/* Auth Prompt Modal */
.verify-prompt-modal {
  animation: fadeIn 0.2s ease;
}

.verify-prompt-modal .prompt-pin-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.broadcast-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.btn-broadcast {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-broadcast.teacher {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.btn-broadcast.teacher:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-broadcast.student {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.btn-broadcast.student:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.btn-broadcast.cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-broadcast.cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Join Room Input */
.broadcast-input-group {
  margin: 16px 0;
}

.broadcast-input-group label {
  display: block;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.broadcast-input-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(100, 116, 139, 0.3);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0;
  font-size: 1rem;
  font-family: "Courier New", monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.broadcast-input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Room Code Display */
.broadcast-room-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
  text-align: center;
}

.broadcast-room-info .label {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

.broadcast-room-info .code {
  color: #3b82f6;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: "Courier New", monospace;
  letter-spacing: 4px;
}

/* Image Modal */
.broadcast-image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.broadcast-image-modal.show {
  opacity: 1;
}

.broadcast-image-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.close-image {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-image:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.image-filename {
  color: #cbd5e1;
  font-size: 0.9rem;
  text-align: center;
}

.shared-image {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Status Indicator */
.broadcast-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

.broadcast-status-indicator.connected {
  background: #10b981;
}

.broadcast-status-indicator.connecting {
  background: #f59e0b;
  animation: pulse-dot 1s infinite;
}

.broadcast-status-indicator.disconnected {
  background: #64748b;
  animation: none;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 currentColor;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

/* Responsive */
@media (max-width: 640px) {
  #broadcast-status {
    top: auto;
    bottom: 100px;
    right: 10px;
    left: auto;
    font-size: 0.75rem;
    padding: 6px 10px;
    gap: 8px;
  }

  .broadcast-modal-content {
    padding: 16px;
  }

  .broadcast-modal-content h2 {
    font-size: 1.1rem;
  }
}
