/* 공통 스타일 */
:root {
  --primary: #4f46e5;
  --secondary: #64748b;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --success: #22c55e;
  --danger: #ef4444;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --primary: #818cf8;
}

body {
  font-family: 'Pretendard', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  transition: background-color 0.3s;
}

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

/* 메인 대시보드 카드 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.exam-card {
  background: var(--card);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}

.exam-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  border-color: var(--primary);
}

.exam-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.exam-card p {
  color: var(--secondary);
  font-size: 0.875rem;
}

/* 퀴즈 UI */
.quiz-header {
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s;
}

.option-btn {
  width: 100%;
  text-align: left;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.05);
}

.option-btn.correct {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.option-btn.wrong {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.explanation {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(0,0,0,0.05);
  border-radius: 0.75rem;
  display: none;
}

.nav-btns {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

button.primary {
  flex: 1;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-weight: bold;
  cursor: pointer;
}
