* { box-sizing: border-box; }

:root {
  --blue: #4d87ca;
  --blue-dark: #3c6fa8;
  --gold: #fcdd09;
  --gold-dark: #e0c400;
  --white: #ffffff;
  --ink: #1c2128;
  --ink-soft: #525863;
  --border: #e2e6ec;
  --bg-soft: #f5f7fa;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--white);
  color: var(--ink);
  padding: 2rem 1rem;
}
.wrap {
  max-width: 480px;
  margin: 0 auto;
}
.wrap.wide {
  max-width: 1100px;
}

.site-header {
  max-width: 480px;
  margin: 0 auto 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.wide + .site-header,
.wrap.wide .site-header {
  max-width: 1100px;
}
.site-header img {
  width: 160px;
  height: auto;
  margin-bottom: 0.5rem;
}
.site-heading {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--blue);
}
.site-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.deadline-info {
  font-size: 0.9rem;
  color: var(--blue-dark);
  background: #eaf2fb;
  border: 1px solid #cfe0f3;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  margin: -0.5rem 0 1.5rem;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}
.sub {
  color: var(--ink-soft);
  margin-top: 0;
  margin-bottom: 1.5rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 2px 10px rgba(20, 30, 50, 0.05);
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="file"],
input[type="datetime-local"],
textarea,
select {
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
}

.checkbox-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.checkbox-row input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--blue);
}
.checkbox-row a {
  color: var(--blue);
}

button {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:hover:not(:disabled) {
  background: var(--blue-dark);
}
button.secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
}
button.secondary:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}
button.danger {
  background: var(--white);
  color: #c0392b;
  border: 1px solid #f0c4bc;
}
button.danger:hover:not(:disabled) {
  background: #fdecea;
}

.msg {
  margin: 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.msg.success { color: #1f9d55; }
.msg.error { color: #c0392b; }

.notice {
  background: #fffbe0;
  border: 1px solid var(--gold);
  color: #6b5c00;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.notice a { color: var(--blue); }

.notice.finale {
  background: #eaf2fb;
  border: 1px solid var(--blue);
  color: var(--blue-dark);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
}

.finalist-badge {
  display: inline-block;
  background: var(--gold);
  color: #4a4000;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem;
}
.progress-track {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--blue);
  border-radius: 6px;
  transition: width 0.15s ease;
}
.progress-text {
  font-size: 0.8rem;
  color: var(--ink-soft);
  min-width: 3.5em;
  text-align: right;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.clip-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(20, 30, 50, 0.05);
}
.clip-card video {
  width: 100%;
  background: black;
  aspect-ratio: 16/9;
}
.clip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}
.vote-count {
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.vote-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  background: var(--blue);
}

/* Admin-Tabelle */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table th {
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}
.admin-table .actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.admin-table button {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}
.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-badge.ready { background: #e3f7ea; color: #1f9d55; }
.status-badge.queued { background: #eaf2fb; color: #386ba8; }
.status-badge.processing { background: #fffbe0; color: #8a7500; }
.status-badge.failed { background: #fdecea; color: #c0392b; }

.site-footer {
  max-width: 1100px;
  margin: 3rem auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer a {
  color: var(--ink-soft);
}
.site-footer a:hover {
  color: var(--blue);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 25, 35, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.modal-box {
  background: var(--white);
  border-radius: 12px;
  border-top: 4px solid var(--gold);
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.modal-box label {
  margin-top: 0.75rem;
}
