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

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  color: #4c4f69;
  background-color: #eff1f5;
  padding-bottom: 70px; /* Space for fixed nav bar */
  overflow: hidden; /* Disable scrolling */
  height: 100vh;
}

/* Global link styling */
a {
  color: #1e66f5; /* Catppuccin latte blue */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #7287fd; /* Catppuccin latte lavender */
}

/* Global strong styling */
strong {
  color: #8839ef; /* Catppuccin latte mauve */
  font-weight: 600;
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.8;
  font-weight: 300;
}

/* Main Container */
main {
  width: 100%;
}

/* Navigation */
.scene-navigation {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 2rem 1rem 2rem;
  background: rgba(239, 241, 245, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(172, 176, 190, 0.3);
  z-index: 1000;
}

.nav-buttons {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.6rem;
}

.scene-navigation button {
  background: rgba(30, 102, 245, 0.15);
  color: #1e66f5;
  border: 1px solid rgba(30, 102, 245, 0.3);
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(30, 102, 245, 0.2);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-navigation button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 102, 245, 0.4);
  background: rgba(30, 102, 245, 0.25);
  border-color: rgba(30, 102, 245, 0.5);
}

.scene-navigation button:disabled {
  background: rgba(156, 160, 176, 0.2);
  color: rgba(108, 111, 133, 0.5);
  border-color: rgba(156, 160, 176, 0.3);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Scene Dots */
.scene-dots {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(136, 57, 239, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.nav-dot.active {
  background: #8839ef;
  transform: scale(1.3);
  box-shadow: 0 2px 8px rgba(136, 57, 239, 0.5);
}

.nav-dot:hover:not(.active) {
  background: rgba(136, 57, 239, 0.6);
  transform: scale(1.1);
}

/* General Scene Styles */
.scene {
  display: none;
  background: #dce0e8;
  padding: 1.5rem;
  min-height: calc(100vh - 70px);
  animation: fadeIn 0.5s ease-in;
  box-sizing: border-box;
}

.scene.active {
  display: block;
}

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

/* ========================================
   SCENE 0 - PROJECT INTRODUCTION STYLES
   ======================================== */

#scene-0 h1 {
  color: #1e66f5; /* Catppuccin blue */
  font-size: 2rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
  text-align: center;
}

#scene-0 .subtitle {
  text-align: center;
  font-size: 1rem;
  color: #8c8fa1;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.project-overview {
  max-width: 1000px;
  margin: 0 auto;
}

.project-overview h2 {
  color: #1e66f5;
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.project-overview h3 {
  font-size: 1.2rem;
  margin: 1.2rem 0 0.8rem 0;
  font-weight: 600;
}

.project-overview ul {
  margin: 0.8rem 0 1.2rem 1.5rem;
}

.project-overview li {
  margin-bottom: 0.6rem;
  color: #6c6f85;
  font-size: 0.95rem;
}

.project-overview p {
  margin-bottom: 0.8rem;
  color: #6c6f85;
  line-height: 1.6;
  font-size: 0.95rem;
}

.project-overview a {
  color: #1e66f5; /* Catppuccin blue */
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.project-overview a:hover {
  color: #7287fd; /* Catppuccin lavender */
  border-bottom: 1px solid #1e66f5;
}

.project-overview strong {
  color: #8839ef; /* Catppuccin mauve */
  font-weight: 600;
}

.navigation-hint {
  background: #ccd0da; /* Catppuccin surface0 */
  color: #4c4f69; /* Catppuccin text */
  border: 1px solid #bcc0cc; /* Catppuccin surface1 */
  padding: 3rem;
  border-radius: 8px;
  /* margin-top: 1.5rem; */
  text-align: center;
}

.navigation-hint p {
  margin: 0;
  font-weight: 500;
}

/* ========================================
   GENERAL SCENE CONTENT STYLES
   ======================================== */

.scene-content h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: #4c4f69;
  border-bottom: 2px solid #1e66f5;
  padding-bottom: 0.4rem;
}

.scene-content p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: #6c6f85;
  line-height: 1.6;
}

/* Chart Container */
.chart-container {
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.8rem;
  width: 100%;
}

/* Tooltip Styles */
.tooltip {
  position: absolute;
  text-align: center;
  padding: 12px;
  background: rgba(239, 241, 245, 0.95);
  color: #4c4f69;
  border: 1px solid #bcc0cc;
  border-radius: 8px;
  pointer-events: none;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(76, 79, 105, 0.2);
  z-index: 1000;
}

/* SVG Styles */
svg {
  border-radius: 8px;
}

.axis text {
  font-size: 12px;
  fill: #6c6f85;
}

.axis line,
.axis path {
  stroke: #9ca0b0;
  shape-rendering: crispEdges;
}

/* Bar Chart Styles */
.bar {
  transition: fill 0.3s ease;
}

.bar:hover {
  fill: #8839ef !important; /* Catppuccin latte mauve */
}

/* Scatter Plot Styles */
.chart-dot {
  transition: all 0.3s ease;
}

.chart-dot:hover {
  stroke: #4c4f69;
  stroke-width: 2px;
  r: 7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .subtitle {
    font-size: 1rem;
  }

  .scene-navigation {
    padding: 0.6rem 1rem 0.8rem 1rem;
  }

  .nav-buttons {
    gap: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .scene-navigation button {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .scene-dots {
    gap: 0.5rem;
  }

  .nav-dot {
    width: 7px;
    height: 7px;
  }

  .scene {
    padding: 1rem;
    min-height: calc(100vh - 60px);
  }

  .scene-content h2 {
    font-size: 1.4rem;
  }

  body {
    padding-bottom: 60px;
  }

  /* Scene 0 Responsive Styles */
  #scene-0 h1 {
    font-size: 1.7rem;
  }
}

/* Error Message Styling */
.error-message {
  background: rgba(210, 15, 57, 0.15);
  border: 1px solid rgba(210, 15, 57, 0.4);
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
  color: #d20f39;
  text-align: center;
  box-shadow: 0 2px 10px rgba(76, 79, 105, 0.1);
}

.error-message h3 {
  margin-bottom: 10px;
}

.error-message p {
  margin-bottom: 10px;
}

.error-message code {
  background: #ccd0da;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  color: #4c4f69;
}

/* Compensation Scene Layout */
.compensation-layout {
  display: flex;
  gap: 2rem;
  height: calc(100vh - 140px);
  padding: 2rem;
  overflow: hidden;
  align-items: stretch;
}

.compensation-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.compensation-main h2 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.compensation-main .chart-container {
  flex: 1;
  min-height: auto;
  margin-top: 0;
}

.compensation-sidebar {
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  padding-right: 1rem;
}

/* Filters Panel */
.filters-panel {
  background: rgba(
    204,
    208,
    218,
    0.3
  ); /* Catppuccin latte surface0 with transparency */
  border: 1px solid #bcc0cc; /* Catppuccin surface1 */
  border-radius: 12px;
  padding: 0.5rem;
}

.filters-panel h3 {
  margin: 0 0 0.8rem 0;
  color: #4c4f69; /* Catppuccin text */
  font-size: 1.1rem;
  font-weight: 600;
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-group:last-child {
  margin-bottom: 0.8rem;
}

.filter-group > label {
  display: block;
  margin-bottom: 0.5rem;
  color: #4c4f69; /* Catppuccin text */
  font-weight: 500;
  font-size: 0.9rem;
}

/* Slider Styles */
.slider-container,
.range-slider-container {
  position: relative;
}

.slider-container input[type="range"],
.range-slider-container input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #bcc0cc; /* Catppuccin surface1 */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 0.5rem;
}

.slider-container input[type="range"]::-webkit-slider-thumb,
.range-slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1e66f5; /* Catppuccin blue */
  cursor: pointer;
  border: 2px solid #eff1f5; /* Catppuccin base */
  box-shadow: 0 2px 4px rgba(76, 79, 105, 0.1);
}

.slider-container input[type="range"]::-moz-range-thumb,
.range-slider-container input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1e66f5; /* Catppuccin blue */
  cursor: pointer;
  border: 2px solid #eff1f5; /* Catppuccin base */
  box-shadow: 0 2px 4px rgba(76, 79, 105, 0.1);
}

