* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #1B365D;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}


#app {
  width: 100%;
  max-width: 480px;
  padding: 16px;
}

.app-header {
  text-align: center;
  margin-bottom: 16px;
}

.app-header h1 {
  font-size: 1.8rem;
  color: #ffffff;
}

.app-main {
  background: #102A44;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}


.screen {
  display: none;
}

.screen.active {
  display: block;
}

.screen.hidden {
  display: none;
}

p {
  margin-bottom: 16px;
  line-height: 1.4;
}

.primary-button,
.secondary-button {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.15s ease;
}

.primary-button {
  background: #22c55e;
  color: #022c22;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
}

.secondary-button {
  margin-top: 12px;
  background: #274C77;
  color: #ffffff;
}


.primary-button {
  background: #22c55e;
  color: #022c22;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.5);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
  box-shadow: none;
  opacity: 0.9;
}

.secondary-button {
  margin-top: 12px;
  background: #1f2937;
  color: #f9fafb;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-button {
  padding: 10px 12px;
  border-radius: 12px;
  background: #274C77;
  border: 1px solid #3A6EA5;
  color: #ffffff;
}

.option-button:hover {
  background: #2F5D8A;
}

.option-button.selected {
  background: #f59e0b;
  border-color: #fbbf24;
  color: #1B365D;
}

.option-button.correct {
  background: #16a34a;
  border-color: #22c55e;
}

.option-button.wrong {
  background: #b91c1c;
  border-color: #ef4444;
}


.progress {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #9ca3af;
}

.leaderboard-list {
  list-style: none;
  margin-top: 8px;
}
.question-type {
  font-weight: 600;
  font-style: italic;
}

.leaderboard-list li {
  padding: 6px 8px;
  border-radius: 8px;
  background: #020617;
  border: 1px solid #111827;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

/* ===== Форма ввода пользователя ===== */

#start-screen {
  animation: fadeIn 0.4s ease;
}

#test-select-container {
  margin-bottom: 14px;
}

#test-select,
#user-name,
#user-group {
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.95rem;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#test-select {
  appearance: none;
  cursor: pointer;
}

/* Плейсхолдер */
#user-name::placeholder,
#user-group::placeholder {
  color: #64748b;
}

/* Hover */
#test-select:hover,
#user-name:hover,
#user-group:hover {
  border-color: #334155;
  background: #0b1220;
}

/* Focus */
#test-select:focus,
#user-name:focus,
#user-group:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  background: #020617;
}

/* Отступы между полями */
#test-select-container,
#user-name,
#user-group {
  margin-bottom: 10px;
}

/* Анимация */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

#form-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.95rem;
  margin-bottom: 16px;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

#test-select,
#user-name,
#user-group,
#form-select {
  background: #274C77;
  border: 1px solid #3A6EA5;
  color: #ffffff;
}

#user-name::placeholder,
#user-group::placeholder {
  color: #cbd5e1;
}

#test-select:focus,
#user-name:focus,
#user-group:focus,
#form-select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.3);
}


#form-select:hover { border-color: #334155; }
#form-select:focus { border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,0.3); }
