* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #f4f5f7;
  color: #1a1a1a;
}

/* Login-Seite */
.login-box {
  max-width: 360px;
  margin: 10vh auto;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.login-box input,
.login-box button {
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.login-box button {
  background: #e50914;
  color: white;
  border: none;
  cursor: pointer;
}

.error {
  color: #c0392b;
  font-size: 0.9rem;
}

/* App-Seite */
.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

#logout-btn {
  border: 1px solid #ccc;
  background: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
}

.upload-button {
  display: inline-block;
  background: #1a1a1a;
  color: white;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
}

.provider-section {
  background: white;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.provider-section h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.hint {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin: 0 0 0.75rem;
}

#provider-filter {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 0.75rem;
}

.provider-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border: 1px solid #eee;
  border-radius: 6px;
}

.provider-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  padding: 0.2rem;
}

.provider-checkbox img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.controls {
  display: flex;
  gap: 0.6rem;
}

.controls button {
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

#start-btn {
  background: #2ecc71;
  color: white;
}

#stop-btn {
  background: #e74c3c;
  color: white;
}

.controls button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

.progress {
  margin-top: 1rem;
}

.progress-bar {
  background: #eee;
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}

.progress-fill {
  background: #2ecc71;
  height: 100%;
  width: 0%;
  transition: width 0.2s ease;
}

#progress-text {
  font-size: 0.85rem;
  color: #555;
}

.stats {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 1rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}

.legend-item.active {
  border-color: #1a1a1a;
  background: #1a1a1a;
  color: white;
}

/* View-Umschalter */
.view-toggle {
  display: inline-flex;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 1rem;
}

.view-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #52514e;
}

.view-btn.active {
  background: #1a1a1a;
  color: white;
}

/* Diagramm */
.chart {
  background: #fcfcfb;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.chart-row {
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.chart-label {
  font-size: 0.85rem;
  color: #52514e;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-bar-track {
  background: #e1e0d9;
  border-radius: 4px;
  height: 20px;
  display: block;
  position: relative;
}

.chart-bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  background: #2a78d6;
  border-radius: 0 4px 4px 0;
}

.chart-value {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: #0b0b0b;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.flatrate {
  background: #2ecc71;
}

.dot.rent {
  background: #f1c40f;
}

.dot.buy {
  background: #3498db;
}

.dot.none {
  background: #bdc3c7;
}

.movie-card {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.provider-row {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.provider-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.provider-logo.flatrate {
  outline: 2px solid #2ecc71;
}

.provider-logo.rent {
  outline: 2px solid #f1c40f;
}

.provider-logo.buy {
  outline: 2px solid #3498db;
}

.none {
  color: #7f8c8d;
  font-style: italic;
}