/* Dual Range Slider Styles */
.dual-range-container {
  position: relative;
  margin-bottom: 0.5rem;
  height: 24px;
}

.dual-range-container input[type="range"] {
  position: absolute;
  width: 100%;
  height: 20px; /* Increase hit area for better clickability */
  border-radius: 3px;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto; /* Enable pointer events on the entire input */
  margin: 0;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.dual-range-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1e66f5; /* Catppuccin blue - same as other sliders */
  cursor: pointer;
  border: 2px solid #eff1f5; /* Catppuccin base */
  box-shadow: 0 2px 4px rgba(76, 79, 105, 0.1);
  pointer-events: auto;
  position: relative;
  z-index: 10;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dual-range-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(30, 102, 245, 0.4);
}

.dual-range-container input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1e66f5; /* Catppuccin blue - same as other sliders */
  cursor: pointer;
  border: 2px solid #eff1f5; /* Catppuccin base */
  box-shadow: 0 2px 4px rgba(76, 79, 105, 0.1);
  pointer-events: auto;
  position: relative;
  z-index: 10;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dual-range-container input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(30, 102, 245, 0.4);
}

.dual-range-container .dual-range-min {
  z-index: 10;
}

.dual-range-container .dual-range-max {
  z-index: 11;
}

/* Track styling for dual range */
.dual-range-container::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  height: 6px;
  background: #bcc0cc; /* Catppuccin surface1 */
  border-radius: 3px;
  z-index: 1;
  pointer-events: none;
}

