:root {
  --background: oklch(8% .012 20);
  --foreground: oklch(97% .02 60);
  --card: oklch(17% .022 22);
  --card-foreground: oklch(97% .02 60);
  --popover: oklch(11% .015 22);
  --popover-foreground: oklch(97% .02 60);
  --primary: oklch(78% .17 75);
  --primary-foreground: oklch(8% .01 20);
  --secondary: oklch(22% .05 22);
  --secondary-foreground: oklch(95% .03 60);
  --muted: oklch(18% .025 22);
  --muted-foreground: oklch(68% .05 55);
  --accent: oklch(42% .2 22);
  --accent-foreground: oklch(98% .02 60);
  --destructive: oklch(55% .22 25);
  --destructive-foreground: oklch(98.5% 0 0);
  --border: oklch(32% .06 30);
  --input: oklch(24% .035 25);
  --ring: oklch(78% .17 75);
  --gold: oklch(82% .17 78);
  --gold-light: oklch(90% .14 80);
  --gold-dim: oklch(62% .12 72);
  --crimson: oklch(42% .2 22);
  --crimson-light: oklch(55% .2 25);
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Noto Serif TC', 'Songti SC', serif;
  --font-display: 'Cinzel', 'Noto Serif TC', serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1rem 0;
  background: oklch(8% .012 20 / .8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--foreground);
}

.logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--primary));
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-foreground);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color .15s ease;
}

.nav-links a:hover {
  color: var(--foreground);
}

.nav-login {
  color: var(--foreground) !important;
}

.nav-register {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--primary-foreground) !important;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-register:hover {
  background: var(--gold-light);
}

.lang-switcher {
  display: flex;
  gap: 0.375rem;
}

.lang-btn {
  padding: 0.375rem 0.625rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .75rem;
  font-weight: 600;
  transition: all .15s ease;
}

.lang-btn:hover,
.lang-btn.active {
  background: oklch(78% .17 75 / .12);
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--foreground);
  border-radius: 2px;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 0 5rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
}

