/* -------------------------------------------------
   livestream.css – livestream page styles
   ------------------------------------------------- */

.livestream-hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, rgba(11, 108, 255, 0.1) 0%, rgba(11, 108, 255, 0.05) 100%);
  border-bottom: 2px solid var(--accent, #0b6cff);
  box-shadow: var(--shadow-md);
}

.livestream-title {
  font-size: 2.5rem;
  color: var(--accent, #0b6cff);
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.livestream-subtitle {
  font-size: 1.1rem;
  color: var(--c-text-muted);
  margin: 0;
}

.status-message-box {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(11, 108, 255, 0.15);
  border-left: 4px solid var(--accent, #0b6cff);
  border-radius: 4px;
  animation: slideDown 0.3s ease-out;
}

.status-message-box p {
  margin: 0;
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.4;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.livestream-main {
  max-width: 1400px;
  margin: 0 auto;
}

.livestream-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  padding: 2rem;
  align-items: stretch;
  max-width: 1600px;
  margin: 0 auto;
}

/* Video Player */
.video-player-container {
  margin-bottom: 2rem;
}

.video-player-section {
  display: flex;
  flex-direction: column;
}

.video-player-wrapper {
  border: 2px solid var(--accent, #0b6cff);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 15px rgba(11, 108, 255, 0.2);
  transition: box-shadow 0.3s ease;
}

.video-player-wrapper:hover {
  box-shadow: 0 8px 25px rgba(11, 108, 255, 0.35);
}

.youtube-player {
  display: block;
  width: 100%;
  height: auto;
  min-height: 400px;
  aspect-ratio: 16 / 9;
}

.player-status {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  margin: 1rem 0 0;
  text-align: center;
  transition: color 0.3s ease;
}

.player-status.active {
  color: var(--accent, #0b6cff);
  font-weight: 500;
  animation: pulse 2s infinite;
}

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

/* Stream Info Box */
.stream-info-box {
  background: var(--bg-secondary, #1a1a1a);
  border: 1px solid var(--accent, #0b6cff);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.stream-info-box:hover {
  box-shadow: 0 4px 12px rgba(11, 108, 255, 0.15);
  border-color: var(--accent, #0b6cff);
}

.stream-info-box h3 {
  color: var(--accent, #0b6cff);
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.details {
  color: var(--c-text);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.info-link {
  display: inline-block;
  color: var(--accent, #0b6cff);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
}

.info-link:hover {
  border-bottom-color: var(--accent, #0b6cff);
  transform: translateX(5px);
}

/* Chat Section */
.chat-section {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-container {
  display: flex !important;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: var(--bg-primary, #000);
  color: var(--text-primary, #fff);
  font-family: inherit;
  gap: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--accent, #0b6cff);
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.welcome-card {
  background: #1a1a1a;
  border: 2px solid var(--accent, #0b6cff);
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(11, 108, 255, 0.3);
  text-align: center;
  color: #ddd;
}

.welcome-card h2 {
  color: var(--accent, #0b6cff);
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
}

.welcome-subtitle {
  margin: 0 0 1.5rem 0;
  opacity: 0.8;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  color: #fff;
  margin-bottom: 0.5rem;
  font-weight: bold;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--accent, #0b6cff);
  border-radius: 4px;
  background: #0a0a0a;
  color: #fff;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent, #0b6cff);
  box-shadow: 0 0 8px rgba(11, 108, 255, 0.3);
}

.form-group small {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent, #0b6cff);
  color: #000;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

.error-message {
  color: #ff6b6b;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .livestream-container {
    grid-template-columns: 1fr;
  }

  .chat-container {
    min-height: 400px;
  }
}

@media (max-width: 768px) {
  .livestream-hero {
    padding: 2rem 1rem;
  }

  .livestream-title {
    font-size: 2rem;
  }

  .livestream-subtitle {
    font-size: 1rem;
  }

  .livestream-container {
    padding: 1.5rem;
    gap: 1rem;
  }

  .chat-container {
    min-height: 350px;
  }

  .stream-info-box {
    padding: 1rem;
  }

  .stream-info-box h3 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .livestream-title {
    font-size: 1.6rem;
  }

  .livestream-container {
    padding: 1rem;
    gap: 1rem;
  }

  .livestream-subtitle {
    font-size: 0.9rem;
  }

  .chat-container {
    min-height: 300px;
  }

  .welcome-card {
    padding: 1.5rem;
  }

  .welcome-card h2 {
    font-size: 1.3rem;
  }
}

/* Login Modal Styles */
.login-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.btn-login-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--c-bg-secondary);
  border: 2px solid var(--c-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  color: var(--c-text);
  gap: 0.5rem;
}

.btn-login-option span:first-child {
  font-size: 1.8rem;
}

.btn-login-option small {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

.btn-login-option:hover {
  border-color: var(--accent, #0b6cff);
  background: var(--c-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 108, 255, 0.2);
}

/* Logout Button */
.btn-logout {
  background: #ff4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: #dd3333;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

/* Form Styles */
#viewerLoginForm,
#adminLoginForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--c-text);
}

.form-group input {
  padding: 0.75rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  color: var(--c-text);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent, #0b6cff);
  box-shadow: 0 0 0 3px rgba(11, 108, 255, 0.1);
}

.form-group small {
  font-size: 0.85rem;
  color: var(--c-text-muted);
}

.error-message {
  color: #ff4444;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2rem;
}

.btn-secondary {
  background: var(--c-bg-secondary);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--c-bg);
  border-color: var(--accent, #0b6cff);
}