/* Active range highlight for experience (will be updated by JavaScript) */
#experience-range-container::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  background: #1e66f5; /* Catppuccin blue */
  border-radius: 3px;
  z-index: 2;
  left: 0%;
  right: 0%;
  transition: all 0.1s ease;
  pointer-events: none;
}

/* Active range highlight for compensation (will be updated by JavaScript) */
#compensation-range-container::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  background: #1e66f5; /* Catppuccin blue */
  border-radius: 3px;
  z-index: 2;
  left: 0%;
  right: 100%;
  transition: all 0.1s ease;
  pointer-events: none;
}

.slider-value,
.range-values {
  color: #6c6f85; /* Catppuccin subtext0 */
  font-size: 0.8rem;
  text-align: center;
  margin-top: 0.2rem;
}

.range-slider-container {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.range-values {
  display: flex;
  justify-content: space-between;
  padding: 0 0.2rem;
}

/* Checkbox Styles */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: #1e66f5; /* Catppuccin blue */
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.checkbox-label span {
  color: #4c4f69; /* Catppuccin text */
  flex: 1;
}

.checkbox-label:hover span {
  color: #7287fd; /* Catppuccin lavender */
}

/* Reset Button */
.reset-button {
  width: 100%;
  background: rgba(
    4,
    165,
    229,
    0.15
  ); /* Catppuccin latte sky with transparency */
  color: #04a5e5; /* Catppuccin latte sky */
  border: 1px solid rgba(4, 165, 229, 0.3);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
  margin-top: 0.6rem;
}

.reset-button:hover {
  background: rgba(4, 165, 229, 0.25);
  border-color: rgba(4, 165, 229, 0.5);
  transform: translateY(-1px);
}

.reset-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Info Boxes */
.info-boxes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-box {
  background: rgba(
    204,
    208,
    218,
    0.4
  ); /* Catppuccin latte surface0 with transparency */
  border: 1px solid #bcc0cc; /* Catppuccin surface1 */
  border-radius: 10px;
  padding: 1.2rem;
}

.info-box h4 {
  margin: 0 0 0.8rem 0;
  color: #4c4f69; /* Catppuccin text */
  font-size: 1rem;
  font-weight: 600;
}

.info-box p {
  margin: 0;
  color: #6c6f85; /* Catppuccin subtext0 */
  font-size: 0.85rem;
  line-height: 1.5;
}

.info-box.high-earners {
  border-left: 4px solid #1e66f5; /* Catppuccin blue */
}

.info-box.entry-level {
  border-left: 4px solid #40a02b; /* Catppuccin green */
}

/* AI Adoption Layout (Scene 3) */
.ai-layout {
  display: flex;
  height: calc(100vh - 140px);
  gap: 2rem;
  padding: 2rem;
  overflow: hidden;
}

.ai-main {
  flex: 1;
  min-height: auto;
  margin-top: 0;
}

.ai-sidebar {
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  padding-right: 1rem;
}

.ai-stats-panel {
  background: rgba(204, 208, 218, 0.3);
  border: 1px solid #bcc0cc;
  border-radius: 12px;
  padding: 1.5rem;
}

.ai-stats-panel h3 {
  margin: 0 0 1rem 0;
  color: #4c4f69;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.info-box.ai-yes {
  border-left: 4px solid #40a02b; /* Green for Yes */
}

.info-box.ai-no {
  border-left: 4px solid #d20f39; /* Red for No */
}

/* Language AI Layout (Scene 4) */
.language-ai-layout {
  display: flex;
  height: calc(100vh - 140px);
  gap: 2rem;
  padding: 2rem;
  overflow: hidden;
}

.language-ai-main {
  flex: 1;
  min-height: auto;
  margin-top: 0;
}

.language-ai-sidebar {
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  padding-right: 1rem;
}

.language-stats-panel {
  background: rgba(204, 208, 218, 0.3);
  border: 1px solid #bcc0cc;
  border-radius: 12px;
  padding: 1.5rem;
}

.language-stats-panel h3 {
  margin: 0 0 1rem 0;
  color: #4c4f69;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(188, 192, 204, 0.3);
}

.stat-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.stat-label {
  font-size: 12px;
  color: #6c6f85;
  font-weight: 500;
}

.stat-value {
  font-size: 14px;
  color: #4c4f69;
  font-weight: 600;
}

.info-box.language-high-adoption {
  border-left: 4px solid #40a02b; /* Green for high adoption */
}

.info-box.language-low-adoption {
  border-left: 4px solid #d20f39; /* Orange for lower adoption */
}

/* Responsive Design */
@media (max-width: 1200px) {
  .compensation-layout {
    flex-direction: column;
    height: auto;
    gap: 1.5rem;
  }

  .compensation-sidebar {
    width: 100%;
    flex-direction: row;
    gap: 1.5rem;
    overflow-x: auto;
    padding-right: 0;
  }

  .filters-panel {
    min-width: 280px;
    flex-shrink: 0;
  }

  .info-boxes {
    min-width: 300px;
    flex-shrink: 0;
  }

  .ai-layout {
    flex-direction: column;
    height: auto;
    gap: 1.5rem;
  }

  .ai-sidebar {
    width: 100%;
    flex-direction: row;
    gap: 1.5rem;
    overflow-x: auto;
    padding-right: 0;
  }

  .ai-stats-panel {
    min-width: 280px;
    flex-shrink: 0;
  }

  .language-ai-layout {
    flex-direction: column;
    height: auto;
    gap: 1.5rem;
  }

  .language-ai-sidebar {
    width: 100%;
    flex-direction: row;
    gap: 1.5rem;
    overflow-x: auto;
    padding-right: 0;
  }

  .language-stats-panel {
    min-width: 280px;
    flex-shrink: 0;
  }
}
