:root {
  /* 붉은 기 섞인 보라 계열 팔레트 */
  --primary: #a855f7;       /* purple-500 */
  --primary-dark: #9333ea;  /* purple-600 */
  --secondary: #d946ef;     /* fuchsia-500 */
  --success: #10b981;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

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

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.25);
}

.main-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* Categories */
.categories {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.category-btn {
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--gray-300);
  background: white;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.category-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Test Grid */
.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.test-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  cursor: pointer;
  border: 2px solid transparent;
}

.test-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

.test-thumbnail {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
  box-shadow: inset 0 -20px 40px rgba(217, 70, 239, 0.25);
}

.test-content {
  padding: 1.5rem;
}

.test-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.test-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.test-description {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.test-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Test Page */
.test-header {
  margin-bottom: 2rem;
}

.back-btn {
  padding: 0.5rem 1rem;
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.back-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: var(--gray-200);
  border-radius: 9999px;
  overflow: hidden;
}

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

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

.question-number {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.question-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2rem;
}

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

.option-btn {
  padding: 1.25rem;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  transition: all 0.2s;
  font-weight: 500;
}

.option-btn:hover {
  background: var(--gray-100);
  border-color: var(--primary);
}

.option-btn.selected {
  background: rgba(168, 85, 247, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}

/* Result Page */
.result-container {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  text-align: center;
}

.result-type {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}

.result-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.result-description {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.result-detail {
  text-align: left;
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: 0.75rem;
  line-height: 1.8;
  color: var(--gray-800);
}

.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--gray-800);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--gray-600);
  font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 768px) {
  .main-title {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .test-grid {
    grid-template-columns: 1fr;
  }
  
  .question-text {
    font-size: 1.25rem;
  }
  
  .result-type {
    font-size: 2rem;
  }
}
