/*
 * This is a manifest file that'll be compiled into application.css.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, sans-serif;
  background: #0e1117;
  color: #e8eaf0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

header {
  width: 100%;
  max-width: 640px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #c89b3c;
}

/* Quiz question */
#question {
  width: 100%;
  max-width: 640px;
}

.question {
  background: #1a1f2e;
  border-radius: 12px;
  padding: 2rem;
}

.category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.75rem;
}

.body {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  display: block;
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: #252b3b;
  border: 2px solid #333;
  border-radius: 8px;
  color: #e8eaf0;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.option-btn:hover {
  border-color: #c89b3c;
  background: #2c3347;
}

.option-btn.correct {
  border-color: #4caf50;
  background: #1b3a1f;
  color: #81c784;
}

.option-btn.incorrect {
  border-color: #f44336;
  background: #3a1b1b;
  color: #ef9a9a;
}

.option-btn.disabled {
  cursor: default;
  pointer-events: none;
}

.result {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: #aaa;
}

.empty-state {
  text-align: center;
  color: #888;
  margin-top: 3rem;
}

/* Question editor */
.editor {
  width: 100%;
  max-width: 720px;
}

.editor header {
  margin-bottom: 1.5rem;
}

.question-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #2a2f3e;
}

.question-row .category {
  flex-shrink: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c89b3c;
  width: 60px;
}

.question-row .body {
  flex: 1;
  font-size: 0.95rem;
  font-weight: normal;
}

.question-row .actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Forms */
.field {
  margin-bottom: 1.25rem;
}

.field label, fieldset legend {
  display: block;
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 0.35rem;
}

.field input, .field select, .field textarea {
  width: 100%;
  background: #1a1f2e;
  border: 1px solid #333;
  border-radius: 6px;
  color: #e8eaf0;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
}

fieldset {
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.option-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.option-field input[type="text"] {
  flex: 1;
  background: #252b3b;
  border: 1px solid #333;
  border-radius: 6px;
  color: #e8eaf0;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
}

/* Buttons & links */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #c89b3c;
  color: #0e1117;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn:hover { background: #d4a84b; }

a { color: #c89b3c; text-decoration: none; }
a:hover { text-decoration: underline; }

.errors { background: #3a1b1b; border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 1rem; color: #ef9a9a; }
