:root {
  --bg: #0b0f19;
  --card: #151c2c;
  --primary: #fbbf24;
  --text: #f8fafc;
  --muted: #94a3b8;
  --danger: #ef4444;
  --success: #10b981;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 24px 16px;
  display: flex;
  justify-content: center;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
  max-width: 920px;
}

.app-footer {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 8px;
  padding: 12px 0 24px 0;
}

.stats-badge {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(21, 28, 44, 0.8);
  border: 1px solid #243049;
  padding: 8px 18px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.01em;
}

.stats-badge b {
  color: var(--primary);
  font-weight: 600;
}

@media (min-width: 768px) {
  .layout { grid-template-columns: 1.2fr 0.8fr; }
}

header { margin-bottom: 20px; }
header h1 { font-size: 1.6rem; margin: 0 0 6px 0; }
header p { color: var(--muted); font-size: 0.9rem; margin: 0; }

.card {
  background: var(--card);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid #243049;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  margin-bottom: 20px;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-header-flex h3 { margin: 0; }

.refresh-btn {
  background: #243049;
  border: 1px solid #334155;
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}
.refresh-btn:hover { background: #334155; }

.form-group { margin-bottom: 16px; }
label { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input, select {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  background: #0b0f19;
  border: 1px solid #334155;
  color: var(--text);
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

input:focus, select:focus { 
  outline: 2px solid var(--primary); 
}

/* Constrains the dropdown popup options on desktop */
select option {
  font-size: 0.875rem;
  padding: 8px;
  background: #0b0f19;
  color: var(--text);
}


.helper-text { font-size: 0.75rem; margin-top: 4px; display: block; }

.btn {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  background: var(--primary);
  color: #000;
  transition: transform 0.1s, opacity 0.2s;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }

.status { margin-top: 12px; font-size: 0.875rem; text-align: center; }
.badge { color: var(--primary); font-weight: bold; margin-left: 6px; }
.muted-text { color: var(--muted); font-size: 0.875rem; }

.tracking-list ul { list-style: none; padding: 0; margin: 0; }
.tracking-list li {
  padding: 14px 0;
  border-bottom: 1px solid #243049;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.watch-info { display: flex; flex-direction: column; gap: 4px; }
.watch-header { font-size: 1rem; }
.watch-details { font-size: 0.85rem; color: var(--muted); }

.capacity-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-top: 4px;
}
.capacity-pill.open { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.capacity-pill.full { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.capacity-pill.syncing { background: rgba(148, 163, 184, 0.2); color: var(--muted); }

.delete-btn {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 6px;
  cursor: pointer;
  padding: 4px 10px;
  font-weight: bold;
}
.delete-btn:hover { background: var(--danger); color: #fff; }

/* Course Overview Sidebar Card */
.course-overview-card h3 { font-size: 1.1rem; margin-top: 0; margin-bottom: 4px; }
.card-subtitle { font-size: 0.775rem; color: var(--muted); margin: 0 0 12px 0; }
.course-overview-list { list-style: none; padding: 0; margin: 0; }
.course-overview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #243049;
}

/* Sidebar Info Card */
.info-card h3 { font-size: 1.1rem; margin-top: 0; }
.info-card h4 { font-size: 0.95rem; margin: 12px 0 6px 0; color: var(--primary); }
.info-card p { font-size: 0.85rem; line-height: 1.4; color: var(--muted); }
.divider { border: none; border-top: 1px solid #243049; margin: 16px 0; }
.guide-list { padding-left: 18px; margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }