/* Main CSS for Marx Educational Tool */
:root {
  /* Bauhaus-inspired color palette */
  --primary-color: #E53935;
  --secondary-color: #1E88E5;
  --tertiary-color: #FFC107;
  --background-color: #FAFAFA;
  --text-color: #212121;
  --light-gray: #EEEEEE;
  --dark-gray: #757575;
  --accent-color: #4CAF50;
  
  /* Typography */
  --font-family: 'Helvetica Neue', Arial, sans-serif;
  --heading-font-weight: 700;
  --body-font-weight: 400;
}

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

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  padding: 0;
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

/* Header styles */
.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: var(--heading-font-weight);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.header p {
  font-size: 1.2rem;
  color: var(--dark-gray);
}

/* Module selection */
.module-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.module-tab {
  padding: 0.75rem 1.5rem;
  background-color: var(--light-gray);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.module-tab:hover {
  background-color: var(--dark-gray);
  color: white;
}

.module-tab.active {
  background-color: var(--primary-color);
  color: white;
}

/* Module content */
.module-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.module-content.active {
  display: block;
}

.module-intro {
  margin-bottom: 2rem;
}

.module-intro h2 {
  font-size: 2rem;
  font-weight: var(--heading-font-weight);
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.module-intro p {
  font-size: 1.1rem;
  max-width: 800px;
}

/* Visualization container */
.visualization-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.visualization-main {
  flex: 1 1 65%;
  min-width: 300px;
}

.visualization-controls {
  flex: 1 1 30%;
  min-width: 250px;
  background-color: var(--light-gray);
  padding: 1.5rem;
  border-radius: 8px;
}

.visualization-controls h3 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  color: var(--primary-color);
}

/* Chart container */
.chart-container {
  width: 100%;
  height: 400px;
  margin-bottom: 1rem;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
}

/* Controls */
.control-group {
  margin-bottom: 1.5rem;
}

.control-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

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

.slider {
  width: 100%;
  cursor: pointer;
}

.slider-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--dark-gray);
}

.value-display {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--secondary-color);
  margin-top: 0.5rem;
}

/* Toggle buttons */
.toggle-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  background-color: var(--light-gray);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-btn:hover {
  background-color: var(--dark-gray);
  color: white;
}

.toggle-btn.active {
  background-color: var(--secondary-color);
  color: white;
}

/* Tooltips */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted var(--dark-gray);
  cursor: help;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--text-color);
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 0.5rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Summary panel */
.summary-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--light-gray);
  border-radius: 8px;
}

.summary-panel h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.summary-panel p {
  margin-bottom: 0.5rem;
}

.summary-panel .highlight {
  font-weight: 500;
  color: var(--secondary-color);
}

/* Real-life examples button */
.real-life-btn {
  display: block;
  margin: 2rem auto;
  padding: 0.75rem 1.5rem;
  background-color: var(--tertiary-color);
  color: var(--text-color);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.real-life-btn:hover {
  background-color: #FFB300;
  transform: translateY(-2px);
}

/* Real-life examples panel */
.real-life-panel {
  display: none;
  margin-top: 1rem;
  padding: 1.5rem;
  background-color: #FFF8E1;
  border-left: 4px solid var(--tertiary-color);
  border-radius: 0 8px 8px 0;
}

.real-life-panel.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.real-life-panel h4 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

/* Currency toggle */
.currency-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.currency-btn {
  padding: 0.5rem;
  background-color: var(--light-gray);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.currency-btn:hover {
  background-color: var(--dark-gray);
  color: white;
}

.currency-btn.active {
  background-color: var(--secondary-color);
  color: white;
}

/* Bauhaus decorative elements */
.bauhaus-circle {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: var(--primary-color);
  opacity: 0.1;
  top: 20px;
  right: 10%;
  z-index: -1;
}

.bauhaus-square {
  position: absolute;
  width: 80px;
  height: 80px;
  background-color: var(--secondary-color);
  opacity: 0.1;
  bottom: 10%;
  left: 5%;
  z-index: -1;
  transform: rotate(15deg);
}

.bauhaus-triangle {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 120px solid var(--tertiary-color);
  opacity: 0.1;
  bottom: 15%;
  right: 8%;
  z-index: -1;
}

/* Source citation */
.source-citation {
  font-size: 0.8rem;
  color: var(--dark-gray);
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.source-citation a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.2s;
}

.source-citation a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .visualization-container {
    flex-direction: column;
  }
  
  .chart-container {
    height: 300px;
  }
  
  .module-tab {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}
