* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.intro-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  text-align: right;
  direction: rtl;
  text-justify:distribute-all-lines;
}

.intro-section h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-section p {
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #555;
}

.start-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.2em;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.quiz-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: none;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(102, 126, 234, 0.2);
  border-radius: 10px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 10px;
  transition: width 0.3s ease;
  width: 0%;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.question-counter {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
}

.explanation-btn {
  background: rgba(102, 126, 234, 0.1);
  border: 2px solid #667eea;
  color: #667eea;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.explanation-btn:hover {
  background: #667eea;
  color: white;
}

.question-title {
  font-size: 1.4em;
  margin-bottom: 40px;
  line-height: 1.5;
  color: #333;
}

.slider-container {
  margin: 40px 0;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 0.9em;
  color: #666;
}

.slider-wrapper {
  position: relative;
  margin: 20px 0;
}

.slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.slider-value {
  text-align: center;
  margin-top: 15px;
  font-size: 1.2em;
  font-weight: bold;
  color: #667eea;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8em;
  color: #999;
}

.buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-secondary {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

/* UPDATED RESULTS SECTION - RESTORED GLASSMORPHISM */
.results-container {
  display: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  max-width: 100%; /* Ensure it fits in screenshots */
}

.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-header h2 {
  font-size: 2.2em;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* UPDATED CATEGORY RESULTS - BIGGER CHARTS WITH ORIGINAL SHADOWS */
.category-result {
  display: flex;
  align-items: center;
  margin-bottom: 40px;     /* Increased margin for more space */
  padding: 30px;           /* Increased padding */
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  min-height: 350px;       /* Ensure minimum height for larger charts */
}

/* UPDATED CHART CONTAINER - MUCH BIGGER */
.chart-container {
  width: 300px;   /* Increased from 200px */
  height: 300px;  /* Increased from 200px */
  margin-left: 20px;
  flex-shrink: 0; /* Prevent shrinking */
}

/* UPDATED RECOMMENDATION SECTION */
.recommendation {
  flex: 1;
  text-align: right;
  padding-right: 30px;     /* More padding for balance */
}

/* NEW: Clickable recommendation styling */
.recommendation-link {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 10px;
  padding: 15px;
  margin: -15px; /* Negative margin to maintain spacing */
}

.recommendation-link:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.recommendation-link:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* BETTER IMAGE RENDERING */
.figure-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #667eea;
  margin-bottom: 15px;
  /* Ensure images are crisp in screenshots */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* BETTER TEXT RENDERING FOR SCREENSHOTS */
.figure-name {
  font-size: 1.5em;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
  /* Better text rendering */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.figure-bio {
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
  /* Better text rendering */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.category-title {
  font-size: 1.2em;
  color: #667eea;
  font-weight: bold;
  margin-bottom: 15px;
  /* Better text rendering */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Ensure charts don't overflow */
.chart-container canvas {
  max-width: 100%;
  max-height: 100%;
}

.explanation-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.explanation-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  text-align: right;
}

.explanation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #999;
}

.close-btn:hover {
  color: #333;
}

.share-section {
  background: rgba(255, 255, 255, 0.9);
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 30px;
  text-align: center;
}

.share-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}

.share-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #667eea;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.8);
  color: #333;
}

.share-input:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

/* NEW: Intro Page Accordion Styling */
.intro-accordion-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  margin: 25px 0;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.intro-accordion-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.intro-accordion-header:hover {
  background: linear-gradient(135deg, #5a6fd8, #6b42a0);
  transform: translateY(-1px);
}

.intro-accordion-header h3 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.intro-accordion-arrow {
  font-size: 1.1em;
  transition: transform 0.3s ease;
  display: inline-block;
}

.intro-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: rgba(255, 255, 255, 0.95);
}

.intro-accordion-inner {
  padding: 25px;
}

.intro-accordion-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.intro-accordion-section:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.intro-accordion-section h4 {
  color: #667eea;
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-accordion-section h4:before {
  content: "▶";
  font-size: 0.8em;
  color: #764ba2;
}

.intro-accordion-section p {
  color: #555;
  line-height: 1.6;
  margin: 0;
  font-size: 1em;
}

.intro-accordion-section ul {
  color: #555;
  line-height: 1.6;
  margin: 10px 0;
  padding-right: 20px;
}

.intro-accordion-section li {
  margin-bottom: 5px;
}

/* Responsive design for intro accordion */
@media (max-width: 768px) {
  .intro-accordion-header {
    padding: 15px 20px;
  }
  
  .intro-accordion-header h3 {
    font-size: 1.1em;
  }
  
  .intro-accordion-inner {
    padding: 20px;
  }
  
  .intro-accordion-section h4 {
    font-size: 1em;
  }
  
  .intro-accordion-section p {
    font-size: 0.95em;
  }
}

/* NEW: Axis Accordion Styling */
.axis-accordion-section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  margin-bottom: 30px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.accordion-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 20px 30px;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header:hover {
  background: linear-gradient(135deg, #5a6fd8, #6b42a0);
}

.accordion-header h3 {
  margin: 0;
  font-size: 1.3em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 15px;
}

.accordion-arrow {
  font-size: 1.2em;
  transition: transform 0.3s ease;
  display: inline-block;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(255, 255, 255, 0.95);
}

.accordion-inner {
  padding: 25px 30px;
}

.axis-category {
  margin-bottom: 25px;
}

.axis-category:last-child {
  margin-bottom: 0;
}

.axis-category h4 {
  color: #667eea;
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.axis-list {
  display: grid;
  gap: 10px;
}

.axis-item {
  padding: 12px 15px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px;
  border-right: 4px solid #667eea;
  line-height: 1.5;
  font-size: 0.95em;
}

.axis-item strong {
  color: #667eea;
  font-weight: 600;
}

/* Responsive design for accordion */
@media (max-width: 768px) {
  .accordion-header {
    padding: 15px 20px;
  }
  
  .accordion-header h3 {
    font-size: 1.1em;
  }
  
  .accordion-inner {
    padding: 20px;
  }
  
  .axis-item {
    padding: 10px 12px;
    font-size: 0.9em;
  }
}

.hidden {
  display: none;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .category-result {
    flex-direction: column;
    text-align: center;
    min-height: auto;
  }

  .chart-container {
    margin: 20px 0;
    width: 280px;            /* Slightly smaller on mobile but still bigger than before */
    height: 280px;
  }

  .recommendation {
    text-align: center;
    padding-right: 0;
  }

  .question-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .share-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .share-buttons button {
    width: 200px;
  }
}

/* PRINT/SCREENSHOT OPTIMIZATIONS - PRESERVE SHADOWS BUT LIGHTEN FOR SCREENSHOTS */
@media print, screen and (-webkit-min-device-pixel-ratio: 2) {
  /* Keep the glassmorphism but make it more screenshot-friendly */
  .results-container {
    background: rgba(255, 255, 255, 0.98) !important; /* Slightly more opaque */
    backdrop-filter: blur(10px) !important; /* Keep the blur */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important; /* Lighter shadow */
  }
  
  .category-result {
    background: rgba(255, 255, 255, 0.85) !important; /* Keep some transparency */
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08) !important; /* Lighter but visible shadow */
  }
}