/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Screen Reader Only - Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --secondary: #ec4899;
  --background: #fafafa;
  --surface: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --success: #10b981;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body {
  font-family: 'Poppins', 'Noto Sans KR', sans-serif;
  background: #ffffff;
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Language Toggle */
.lang-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.lang-toggle:hover {
  background: var(--background);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.lang-toggle:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Header */
.header {
  text-align: center;
  padding: 40px 0 30px;
  color: var(--text-primary);
}

.title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Main Content */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Input Card */
.input-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xl);
}

.input-group {
  margin-bottom: 24px;
}

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.input-group input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-family: inherit;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-group input::placeholder {
  color: var(--text-light);
}

/* Gender Options */
.gender-options {
  display: flex;
  gap: 12px;
}

.gender-btn {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

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

.gender-btn.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  color: var(--primary);
}

.gender-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Generate Button */
.generate-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.generate-btn:active {
  transform: translateY(0);
}

.generate-btn:focus {
  outline: 2px solid var(--primary-dark);
  outline-offset: 4px;
}

/* Result Card */
.result-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  display: none;
  animation: slideUp 0.4s ease;
}

.result-card.show {
  display: block;
}

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

.result-label {
  font-size: 13px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.korean-name {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  font-family: 'Noto Sans KR', sans-serif;
}

.english-name {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* Name Details */
.name-details {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.detail-item {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

/* Share Section */
.share-section {
  margin-bottom: 20px;
}

.share-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.share-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.share-btn.twitter {
  background: #000000;
  color: white;
}

.share-btn.facebook {
  background: #1877f2;
  color: white;
}

.share-btn.copy {
  background: var(--text-secondary);
  color: white;
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Regenerate Button */
.regenerate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

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

.regenerate-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 16px;
  }

  .lang-toggle {
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    font-size: 13px;
  }

  .header {
    padding: 30px 0 20px;
  }

  .title {
    font-size: 24px;
  }

  .subtitle {
    font-size: 14px;
  }

  .input-card,
  .result-card {
    padding: 24px;
  }

  .korean-name {
    font-size: 40px;
  }

  .english-name {
    font-size: 18px;
  }
}

/* Statistics Counter */
.stats-counter {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
  font-weight: 500;
}

.stats-counter #totalCounter {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
}

/* Style buttons (renamed from gender-btn) */
.style-btn {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

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

.style-btn.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  color: var(--primary);
}

.style-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Rarity Badge */
.rarity-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
  animation: shimmer 2s infinite;
}

.rarity-common {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  color: white;
}

.rarity-uncommon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.rarity-rare {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.rarity-legendary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

@keyframes shimmer {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Celebrity Match */
.celeb-match {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 2px solid rgba(236, 72, 153, 0.3);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

/* Download Button */
.share-btn.download {
  background: var(--success);
  color: white;
}

/* Feature Hints */
.feature-hints {
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-top: 20px;
  text-align: center;
}

.hint-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hint-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hint-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.hint-item:hover {
  border-color: var(--primary-light);
  transform: translateX(4px);
}

.hint-icon {
  font-size: 24px;
}

/* Responsive */
@media (max-width: 480px) {
  .stats-counter {
    font-size: 13px;
  }

  .stats-counter #totalCounter {
    font-size: 15px;
  }

  .rarity-badge {
    font-size: 13px;
    padding: 6px 12px;
  }

  .celeb-match {
    font-size: 14px;
    padding: 10px;
  }

  .feature-hints {
    padding: 20px;
  }

  .hint-title {
    font-size: 16px;
  }

  .hint-item {
    font-size: 13px;
    padding: 10px;
  }

  .hint-icon {
    font-size: 20px;
  }
}

/* AdSense placeholder */
.ad-space {
  background: var(--background);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: var(--text-light);
  font-size: 12px;
  margin: 20px 0;
}

/* Content Sections */
.content-section {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin: 24px 0;
  box-shadow: var(--shadow-md);
}

.content-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  text-align: center;
}

.content-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 12px;
}

.content-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* How It Works Section */
.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.step-item {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.step-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-number {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.step-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin: 12px 0 8px;
  text-align: center;
}

.step-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Features List */
.features-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.features-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.7;
}

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

.features-list li strong {
  color: var(--primary);
  font-weight: 600;
}

/* FAQ Section - Accordion Style */
.faq-container {
  margin-top: 24px;
}

.faq-item {
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: var(--primary-light);
}

.faq-item.active {
  border-color: var(--primary);
}

.faq-question {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: rgba(99, 102, 241, 0.05);
}

.faq-question-text {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.faq-question-text::before {
  content: "Q.";
  flex-shrink: 0;
  font-weight: 700;
}

.faq-toggle {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
  padding: 0 20px 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 1000px;
  padding: 0 20px 20px 44px;
}

/* Contact Form Section */
.contact-form {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-family: inherit;
  background: var(--surface);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:focus {
  outline: 2px solid var(--primary-dark);
  outline-offset: 4px;
}

/* Expanded Footer */
.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.footer-copyright {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}

/* Responsive for content sections */
@media (max-width: 480px) {
  .content-section {
    padding: 24px 20px;
  }

  .content-section h2 {
    font-size: 20px;
  }

  .content-section h3 {
    font-size: 16px;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .step-item {
    padding: 20px;
  }

  .faq-question {
    font-size: 15px;
  }

  .faq-answer {
    font-size: 13px;
    padding-left: 20px;
  }

  .contact-form {
    padding: 20px;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

/* ==========================================
   Professional Naming Feature Styles
   ========================================== */

/* Mode Selection Card */
.mode-selection-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
  animation: fadeIn 0.5s ease;
}

.mode-selection-card h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.mode-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.mode-option {
  background: linear-gradient(135deg, #f5f7fa 0%, #f3f4f6 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.mode-option:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.mode-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 15px;
}

.mode-option h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.mode-option p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Professional Form */
.professional-card {
  position: relative;
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

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

.professional-card h3 {
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pro-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.datetime-inputs {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.datetime-inputs input[type="date"],
.datetime-inputs input[type="time"] {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
}

.datetime-inputs input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.calendar-type {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.calendar-type label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.calendar-type input[type="radio"] {
  margin-right: 6px;
  cursor: pointer;
}

.meaning-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.meaning-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 400;
  text-align: center;
}

.meaning-btn:hover {
  border-color: var(--primary-light);
  background: #fafbff;
  transform: translateY(-2px);
}

.meaning-btn.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f0f1ff, #fafbff);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.meaning-btn span {
  transition: all 0.3s ease;
}

/* Professional Results */
.professional-results {
  animation: fadeIn 0.5s ease;
}

.professional-results h2 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.saju-summary-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-lg);
}

.saju-summary-card h3 {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.elements-chart {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.element-bar {
  margin-bottom: 15px;
}

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

.element-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  opacity: 0.9;
}

.element-bar .bar {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  height: 24px;
  overflow: hidden;
  margin-bottom: 4px;
}

.element-bar .fill {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease;
}

.element-value {
  font-size: 12px;
  opacity: 0.8;
}

.saju-analysis {
  font-size: 15px;
  line-height: 1.8;
  text-align: center;
  opacity: 0.95;
}

/* Name Candidates */
.name-candidates {
  margin-bottom: 30px;
}

.name-candidates h3 {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-primary);
}

.candidate-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.candidate-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.candidate-card[data-rank="1"] {
  border-color: #fbbf24;
  background: linear-gradient(to bottom, #fffbeb, white);
}

.candidate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.rank-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.candidate-card[data-rank="1"] .rank-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.match-score {
  color: var(--success);
  font-weight: 600;
  font-size: 14px;
}

.candidate-name {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 2px solid var(--border);
}

.candidate-name .korean {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.candidate-name .hanja {
  font-size: 24px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.candidate-name .romanization {
  font-size: 18px;
  color: var(--text-light);
}

.candidate-explanation h5 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.explanation-list {
  list-style: none;
  padding: 0;
}

.explanation-list li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.explanation-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

.select-candidate-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.select-candidate-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.back-to-input-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  margin: 30px auto 0;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-to-input-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fafbff;
}

/* Responsive for Professional Features */
@media (max-width: 768px) {
  .mode-options {
    grid-template-columns: 1fr;
  }

  .mode-selection-card {
    padding: 25px;
  }

  .mode-option {
    padding: 25px 15px;
  }

  .datetime-inputs {
    grid-template-columns: 1fr;
  }

  .meaning-options {
    grid-template-columns: 1fr;
  }

  .candidate-name .korean {
    font-size: 28px;
  }

  .candidate-name .hanja {
    font-size: 20px;
  }

  .saju-summary-card {
    padding: 20px;
  }
}

/* Info Icon Tooltip */
.info-icon {
  display: inline-block;
  margin-left: 6px;
  width: 16px;
  height: 16px;
  font-size: 13px;
  color: var(--primary);
  cursor: help;
  position: relative;
  vertical-align: middle;
  font-weight: bold;
}

.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: normal;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-width: 250px;
  white-space: normal;
  text-align: center;
}

.info-icon::before {
  content: '';
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

.info-icon:hover::after,
.info-icon:hover::before {
  opacity: 1;
}

@media (max-width: 768px) {
  .info-icon::after {
    max-width: 200px;
    font-size: 11px;
  }
}
