@import url("assets/fonts.css");

:root {
  /* Markenfarben adence.de */
  --primary: #34a5bf;       /* Türkis */
  --primary-dark: #2b8aa1;
  --secondary: #324d9b;     /* Blau */
  --accent: #d90a2c;        /* Rot */
  --bg: #f4f7f8;
  --card: #ffffff;
  --text: #17161a;
  --muted: #565656;
  --border: #e3e8ea;

  --font-heading: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

.site-logo {
  height: 80px;
  width: auto;
  max-width: 100%;
  margin-bottom: 1.25rem;
}

.site-header h1 {
  margin: 0;
  font-size: 2rem;
}

.subtitle {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Berufsauswahl */
#job-selection h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.job-buttons {
  display: grid;
  gap: 1rem;
}

.job-button {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: left;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.job-button:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(52, 165, 191, 0.12);
}

.job-icon {
  font-size: 1.6rem;
}

/* Fragebogen */
.back-button {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1rem;
}

.back-button:hover {
  text-decoration: underline;
}

.question {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.question-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.question-number {
  color: var(--primary);
  margin-right: 0.4rem;
}

.question input[type="text"],
.question textarea,
.question select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.question textarea {
  min-height: 90px;
  resize: vertical;
}

.question input:focus,
.question textarea:focus,
.question select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(52, 165, 191, 0.15);
}

.option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
  cursor: pointer;
}

.option input {
  width: auto;
}

.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 0.85rem;
}

/* Bewerber-Formular */
#applicant-data {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
}

#applicant-data h2 {
  margin-top: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.field input,
.field select {
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(52, 165, 191, 0.15);
}

.field input[type="file"] {
  padding: 0.5rem;
  background: var(--bg);
  cursor: pointer;
}

/* Berufsauswahl im Formular */
.job-radios {
  display: grid;
  gap: 0.75rem;
}

.job-radio {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.job-radio:hover {
  border-color: var(--primary);
}

.job-radio input {
  width: auto;
  accent-color: var(--primary);
}

.job-radio:has(input:checked) {
  border-color: var(--primary);
  background: rgba(52, 165, 191, 0.06);
}

.upload-title {
  margin: 1.75rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.75rem 0 1.25rem;
}

@media (max-width: 520px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

/* Erklärungs-Seite vor dem Test */
#test-intro {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
}

.intro-job {
  color: var(--muted);
  margin-top: 0;
}

.intro-stats {
  display: flex;
  gap: 1rem;
  margin: 1.25rem 0;
}

.intro-stat {
  flex: 1;
  text-align: center;
  background: var(--bg);
  border-radius: 10px;
  padding: 1.1rem 0.5rem;
}

.intro-stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.intro-stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.intro-subtitle {
  margin: 1.5rem 0 0.5rem;
}

.intro-rules {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
}

.intro-rules li {
  margin-bottom: 0.5rem;
}

.intro-note {
  background: rgba(52, 165, 191, 0.06);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

#test-intro .nav-button {
  width: 100%;
}

/* Screenshot-/Fokus-Schutz */
.security-blur {
  filter: blur(16px);
  transition: filter 0.05s;
  pointer-events: none;
}

.screenshot-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.screenshot-overlay[hidden] {
  display: none;
}

.screenshot-overlay-box {
  background: var(--card);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  max-width: 440px;
  text-align: center;
}

.screenshot-overlay-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.screenshot-overlay-box h2 {
  margin: 0 0 0.5rem;
}

.screenshot-overlay-box p {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

/* Test-Kopf mit Timer */
.test-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
  background: rgba(52, 165, 191, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
}

.timer::before {
  content: "⏱ ";
}

.timer-warn {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.55; }
}

/* Kopierschutz: Fragetext nicht markierbar, Eingabefelder schon */
#questions-container .question-label,
#questions-container .option,
#questions-container .code-block {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#questions-container input,
#questions-container textarea,
#questions-container select {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Fortschritt */
.progress {
  margin-bottom: 1.25rem;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.progress-text {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}

/* "Ich weiß es nicht" + Hinweis */
.answer-hint {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.dontknow-button {
  display: inline-block;
  background: none;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: border-color 0.15s, color 0.15s;
}

.dontknow-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Text-Weiter-Button (nur bei Freitextfragen) */
#text-continue {
  width: 100%;
  margin-top: 0.75rem;
}

/* Navigation */
.nav-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.nav-button {
  flex: 1;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.nav-button:hover {
  background: var(--primary-dark);
}

.nav-button.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.nav-button.secondary:hover {
  background: var(--bg);
}

.submit-button {
  background: #16a34a;
}

.submit-button:hover {
  background: #15803d;
}

/* Bestätigung */
#confirmation {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
}

.placeholder-note {
  color: var(--muted);
  font-style: italic;
  text-align: center;
}
