:root {
  --bg: #0f1115;
  --panel: #161a22;
  --muted: #98a2b3;
  --text: #eef2ff;
  --accent: #60a5fa;
  --green: #34d399;
  --red: #fb7185;
  --border: #242938;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: system-ui, Segoe UI, Roboto, Arial, sans-serif; }

.hdr {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  background: #0c0e13;
}

.hdr-title { font-size: 20px; font-weight: 700; }
.hdr-sub { color: var(--muted); margin-top: 6px; }

.wrap {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

.card-title { font-weight: 700; font-size: 18px; }
.card-sub { color: var(--muted); margin-bottom: 12px; border-top: 1px solid var(--border); padding-top: 8px; }

.grid label { display: block; margin-bottom: 10px; }
.grid input, .grid select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f1320;
  color: var(--text);
}

.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 8px; }

.actions { display: flex; gap: 10px; margin-top: 12px; }
button {
  padding: 10px 14px;
  background: var(--accent);
  color: #081018;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

button:hover { filter: brightness(1.05); }

button:disabled {
  cursor: not-allowed;
  opacity: 0.6; /* optional: macht den Button etwas blasser */
}

.status { margin-top: 10px; color: var(--muted); }

.hidden { display: none; }

a.dl {
  display: inline-block;
  margin: 8px 8px 0 0;
  padding: 8px 10px;
  background: #0f1320;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--green);
}

a.dl:hover { border-color: var(--green); }

.bad { color: var(--red); }

.individual-progress {
  margin: 15px 0;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.progress-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.progress-bar-wrapper {
  height: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
  margin: 8px 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.individual-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #45a049);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
}

.bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Titel links, Prozent rechts */
  padding: 0 10px;                /* Abstand links + rechts */
  color: black;
  pointer-events: none;
  font-weight: 500;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
}

.progress-title {
  flex: 1;
  margin-right: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.status-waiting {
  background-color: #ff9800;
  color: white;
}

.status-downloading {
  background-color: #2196F3;
  color: white;
}

.status-completed {
  background-color: #4CAF50;
  color: white;
}

.status-error {
  background-color: #f44336;
  color: white;
}