/* MBTI 64 Personality Test - Styles */

:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5345D6;
  --secondary: #00CEC9;
  --accent: #FD79A8;
  --background: #F8F9FA;
  --surface: #FFFFFF;
  --text: #2D3436;
  --text-light: #636E72;
  --text-lighter: #B2BEC3;
  --border: #DFE6E9;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
  cursor: pointer;
}

.navbar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 800;
}

.navbar-links {
  display: flex;
  gap: 32px;
}

.navbar-link {
  color: var(--text-light);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.navbar-link:hover {
  color: var(--primary);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: flex;
  background: var(--background);
  border-radius: 8px;
  padding: 2px;
}

.lang-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.navbar-cta {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.navbar-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Main Content */
.main-content {
  flex: 1;
}

.page-enter {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.hero-container {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-cta {
  padding: 16px 40px;
  background: white;
  color: var(--primary);
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
}

.hero-stat {
  text-align: center;
  color: white;
}

.hero-stat-number {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 14px;
  opacity: 0.9;
}

/* Dimensions Section */
.dimensions-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.dimension-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.dimension-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.dimension-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
}

.dimension-icon.ei { background: linear-gradient(135deg, #FFEAA7, #FDCB6E); }
.dimension-icon.sn { background: linear-gradient(135deg, #81ECEC, #00CEC9); }
.dimension-icon.tf { background: linear-gradient(135deg, #A29BFE, #6C5CE7); }
.dimension-icon.jp { background: linear-gradient(135deg, #55EFC4, #00B894); }
.dimension-icon.ao { background: linear-gradient(135deg, #FF7675, #D63031); }
.dimension-icon.hc { background: linear-gradient(135deg, #FD79A8, #E84393); }

.dimension-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.dimension-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.6;
}

.dimension-letters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
  font-size: 14px;
}

.dimension-letter.left { color: var(--primary); }
.dimension-letter.right { color: var(--secondary); }

/* Types Section */
.types-section {
  background: var(--surface);
  padding: 80px 24px;
}

.types-container {
  max-width: 1200px;
  margin: 0 auto;
}

.type-group {
  margin-bottom: 48px;
}

.type-group-header {
  text-align: center;
  margin-bottom: 32px;
}

.type-group-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
}

.type-group-icon.analysts { background: linear-gradient(135deg, #A29BFE, #6C5CE7); }
.type-group-icon.diplomats { background: linear-gradient(135deg, #55EFC4, #00B894); }
.type-group-icon.sentinels { background: linear-gradient(135deg, #74B9FF, #0984E3); }
.type-group-icon.explorers { background: linear-gradient(135deg, #FFEAA7, #FDCB6E); }

.type-group-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.type-group-desc {
  font-size: 15px;
  color: var(--text-light);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.type-card {
  background: var(--background);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.type-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.type-card-code {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 2px;
}

.type-card-subtype {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.7;
  margin-bottom: 8px;
}

.type-card-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.type-card-tagline {
  font-size: 12px;
  color: var(--text-light);
}

/* Test Page */
.test-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 24px;
}

.test-header {
  text-align: center;
  margin-bottom: 40px;
}

.test-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
}

.test-subtitle {
  font-size: 16px;
  color: var(--text-light);
}

.test-progress {
  margin-bottom: 40px;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-light);
}

.question-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}

.question-number {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}

.question-text {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 32px;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.option-btn:hover {
  border-color: var(--primary-light);
  background: rgba(108, 92, 231, 0.05);
}

.option-btn.selected {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.1);
}

.option-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: var(--transition);
}

.option-btn.selected .option-radio {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2);
}

.option-text {
  font-size: 16px;
  font-weight: 500;
}

.test-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.nav-btn {
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.nav-btn.prev {
  background: var(--background);
  color: var(--text-light);
  border: 2px solid var(--border);
}

.nav-btn.prev:hover:not(:disabled) {
  border-color: var(--text-light);
}

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

.nav-btn.next:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Result Page */
.result-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.result-header {
  text-align: center;
  margin-bottom: 48px;
}

.result-type-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.result-type-code {
  font-size: 64px;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: -2px;
}

.result-type-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-type-slogan {
  font-size: 16px;
  color: var(--text-light);
  font-style: italic;
}

.dimensions-chart {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.chart-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.dimension-bar {
  margin-bottom: 20px;
}

.dimension-bar:last-child {
  margin-bottom: 0;
}

.dimension-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.dimension-bar-header .left { color: var(--primary); }
.dimension-bar-header .right { color: var(--secondary); }

.dimension-bar-track {
  height: 12px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
}

.dimension-bar-fill-left {
  background: var(--primary);
  border-radius: 6px 0 0 6px;
  transition: width 0.5s ease;
}

.dimension-bar-fill-right {
  background: var(--secondary);
  border-radius: 0 6px 6px 0;
  transition: width 0.5s ease;
}

.result-description {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.result-description h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.result-description p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-light);
}

/* Subtype Info */
.subtype-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.subtype-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.subtype-card .subtype-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.subtype-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtype-card p {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 600;
}

/* Strengths & Weaknesses */
.strengths-weaknesses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.sw-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.sw-card.strengths {
  border-top: 4px solid #00B894;
}

.sw-card.weaknesses {
  border-top: 4px solid #D63031;
}

.sw-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.sw-list {
  list-style: none;
}

.sw-list li {
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 24px;
}

.sw-list li:last-child {
  border-bottom: none;
}

.sw-card.strengths .sw-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #00B894;
  font-weight: 700;
}

.sw-card.weaknesses .sw-list li::before {
  content: '!';
  position: absolute;
  left: 0;
  color: #D63031;
  font-weight: 700;
  width: 16px;
  text-align: center;
}

/* Careers */
.careers-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.careers-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.career-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.career-tag {
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.1));
  color: var(--primary);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
}

/* Relationships */
.relationships-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.relationships-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.relationships-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-light);
}

/* Famous People */
.famous-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.famous-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.famous-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.famous-person {
  text-align: center;
}

.famous-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 700;
  margin: 0 auto 8px;
}

.famous-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}

/* Result Actions */
.result-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.action-btn {
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

.action-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.action-btn.secondary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.action-btn.secondary:hover {
  background: rgba(108, 92, 231, 0.05);
}

/* Type Detail Page */
.type-detail-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 32px;
}

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

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-text {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-link {
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-text {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.modal-btn.secondary {
  background: var(--background);
  color: var(--text-light);
  border: 2px solid var(--border);
}

.modal-btn.secondary:hover {
  border-color: var(--text-light);
}

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

.modal-btn.primary:hover {
  background: var(--primary-dark);
}

/* Loading */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 16px;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .hero-stats {
    gap: 24px;
  }
  
  .hero-stat-number {
    font-size: 28px;
  }
  
  .dimensions-grid {
    grid-template-columns: 1fr;
  }
  
  .type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .test-title {
    font-size: 28px;
  }
  
  .question-card {
    padding: 24px;
  }
  
  .question-text {
    font-size: 18px;
  }
  
  .result-type-code {
    font-size: 48px;
  }
  
  .strengths-weaknesses {
    grid-template-columns: 1fr;
  }
  
  .subtype-info {
    grid-template-columns: 1fr;
  }
  
  .famous-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .navbar-container {
    padding: 0 16px;
  }
  
  .hero-section {
    padding: 60px 16px 60px;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
  
  .type-grid {
    grid-template-columns: 1fr;
  }
  
  .test-page {
    padding: 40px 16px;
  }
  
  .result-page {
    padding: 40px 16px;
  }
  
  .result-type-code {
    font-size: 36px;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
  }
}
