/* Modern TvScrapper Monitor Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --primary-blue: #0088cc;
  --primary-blue-hover: #006ba3;
  --background: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Stat Card Colors */
  --channels-color: #3b82f6;
  --recordings-color: #ef4444;
  --records-color: #10b981;
  --storage-color: #f59e0b;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
}

/* Header Styles */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1280px;
  padding-left: 2rem;
  padding-right: 2rem;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.app-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.connection-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--background);
  border: 1px solid var(--border);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-dot.connected {
  background: var(--success);
}

.status-dot.disconnected {
  background: var(--danger);
}

.status-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.refresh-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--background);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.refresh-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-menu:hover {
  background: var(--background);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.username {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Main Content */
.app-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
}

/* Stats Cards */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.stat-icon.channels {
  background: var(--channels-color);
}

.stat-icon.recordings {
  background: var(--recordings-color);
}

.stat-icon.records {
  background: var(--records-color);
}

.stat-icon.storage {
  background: var(--storage-color);
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: capitalize;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--background);
}

.nav-tab.active {
  background: var(--primary-blue);
  color: white;
  box-shadow: var(--shadow-sm);
}

.nav-tab i {
  font-size: 16px;
}

/* Content Area */
.content-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tab-content {
  display: none;
}

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

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.content-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.content-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--background);
  color: var(--text-primary);
  width: 240px;
  transition: all 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-blue-hover);
}

.btn-secondary {
  background: var(--background);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text-primary);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-info {
  background: var(--info);
  color: white;
}

.btn-warning {
  background: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background: #e0a800;
}

/* Data Table */
.data-table {
  width: 100%;
}

/* Channels Table */
#channels-tab .table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 16px 24px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#channels-tab .table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
  align-items: center;
}

/* Records Table */
#records-tab .table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr 1fr;
  gap: 16px;
  padding: 16px 24px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#records-tab .table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr 1fr;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
  align-items: center;
}

/* EPG Table */
#epg-tab .table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr;
  gap: 16px;
  padding: 16px 24px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#epg-tab .table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
    align-items: center;
}

.table-body {
  max-height: 600px;
  overflow-y: auto;
}

.table-row:hover {
  background: var(--background);
}

.table-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.channel-name {
  font-weight: 500;
  color: var(--text-primary);
}

.channel-uuid {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'Monaco', 'Menlo', monospace;
}

/* Status Badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.enabled {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-badge.disabled {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
}

.status-badge.recording {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  animation: pulse 2s infinite;
}

.status-badge.completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-badge.failed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Form Elements */
.form-select,
.form-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 24px;
}

.setting-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.setting-card h3 {
  font-size: 16px;
  font-weight: 600;
}

.setting-description {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

.setting-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.setting-item label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0;
}

.setting-item .form-input,
.setting-item .form-select {
  width: 200px;
  margin-left: 16px;
}

.setting-item .toggle {
  margin-left: 16px;
}

.setting-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.setting-item.disabled label {
  color: var(--text-muted);
}

.setting-group {
  margin-left: 20px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

.setting-group .setting-item {
  padding: 8px 0;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.setting-item label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: 0.2s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.toggle input:checked+.toggle-slider {
  background-color: var(--primary-blue);
}

.toggle input:checked+.toggle-slider:before {
  transform: translateX(20px);
}

.settings-actions {
  padding: 24px;
  border-top: 1px solid var(--border);
  background: var(--background);
}

/* Pagination */
.pagination-container {
  display: flex;
    align-items: center;
  justify-content: between;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--background);
  }

.pagination-info {
  font-size: 14px;
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* Notifications */
.notifications-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
  max-width: 400px;
}

.notification {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

.notification-success {
  border-left: 4px solid var(--success);
}

.notification-error {
  border-left: 4px solid var(--danger);
}

.notification-warning {
  border-left: 4px solid var(--warning);
}

.notification-info {
  border-left: 4px solid var(--info);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading States */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Notifications */
.notifications-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
}

.notification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  animation: slideInRight 0.3s ease-out;
  min-width: 300px;
  border-left: 4px solid;
}

.notification-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
  border-left-color: #22c55e;
  color: white;
}

.notification-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
  border-left-color: #ef4444;
  color: white;
}

.notification-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
  border-left-color: #3b82f6;
  color: white;
}

.notification-loading {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(147, 51, 234, 0.95));
  border-left-color: #a855f7;
  color: white;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.notification-content i {
  font-size: 18px;
  opacity: 0.9;
}

.notification-content span {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 12px;
  opacity: 0.7;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
  transform: scale(1.1);
}