.hero-glow-1 {
  width: 50vw;
  height: 50vw;
  top: -10vw;
  right: -10vw;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.hero-glow-2 {
  width: 40vw;
  height: 40vw;
  bottom: -10vw;
  left: -10vw;
  background: radial-gradient(circle, var(--crimson) 0%, transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(oklch(100% 0 0 / .03) 1px, transparent 1px),
    linear-gradient(90deg, oklch(100% 0 0 / .03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: oklch(78% .17 75 / .1);
  border: 1px solid oklch(78% .17 75 / .25);
  border-radius: 100px;
  color: var(--primary);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  margin-bottom: 2rem;
  animation: palace-pulse 4s ease-in-out infinite;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.hero-title-main,
.hero-title-sub {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  letter-spacing: .3em;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.hero-description {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--muted-foreground);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  white-space: pre-line;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 10px 30px -10px oklch(78% .17 75 / .35);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 15px 40px -10px oklch(78% .17 75 / .45);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: oklch(30% .05 22);
  border-color: oklch(40% .06 30);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem;
  font-size: 1rem;
}

.form-section {
  padding: 4rem 0;
}

.form-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px oklch(0% 0 0 / .5);
  overflow: hidden;
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--foreground);
}

.chart-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.form-group label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: .03em;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.label-optional {
  color: var(--muted-foreground);
  font-weight: 400;
  text-transform: none;
}

.form-group input,
.form-group select {
  width: 100%;
  min-width: 0;
  padding: 0.75rem 0.75rem;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: .9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-group input::placeholder {
  color: var(--muted-foreground);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px oklch(78% .17 75 / .2);
}

.radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: .9rem;
  cursor: pointer;
  transition: all .15s ease;
}

.radio-label:hover {
  border-color: var(--primary);
}

.radio-label input[type="radio"] {
  accent-color: var(--primary);
}

.form-hint {
  margin-top: 1.5rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: .85rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.features {
  padding: 5rem 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all .3s ease;
}

.feature-card:hover {
  border-color: oklch(78% .17 75 / .35);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px oklch(0% 0 0 / .4);
}

.feature-card-primary {
  border-color: oklch(78% .17 75 / .4);
  background: linear-gradient(180deg, var(--card) 0%, oklch(78% .17 75 / .08) 100%);
  animation: border-shimmer 3s ease-in-out infinite;
}

.feature-number {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.feature-subtitle {
  font-family: var(--font-serif);
  font-size: .9rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.feature-desc {
  font-size: .9rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  font-family: var(--font-serif);
}

.crystals {
  padding: 5rem 0;
  background: linear-gradient(180deg, transparent 0%, oklch(18% .025 22 / .6) 50%, transparent 100%);
}

.crystal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.crystal-card {
  padding: 2.5rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all .3s ease;
}

.crystal-card:hover {
  border-color: oklch(78% .17 75 / .35);
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -15px oklch(0% 0 0 / .45);
}

.crystal-card-primary {
  border-color: oklch(78% .17 75 / .4);
  background: linear-gradient(180deg, var(--card) 0%, oklch(78% .17 75 / .08) 100%);
}

.crystal-image {
  width: 220px;
  height: 220px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: inset 0 0 40px oklch(0% 0 0 / .35);
}

.crystal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.crystal-card:hover .crystal-image img {
  transform: scale(1.06);
}

.crystal-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.crystal-desc {
  font-family: var(--font-serif);
  font-size: .9rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--foreground);
}

.archetypes {
  padding: 5rem 0;
  background: linear-gradient(180deg, transparent 0%, oklch(42% .2 22 / .06) 50%, transparent 100%);
}

.archetype-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.archetype-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  text-align: center;
  transition: all .3s ease;
}

.archetype-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px oklch(0% 0 0 / .4);
}

.archetype-seeker {
  border-color: oklch(70% .165 254 / .35);
  background: linear-gradient(180deg, var(--card) 0%, oklch(70% .165 254 / .08) 100%);
}

.archetype-strategist {
  border-color: oklch(78% .17 75 / .4);
  background: linear-gradient(180deg, var(--card) 0%, oklch(78% .17 75 / .1) 100%);
}

.archetype-archon {
  border-color: oklch(82% .189 84 / .4);
  background: linear-gradient(180deg, var(--card) 0%, oklch(82% .189 84 / .08) 100%);
}

.archetype-tier {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
  letter-spacing: .05em;
}

.archetype-tagline {
  font-family: var(--font-serif);
  font-size: .95rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.quotes {
  padding: 5rem 0;
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.quote-card {
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all .3s ease;
}

.quote-card:hover {
  border-color: oklch(78% .17 75 / .3);
}

.quote-card-primary {
  border-color: oklch(78% .17 75 / .4);
  background: linear-gradient(180deg, var(--card) 0%, oklch(78% .17 75 / .08) 100%);
}

.quote-zh {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--foreground);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.quote-card cite {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-style: normal;
  color: var(--muted-foreground);
  letter-spacing: .05em;
}

.habit-section {
  padding: 5rem 0;
}

.habit-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.habit-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.habit-subtitle {
  font-family: var(--font-serif);
  color: var(--muted-foreground);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto;
}

.map-section {
  padding: 5rem 0;
  background: linear-gradient(180deg, transparent 0%, oklch(42% .2 22 / .05) 50%, transparent 100%);
}

.map-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.map-card p {
  font-family: var(--font-serif);
  color: var(--muted-foreground);
  line-height: 1.9;
  font-size: 1.1rem;
}

.jewelry-section {
  padding: 5rem 0;
}

.jewelry-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.jewelry-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pendant-placeholder {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, oklch(78% .17 75 / .2) 0%, transparent 70%);
  border: 2px solid oklch(78% .17 75 / .3);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--primary);
  animation: palace-pulse 4s ease-in-out infinite;
}

.jewelry-content p {
  font-family: var(--font-serif);
  color: var(--muted-foreground);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.cta-section {
  padding: 5rem 0;
}

.cta-card {
  text-align: center;
  padding: 4rem 2rem;
  background:
    radial-gradient(ellipse at top right, oklch(78% .17 75 / .12), transparent 50%),
    radial-gradient(ellipse at bottom left, oklch(42% .2 22 / .1), transparent 50%),
    var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.cta-card p {
  font-family: var(--font-serif);
  color: var(--muted-foreground);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.brand-section {
  padding: 5rem 0;
  text-align: center;
}

.brand-desc {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-serif);
  color: var(--muted-foreground);
  line-height: 1.9;
  font-size: 1.05rem;
}

.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
  background: oklch(8% .012 20);
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.footer-framework {
  font-family: var(--font-display);
  font-size: .75rem;
  letter-spacing: .15em;
  color: var(--muted-foreground);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: .875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color .15s ease;
}

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

.footer-copyright {
  font-size: .8rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
}

@keyframes palace-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .65; }
}

@keyframes border-shimmer {
  0% { border-color: oklch(78% .17 75 / .25); }
  50% { border-color: oklch(78% .17 75 / .85); }
  100% { border-color: oklch(78% .17 75 / .25); }
}

@media (max-width: 1024px) {
  .feature-grid,
  .quotes-grid,
  .archetype-grid,
  .crystal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-card {
    padding: 1.75rem;
  }

  .form-row {
    gap: 0.75rem;
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--background);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .jewelry-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .feature-grid,
  .quotes-grid,
  .archetype-grid,
  .crystal-grid {
    grid-template-columns: 1fr;
  }

  .chart-form {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .lang-switcher {
    display: none;
  }

  .hero-title-main,
  .hero-title-sub {
    font-size: 3rem;
  }
}
