/**
 * Quiz Styles
 * Last Updated: 2025-02-02 02:10:00 KST
 */

/* Quiz Start Screen Styles */
.quiz-start-screen {
  max-width: 600px;
  margin: 0 auto;
}

.quiz-setup {
  margin-top: 2rem;
}

.setup-section {
  margin-bottom: 2rem;
}

.setup-label {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.quiz-count-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.count-option {
  flex: 1;
  min-width: 80px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.count-option:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.count-option.active {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}

.quiz-type-options {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

.type-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.type-option:hover {
  border-color: var(--primary-color);
  transform: translateX(4px);
}

.type-option.active {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}

.type-emoji {
  font-size: 2rem;
}

.type-label {
  font-size: 1.1rem;
  font-weight: 500;
}

.setup-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.setup-actions .quiz-btn {
  flex: 1;
}

/* Quiz Progress */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 1.1rem;
}

.progress-text {
  color: var(--text-secondary);
}

.progress-text strong {
  color: var(--primary-color);
  font-size: 1.3rem;
}

/* Quiz Complete Screen */
.quiz-complete-screen {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.complete-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.complete-stat-card {
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 2px solid var(--border-color);
}

.complete-stat-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.complete-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.complete-stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.complete-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.complete-actions .quiz-btn {
  flex: 1;
  min-width: 120px;
  white-space: nowrap;
}

/* History Modal */
.history-content {
  /* Removed conflicting styles - using modal-scrollable-content instead */
}

.history-content::-webkit-scrollbar {
  width: 6px;
}

.history-content::-webkit-scrollbar-track {
  background: transparent;
}

.history-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.history-loading,
.history-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

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

.history-item {
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
  overflow: hidden;
}

.history-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.history-card {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: 0.75rem;
  min-height: 110px;
}

.history-card-type {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
  white-space: nowrap;
}

.history-card-score {
  grid-column: 1 / -1;
  grid-row: 2 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.history-score-big {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.history-score-big.score-excellent {
  color: #16a34a;
}

.history-score-big.score-good {
  color: #2563eb;
}

.history-score-big.score-average {
  color: #f59e0b;
}

.history-score-big.score-poor {
  color: #ef4444;
}

.history-improvement {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
}

.history-improvement.improvement-up {
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
}

.history-improvement.improvement-down {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.history-improvement.improvement-same {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
}

.history-improvement.improvement-first {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.history-card-date {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  align-self: end;
}

.history-card-details {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
  align-items: end;
  justify-content: end;
}

.detail-item {
  padding: 0.25rem 0.6rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
  white-space: nowrap;
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-item.correct {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  font-weight: 600;
}

.detail-item.wrong {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-weight: 600;
}

/* Button Styles */
.quiz-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-btn.primary {
  background: var(--primary-color);
  color: white;
}

.quiz-btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quiz-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.quiz-btn.secondary:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Complete screen specific button colors */
#viewWrongBtn {
  background: #f59e0b;
  color: white;
  border: none;
}

#viewWrongBtn:hover {
  background: #d97706;
  border-color: #d97706;
}

#backToStartBtn {
  background: var(--primary-color);
  color: white;
  border: none;
}

#backToStartBtn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.quiz-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Responsive */
@media (max-width: 768px) {
  .quiz-count-options {
    flex-direction: column;
  }

  .count-option {
    min-width: 100%;
  }

  .complete-stats {
    grid-template-columns: 1fr;
  }

  .setup-actions,
  .complete-actions {
    flex-direction: column;
  }
}

/* CSS Variables (?์ - ?ค์  theme??๋ง๊ฒ ์กฐ์ ) */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-primary: #ffffff;
  --bg-secondary: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #d1d5db;
}

[data-theme="dark"] {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --bg-primary: #1f2937;
  --bg-secondary: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --border-color: #4b5563;
}

