/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps.
 * You can still add application-wide styles to this file, but they'll appear at
 * the bottom of the compiled file so your custom styles come last.
 *
 *= require_tree .
 *= require_self
 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #1a1a2e;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #1a1a2e;
}

/* Navigation */
.navbar {
  background-color: #0f3460;
  color: white;
  padding: 0 1rem;
}

.nav-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}

.nav-brand {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: white;
  text-decoration: underline;
}

.nav-user {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.btn-logout {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

/* Test list */
.test-list {
  list-style: none;
}

.test-item {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-item h2 a {
  color: #1a1a2e;
  text-decoration: none;
}

.test-item h2 a:hover {
  color: #0f3460;
  text-decoration: underline;
}

.test-item p {
  color: #666;
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

/* Login form */
.login-form {
  max-width: 400px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Question cards */
.question-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.question-card h3 {
  color: #0f3460;
  margin-bottom: 0.5rem;
}

.question-card p {
  margin-bottom: 1rem;
}

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

.option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.option:hover {
  background-color: #f0f4ff;
}

.option input[type="radio"] {
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  color: #333;
  background: white;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: #f0f0f0;
}

.btn-primary {
  background-color: #0f3460;
  color: white;
  border-color: #0f3460;
  margin-top: 1rem;
}

.btn-primary:hover {
  background-color: #1a5276;
}

/* Action bar */
.action-bar {
  text-align: center;
  margin-bottom: 2rem;
}

/* Result page */
.result-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-display {
  font-size: 3rem;
  font-weight: bold;
  margin: 1rem 0;
}

.score {
  color: #0f3460;
}

.divider {
  color: #ccc;
}

.total {
  color: #666;
}

.percentage {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.submitted-at {
  color: #999;
  font-size: 0.9rem;
}

/* Review section */
.review-section {
  margin-bottom: 2rem;
}

.review-question {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.review-question h4 {
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.review-question p {
  margin-bottom: 0.25rem;
}

.correct {
  color: #27ae60;
  font-weight: 600;
}

.incorrect {
  color: #e74c3c;
  font-weight: 600;
}

.note {
  color: #999;
  font-style: italic;
  margin-bottom: 1rem;
}

/* Flash messages */
.flash-notice {
  background-color: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.flash-alert {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}