@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Playfair+Display:ital,wght@1,400;1,600&display=swap');

:root {
  --tradition-color: #b08d57;
  --progress-color: #6d4aff;
  --transition-color: #9170d8;
  --bg-dark: #12121a;
  --bg-card: #1c1c28;
  --text-primary: #e8e8f0;
  --text-secondary: #9999b0;
}

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

body {
  background: var(--bg-dark);
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-image:
    radial-gradient(ellipse at top left, rgba(176, 141, 87, 0.06), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(109, 74, 255, 0.08), transparent 50%);
}

.container {
  max-width: 720px;
  width: 100%;
}

h1 {
  font-size: 1.85rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, var(--tradition-color), var(--progress-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}

.subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.tagline {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--progress-color);
  margin-bottom: 2.5rem;
}

/* ── Drift Selector Tabs ── */
.drift-selector {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.drift-tab {
  padding: 0.6rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid rgba(109, 74, 255, 0.2);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drift-tab:hover {
  border-color: rgba(109, 74, 255, 0.5);
  color: var(--text-primary);
}

.drift-tab.active {
  background: linear-gradient(135deg, rgba(109, 74, 255, 0.2), rgba(176, 141, 87, 0.15));
  border-color: var(--progress-color);
  color: var(--progress-color);
  box-shadow: 0 0 16px rgba(109, 74, 255, 0.25);
}

/* ── Slider Wrapper ── */
.slider-wrapper {
  margin-bottom: 2rem;
}

.endpoint-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.label-left, .label-right {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.label-left { color: var(--tradition-color); }
.label-right { color: var(--progress-color); }

/* ── Track ── */
.slider-track-container {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
}

.slider-gradient-bar {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 10px;
  transform: translateY(-50%);
  border-radius: 5px;
  background: linear-gradient(90deg,
    var(--tradition-color) 0%,
    var(--transition-color) 50%,
    var(--progress-color) 100%
  );
  opacity: 0.25;
}

.slider-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 10px;
  transform: translateY(-50%);
  border-radius: 5px;
  background: linear-gradient(90deg,
    var(--tradition-color) 0%,
    var(--transition-color) 50%,
    var(--progress-color) 100%
  );
  transition: width 0.05s linear;
  width: 50%;
  box-shadow: 0 0 16px rgba(145, 112, 216, 0.3);
}

/* ── Range Input ── */
.custom-slider {
  position: relative;
  width: 100%;
  height: 44px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  z-index: 2;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #e0e0ff);
  border: 3px solid var(--progress-color);
  box-shadow: 0 2px 12px rgba(109, 74, 255, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 18px rgba(109, 74, 255, 0.7);
}

.custom-slider::-webkit-slider-thumb:active {
  transform: scale(0.95);
}

.custom-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #e0e0ff);
  border: 3px solid var(--progress-color);
  box-shadow: 0 2px 12px rgba(109, 74, 255, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.custom-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
}

.custom-slider:focus { outline: none; }

/* ── Ticks ── */
.scale-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0 4px;
}

.tick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  width: 20%;
  text-align: center;
}

.tick::before {
  content: '';
  width: 2px;
  height: 10px;
  background: var(--text-secondary);
  opacity: 0.3;
  border-radius: 1px;
}

.tick span {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.3;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
}

.tick.active span {
  color: var(--progress-color);
  opacity: 1;
  font-weight: 600;
}

/* ── Result Card ── */
.result-card {
  background: var(--bg-card);
  border: 1px solid rgba(109, 74, 255, 0.15);
  border-radius: 14px;
  padding: 1.8rem 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s ease;
}

.result-position {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--tradition-color), var(--progress-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.3rem;
}

.result-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.result-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
  transition: opacity 0.2s ease;
}

/* ── Philosophy Note ── */
.philosophy-note {
  text-align: center;
  padding: 1rem;
}

.philosophy-note p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: #ffffff; /* CHANGED TO WHITE */
  opacity: 1; /* FULL OPACITY */
  line-height: 1.6;
}

/* ── Fade animation ── */
.fade-update {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0.4; }
  to { opacity: 1; }
}