:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-light: #475569;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: -0.5px;
}

.nav-link {
  margin-left: 24px;
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
}

/* Hero Section */
.hero {
  max-width: 800px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}

.badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 24px;
  letter-spacing: -1px;
  font-weight: 800;
}

.highlight {
  color: var(--primary);
}

.lead {
  font-size: 1.25rem;
  color: var(--text-light);
  margin: 0 auto 40px;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 14px 28px;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-large {
  padding: 16px 40px;
  font-size: 1.1rem;
}

.btn-small {
  background: #eff6ff;
  color: var(--primary);
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-small:hover { background: #dbeafe; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 24px;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover { background: #f8fafc; }

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger:hover { background: #fecaca; }

/* =========================================
   FEATURES (Die drei Boxen)
   ========================================= */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 80px auto;
  padding: 0 24px;
}

.feature-card {
  background: var(--surface);
  padding: 40px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Der farbige Strich oben auf der Karte */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 12px;
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.feature-card h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Cards (für Upload, Result, Admin) */
.card {
  max-width: 720px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.card.narrow { max-width: 440px; }
.card h1 { margin-top: 0; font-size: 1.8rem; letter-spacing: -0.5px; }

/* Forms */
.form { display: grid; gap: 20px; margin-top: 24px; }
.form label { display: grid; gap: 8px; font-weight: 600; font-size: 0.95rem; }

input[type=email], input[type=password], textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.file-drop {
  display: grid;
  place-items: center;
  padding: 48px 24px;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  color: var(--text-light);
  font-weight: 500;
  transition: all 0.2s;
}

.file-drop:hover { border-color: var(--primary); background: #eff6ff; color: var(--primary); }
.file-drop input { display: none; }

/* Text & Utils */
.error { color: #b91c1c; background: #fee2e2; padding: 12px; border-radius: 8px; font-weight: 500; font-size: 0.9rem; }
.hint, .muted { color: var(--text-light); font-size: 0.9rem; }

.draft {
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #334155;
}

/* Admin Tables */
.table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.table th, .table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.table th { font-weight: 600; color: var(--text-light); background: #f8fafc; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; margin-top: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); }
.stat span { display: block; font-size: 2.5rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 8px; }
.stat { font-weight: 500; color: var(--text-light); }

/* Footer */
.site-footer {
  max-width: 800px;
  margin: 80px auto 40px;
  padding: 0 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
}

.disclaimer {
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 24px;
}

/* Mobile Anpassungen */
@media (max-width: 600px) {
  .site-header { padding: 16px 20px; }
  .hero { margin: 40px auto; }
  .hero h1 { font-size: 2.2rem; }
  .card { margin: 24px 16px; padding: 24px; }
  .features { margin: 40px auto; gap: 16px; }
  .btn-large { width: 100%; }
}