/* JTS Live Streaming Application Styles */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  color: white;
  padding: 30px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.header-text {
  text-align: left;
}

.header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.header p {
  opacity: 0.9;
  font-size: 1.1em;
}

/* Token Management Specific Styles */
.metric-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
  border: 1px solid #e9ecef;
}

.metric-card .metric-value {
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 5px;
}

.metric-card .metric-label {
  font-size: 0.9em;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-mini {
  background: white;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #e9ecef;
}

.token-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-card h4 {
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f8f9fa;
  font-size: 1.2em;
}

.section-card h5 {
  color: #495057;
  margin-bottom: 10px;
  font-size: 1em;
}

#tokenDashboard .metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

#testResults {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px;
}

#testResults h6 {
  margin-bottom: 10px;
  color: #495057;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Token validation status indicators */
.token-status-valid {
  border-left: 4px solid #28a745 !important;
  background: linear-gradient(90deg, #d4edda 0%, #ffffff 100%);
}

.token-status-invalid {
  border-left: 4px solid #dc3545 !important;
  background: linear-gradient(90deg, #f8d7da 0%, #ffffff 100%);
}

.token-status-warning {
  border-left: 4px solid #ffc107 !important;
  background: linear-gradient(90deg, #fff3cd 0%, #ffffff 100%);
}

/* Scheduler status indicators */
.scheduler-running {
  color: #28a745;
  font-weight: bold;
}

.scheduler-stopped {
  color: #dc3545;
  font-weight: bold;
}

/* Responsive adjustments for token management */
@media (max-width: 768px) {
  .token-actions {
    flex-direction: column;
  }
  
  .token-actions button {
    width: 100%;
  }
  
  #tokenDashboard {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
  }
  
  .metric-card {
    padding: 10px;
  }
  
  .metric-card .metric-value {
    font-size: 1.4em;
  }
}
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.channel-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.channel-select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 13px;
  min-width: 120px;
}

.channel-select option {
  background: #333;
  color: white;
}

.channel-add-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.channel-add-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.logout-btn:hover {
  background: rgba(255, 0, 0, 0.3);
}

.content {
  padding: 40px;
}

/* 탭 스타일 */
.tabs {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 30px;
}

.tab {
  padding: 15px 30px;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 16px;
  font-weight: 600;
  color: #6c757d;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.tab:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 로그인 모달 스타일 */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.login-modal.hidden {
  display: none;
}

.login-content {
  background: white;
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-logo {
  font-size: 3em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-title {
  font-size: 1.8em;
  margin-bottom: 10px;
  color: #333;
  font-weight: 600;
}

.login-subtitle {
  color: #6c757d;
  margin-bottom: 30px;
  line-height: 1.5;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ff0000;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.login-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.main-content {
  transition: opacity 0.3s ease;
}

.main-content.hidden {
  display: none;
}

.user-info {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 12px 20px;
  color: white;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #667eea;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.main-token-btn {
  background: linear-gradient(135deg, #4b6cb7, #3a8fd8);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(75, 108, 183, 0.3);
  margin-left: auto;
}

.main-token-btn:hover {
  background: linear-gradient(135deg, #3a8fd8, #1e73be);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(75, 108, 183, 0.4);
}

.main-logout-btn {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
  margin-left: 10px;
}

.main-logout-btn:hover {
  background: linear-gradient(135deg, #ee5a52, #dc3545);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.main-monitoring-btn {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
  margin-left: 10px;
}

.main-monitoring-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.main-monitoring-btn.monitoring-on {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.main-monitoring-btn.monitoring-on:hover {
  background: linear-gradient(135deg, #20c997, #17a2b8);
}

.main-monitoring-btn.monitoring-off {
  background: linear-gradient(135deg, #6c757d, #495057);
}

.main-monitoring-btn.monitoring-off:hover {
  background: linear-gradient(135deg, #495057, #343a40);
}

/* 상태 카드 */
.status-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  border-left: 4px solid #28a745;
  transition: all 0.3s ease;
}

.status-card.streaming {
  border-left-color: #dc3545;
  background: #fff5f5;
}

.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #28a745;
  margin-right: 10px;
  animation: pulse 2s infinite;
}

.status-indicator.streaming {
  background: #dc3545;
}

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

/* 멀티 스트림 상태 */
.multi-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.status-metric {
  background: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #667eea;
}

.metric-value {
  font-size: 2em;
  font-weight: bold;
  color: #667eea;
  display: block;
  margin-bottom: 5px;
}

.metric-label {
  font-size: 0.9em;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 스트림 목록 */
.stream-list {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.stream-item {
  background: white;
  border-bottom: 1px solid #e9ecef;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease;
}

.stream-item:hover {
  background: #f8f9fa;
}

.stream-item:last-child {
  border-bottom: none;
}

/* 방송 관리 스타일 */
.broadcast-management {
  padding: 10px 0;
}

.section-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.section-card h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  font-size: 1.2em;
}

.broadcast-list {
  margin-top: 15px;
}

.broadcast-item {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  border-left: 4px solid #667eea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.broadcast-item-live {
  border-left: 4px solid #ff3b30;
}

.broadcast-item-testing {
  border-left: 4px solid #ff9500;
}

.broadcast-item-completed {
  border-left: 4px solid #34c759;
}

.broadcast-info {
  flex: 1;
}

.broadcast-title {
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 5px;
}

.broadcast-detail {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 5px;
}

.broadcast-actions {
  display: flex;
  gap: 8px;
}

.broadcast-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  margin-right: 10px;
}

.status-ready {
  background-color: #e9ecef;
  color: #495057;
}

.status-testing {
  background-color: #ff9500;
  color: white;
}

.status-live {
  background-color: #ff3b30;
  color: white;
}

.status-completed {
  background-color: #34c759;
  color: white;
}

/* 스트림 키 및 복사 버튼 스타일 */
.stream-key-masked {
  font-family: monospace;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  display: inline-block;
  min-width: 150px;
  text-align: center;
  user-select: none;
}

.btn-copy {
  background: #6c757d;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-left: 5px;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: #495057;
  transform: scale(1.05);
}

.stream-info {
  font-family: monospace;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  display: inline-block;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

/* 토큰 모달 스타일 */
.token-modal {
  display: block;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  overflow: auto;
}

.token-modal-content {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  margin: 10% auto;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 80%;
  max-width: 600px;
  position: relative;
  animation: fadeInDown 0.3s;
}

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

.token-modal-close {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.token-modal-close:hover {
  color: #555;
}

.token-display {
  margin: 20px 0;
  padding: 15px;
  background-color: #f1f3f5;
  border-radius: 8px;
  border-left: 4px solid #4b6cb7;
  overflow-x: auto;
}

.token-text {
  font-family: monospace;
  word-break: break-all;
  margin: 0;
  white-space: pre-wrap;
  color: #333;
}

.token-actions {
  text-align: right;
  margin-top: 20px;
}

.copy-token-btn {
  background: linear-gradient(135deg, #4b6cb7, #3a8fd8);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.copy-token-btn:hover {
  background: linear-gradient(135deg, #3a8fd8, #1e73be);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(75, 108, 183, 0.3);
}

.stream-info {
  flex: 1;
}

.stream-title {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.stream-details {
  font-size: 0.9em;
  color: #6c757d;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.stream-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-streaming {
  background: #d4edda;
  color: #155724;
}

.badge-stopped {
  background: #f8d7da;
  color: #721c24;
}

.stream-actions {
  display: flex;
  gap: 10px;
}

.btn-small {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-small:hover {
  transform: translateY(-1px);
}

.btn-stop-small {
  background: #dc3545;
  color: white;
}

.btn-stop-small:hover {
  background: #c82333;
}

.btn-delete-small {
  background: #6c757d;
  color: white;
}

.btn-delete-small:hover {
  background: #5a6268;
}

/* 폼 스타일 */
.form-group {
  margin-bottom: 25px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

select,
input[type='text'] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

select:focus,
input[type='text']:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 향상된 체크박스 스타일 */
input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

.checkbox-group label {
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #333;
}

/* 스트림 설정 영역 스타일 */
.stream-option-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 8px;
  padding: 12px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.stream-option-container:hover {
  border-color: #dee2e6;
  background: #f1f3f4;
}

/* 도움말 텍스트 스타일 */
.help-text {
  color: #6c757d;
  font-size: 12px;
  margin-top: 5px;
  display: block;
  font-style: italic;
}

/* 공개 상태 옵션에 아이콘 포함 */
select option {
  padding: 8px;
}

/* 버튼 스타일 */
.button-group {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

button {
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  flex: 1;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
  flex: 1;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* 다중 스트림 설정 */
.multi-stream-config {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
}

.stream-config-item {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 2px solid #e9ecef;
  position: relative;
}

.stream-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.stream-config-header > div {
  display: flex;
  align-items: center;
  gap: 15px;
}

.stream-number {
  font-weight: bold;
  font-size: 1.1em;
  color: #667eea;
}

.remove-stream {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.remove-stream:hover {
  background: #c82333;
}

.stream-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 15px;
}

.btn-stream-control {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
}

.btn-stream-start {
  background: #28a745;
  color: white;
}

.btn-stream-start:hover {
  background: #218838;
}

.btn-stream-stop {
  background: #dc3545;
  color: white;
}

.btn-stream-stop:hover {
  background: #c82333;
}

.btn-stream-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.stream-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6c757d;
}

.status-dot.streaming {
  background: #28a745;
  animation: pulse 2s infinite;
}

.status-dot.stopped {
  background: #dc3545;
}

.add-stream {
  background: #28a745;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 20px;
}

/* 메시지 */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* 로딩 애니메이션 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 반응형 */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .button-group {
    flex-direction: column;
  }

  .tabs {
    flex-direction: column;
  }

  .multi-status {
    grid-template-columns: 1fr;
  }

  .stream-item {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .stream-actions {
    justify-content: center;
  }
}

/* 모달 스타일 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 0;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 20px 15px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.2em;
}

.modal-body {
  padding: 20px;
}

.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.help-text {
  margin-top: 5px;
}

.help-text small {
  color: #666;
  font-size: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.primary-btn {
  background: #4caf50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.primary-btn:hover {
  background: #45a049;
}

.secondary-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.secondary-btn:hover {
  background: #5a6268;
}

/* 반응형 디자인 - 헤더 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .header-text {
    text-align: center;
  }

  .header h1 {
    font-size: 2em;
  }

  .header-user-info {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .user-actions {
    gap: 5px;
  }

  .header-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .channel-select {
    min-width: 100px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 20px 15px;
  }

  .header h1 {
    font-size: 1.5em;
  }

  .header p {
    font-size: 0.9em;
  }

  .header-user-info {
    flex-direction: column;
    gap: 10px;
  }

  .channel-controls,
  .user-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ==========================================
   토스트 메시지 시스템
   ========================================== */

/* 토스트 컨테이너 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
  max-width: 400px;
  width: 100%;
}

/* 토스트 기본 스타일 */
.toast {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  margin-bottom: 12px;
  padding: 16px 20px;
  position: relative;
  transform: translateX(100%);
  transition: all 0.3s ease;
  pointer-events: all;
  border-left: 4px solid #6c757d;
  max-width: 100%;
  word-wrap: break-word;
}

.toast.show {
  transform: translateX(0);
}

.toast.hide {
  transform: translateX(100%);
  opacity: 0;
}

/* 토스트 타입별 색상 */
.toast.success {
  border-left-color: #28a745;
  background: linear-gradient(135deg, #f8fff9 0%, #f0fff1 100%);
}

.toast.error {
  border-left-color: #dc3545;
  background: linear-gradient(135deg, #fff8f8 0%, #fff0f0 100%);
}

.toast.warning {
  border-left-color: #ffc107;
  background: linear-gradient(135deg, #fffcf0 0%, #fffaf0 100%);
}

.toast.info {
  border-left-color: #17a2b8;
  background: linear-gradient(135deg, #f0fcff 0%, #f0faff 100%);
}

/* 토스트 헤더 */
.toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-title .icon {
  font-size: 16px;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

/* 토스트 본문 */
.toast-body {
  color: #555;
  font-size: 13px;
  line-height: 1.4;
}

/* 토스트 진행바 (자동 닫힘 표시) */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 12px 12px;
  transform-origin: left;
  animation: toastProgress 5s linear forwards;
}

.toast.success .toast-progress {
  background: #28a745;
}

.toast.error .toast-progress {
  background: #dc3545;
}

.toast.warning .toast-progress {
  background: #ffc107;
}

.toast.info .toast-progress {
  background: #17a2b8;
}

@keyframes toastProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* 토스트 액션 버튼 */
.toast-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.toast-action {
  background: none;
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toast-action:hover {
  background: rgba(0, 0, 0, 0.05);
}

.toast-action.primary {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.toast-action.primary:hover {
  background: #0056b3;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast {
    margin-bottom: 8px;
  }
}

/* Footer Styles */
.footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 20px;
  color: white;
  font-size: 14px;
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20" fill="rgba(255,255,255,0.1)"><circle cx="20" cy="20" r="20"/><circle cx="80" cy="0" r="20"/></svg>');
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(0px) translateY(0px); }
  33% { transform: translateX(30px) translateY(-10px); }
  66% { transform: translateX(-20px) translateY(10px); }
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  gap: 15px;
}

.footer-content p {
  margin: 0;
  font-weight: 500;
  font-size: 15px;
  opacity: 0.9;
}

.footer-content nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-content a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.footer-content a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.footer-separator {
  margin: 0;
  color: rgba(255, 255, 255, 0.4);
  display: none;
}

/* 개인정보처리방침 링크 강조 */
.footer-content a.privacy-link {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.footer-content a.privacy-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.footer-note {
  margin: 10px 0 0 0 !important;
  font-size: 13px;
  opacity: 0.8;
  text-align: center;
}

/* 로그인 모달 개인정보처리방침 */
.login-footer {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.login-privacy-notice {
  margin: 0;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.6);
  text-align: center;
  line-height: 1.5;
}

.privacy-link-modal {
  color: #667eea;
  text-decoration: underline;
  transition: all 0.3s ease;
  font-weight: 500;
}

.privacy-link-modal:hover {
  color: #764ba2;
  text-decoration: none;
}

/* 반응형 푸터 */
@media (max-width: 768px) {
  .footer {
    padding: 30px 15px;
  }

  .footer-content nav {
    flex-direction: column;
    gap: 10px;
  }

  .footer-content a {
    padding: 10px 20px;
    width: 100%;
    text-align: center;
  }
}