:root {
  --bg-dark: #0f172a;
  --bg-sidebar: #1e293b;
  --bg-card: #2d3b55;
  --text-main: #f8fafc;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #3b82f6;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: rgba(255, 255, 255, 0.1);
  --glow: 0 0 15px rgba(59, 130, 246, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  margin: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 40px;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.nav-item {
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--glow);
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

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

.header h1 {
  font-size: 2rem;
  margin: 0;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.btn-primary:hover {
  background: #2563eb;
}

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

.btn-danger:hover {
  background: #dc2626;
}

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

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

/* Stats Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Enhanced Channel Card */
.channel-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.channel-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

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

.channel-name {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.online {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.offline {
  background: var(--text-muted);
}

.status-badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 8px;
}

.stat-box {
  font-size: 0.9rem;
}

.stat-box .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-box .value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.live-stat .value {
  color: var(--success);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card-actions button {
  flex: 1;
  justify-content: center;
}

.card-actions .btn-secondary {
  flex: 0;
  min-width: 40px;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal {
  background: var(--bg-card);
  padding: 32px;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--border);
}

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

input,
select {
  width: 100%;
  padding: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: white;
  margin-top: 6px;
}

.video-item {
  background: var(--bg-card);
  padding: 16px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.badge-usage {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

.badge-free {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

.file-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}