.notification-close i {
  font-size: 14px;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Professional Stream Modal Styles */
.stream-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    z-index: 10000;
  display: flex;
    align-items: center;
    justify-content: center;
    animation: streamModalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Professional Stream Modal Container */
.stream-modal-container {
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    max-width: 95vw;
    max-height: 95vh;
    width: 1200px;
    height: 700px;
    animation: streamModalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Header */
.stream-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 60px;
}

.stream-modal-title {
  display: flex;
    align-items: center;
    gap: 12px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
  font-weight: 700;
    color: white;
  text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.live-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: livePulse 2s infinite;
}

.stream-modal-title h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.3rem;
  font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

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

.stream-action-btn, .stream-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
  display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stream-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.stream-close-btn:hover {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    border-color: #ff4757;
    transform: translateY(-1px);
}

/* Video Player Container */
.stream-player-container {
    flex: 1;
    position: relative;
    background: #000;
  display: flex;
  align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
  display: flex;
    align-items: center;
    justify-content: center;
}

#streamPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Custom Video Controls */
.video-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-wrapper:hover .video-controls-overlay {
    opacity: 1;
    pointer-events: all;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
}

.video-control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 1rem;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.play-pause-btn {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 1.2rem;
}

/* Volume Controls */
.volume-controls {
  display: flex;
  align-items: center;
    gap: 8px;
}

.volume-slider-container {
    width: 80px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.volume-controls:hover .volume-slider-container {
    opacity: 1;
}

.volume-slider {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
  background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Stream Info Controls */
.stream-info-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    margin-right: 12px;
}

.quality-badge {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
  font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stream-status-indicator {
  display: flex;
  align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-dot.connecting {
    background: #ffc107;
    animation: statusPulse 2s infinite;
}

.status-dot.connected {
    background: #28a745;
}

.status-dot.error {
    background: #dc3545;
    animation: statusPulse 1s infinite;
}

.video-controls-right {
    display: flex;
    gap: 8px;
}

/* Loading Spinner */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
    gap: 12px;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
}

.spinner-ring {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-top: 3px solid #667eea;
  border-radius: 50%;
    animation: spinnerRotate 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.4s;
    border-top-color: #764ba2;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.8s;
    border-top-color: #f093fb;
}

/* Big Play Button */
.big-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    z-index: 5;
}

.big-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.big-play-button i {
    margin-left: 4px;
}

/* Stream Error Container */
.stream-error-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
    z-index: 20;
}

.error-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 40px;
}

.error-icon {
    font-size: 4rem;
    color: #ff4757;
    margin-bottom: 20px;
    animation: errorShake 0.5s ease-in-out;
}

.error-message h4 {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
  font-weight: 600;
}

.error-message p {
    margin: 0 0 30px 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.error-actions {
  display: flex;
    gap: 12px;
    justify-content: center;
}

/* Animations */
@keyframes streamModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes streamModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

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

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Stream Modal Responsive Design */
@media (max-width: 768px) {
  .stream-modal-container {
    width: 95vw;
    height: 80vh;
    margin: 20px;
  }
  
  .stream-modal-header {
    padding: 12px 16px;
  }
  
  .stream-modal-title h3 {
    font-size: 1.1rem;
  }
  
  .video-controls {
    gap: 12px;
  }
  
  .video-control-btn {
    width: 40px;
    height: 40px;
  }
  
  .play-pause-btn {
    width: 48px;
    height: 48px;
  }
  
  .big-play-button {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }
}

/* General Responsive Design */
@media (max-width: 768px) {
  .app-main {
    padding: 16px;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .content-actions {
    width: 100%;
    justify-content: space-between;
  }

  .search-box input {
    width: 200px;
  }

  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .table-cell {
    justify-content: space-between;
  }

  .nav-tabs {
    overflow-x: auto;
  }

  .nav-tab {
    flex: none;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .stats-container {
    grid-template-columns: 1fr;
  }

  .header-container {
    padding: 0 16px;
  }

  .app-title {
    display: none;
  }

  .search-box input {
    width: 160px;
  }
}

/* Time Display */
.time-display {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin: 0 15px;
}

/* Video Seek Container */
.video-seek-container {
    position: absolute;
    bottom: 70px;
    left: 20px;
    right: 20px;
    height: 20px;
    z-index: 15;
}

.video-seek-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.video-seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-blue);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.video-seek-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.video-seek-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-blue);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.seek-progress-bar {
  position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    pointer-events: none;
}

.seek-progress {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 3px;
    transition: width 0.1s ease;
}

.seek-buffer {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
}

/* Confirmation Dialog Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
  overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

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

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

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 24px;
}

.confirmation-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.confirmation-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #fff3cd;
    border-radius: 50%;
  display: flex;
  align-items: center;
    justify-content: center;
    color: #856404;
    font-size: 20px;
}

.confirmation-text {
    flex: 1;
}

.confirmation-message {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.4;
}

.confirmation-description {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.modal-footer .btn {
    min-width: 100px;
}