/* استایل‌های پایه */
#hearing-test-container {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.step {
  display: none;
}

.step.active {
  display: block;
}

/* فرم اطلاعات کاربر */
#user-info-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: 600;
}

.form-group input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

/* انتخاب گوش */
.ear-selection {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.ear-btn {
  padding: 15px 30px;
  font-size: 18px;
  background: #4285f4;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ear-btn:hover {
  background: #3367d6;
}

.ear-btn.tested {
  background: #34a853;
}

/* اسلایدر دسیبل */
.slider-container {
  margin: 40px 0;
}

.db-slider {
  margin: 20px 0;
}

.ui-slider-handle {
  width: 24px;
  height: 24px;
  top: -6px;
  border-radius: 50%;
  background: #ea4335;
  border: 2px solid #fff;
  cursor: pointer;
}

.slider-values {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: #666;
}

/* نتایج */
.results-summary {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.ear-results {
  margin-top: 20px;
}

.ear-results h4 {
  margin-bottom: 5px;
  color: #4285f4;
}

.ear-results pre {
  background: #fff;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #eee;
  overflow-x: auto;
}

/* دکمه‌ها */
.btn {
  padding: 12px 24px;
  background: #4285f4;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover {
  background: #3367d6;
}

.frequency-next {
  margin-top: 20px;
}

#submit-results {
  background: #34a853;
  margin-top: 20px;
}

#submit-results:hover {
  background: #2d9248;
}


/* حالت گوش‌های تست شده */
.ear-btn.completed {
  background: #34a853;
  opacity: 0.7;
  cursor: not-allowed;
}

/* نمایشگر پیشرفت */
.test-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 4px;
}

/* نتایج نهایی */
.results {
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.ear-results {
  margin-top: 20px;
}


/* استایل‌های اُسیلاتور */
.hearing-oscillator {
  display: flex;
  gap: 30px;
  margin: 40px 0;
}

.ear-oscillator {
  flex: 1;
  text-align: center;
}

.oscillator-bar {
  height: 30px;
  border-radius: 15px;
  background: linear-gradient(90deg, 
    #ff4444 0%,    /* قرمز */
    #ffa500 50%,   /* نارنجی */
    #00c851 100%   /* سبز */
  );
  position: relative;
  overflow: hidden;
}

.oscillator-bar::after {
  content: '';
  position: absolute;
  left: var(--progress);
  top: 0;
  bottom: 0;
  width: 4px;
  background: #2d3436;
  transform: translateX(-50%);
}

.diagnosis-message {
  font-size: 20px;
  margin: 20px 0;
  padding: 15px;
  border-radius: 8px;
  background: #f8f9fa;
}

/* رنگ‌های متناسب با تشخیص */
.diagnosis-message.severe { color: #ff4444; border: 2px solid #ff4444; }
.diagnosis-message.moderate { color: #ffa500; border: 2px solid #ffa500; }
.diagnosis-message.normal { color: #00c851; border: 2px solid #00c851; }

/* مخفی کردن مقدار dB */
.oscillator-bar::after {
  display: none;
}


.oscillator-charts {
  display: flex;
  gap: 30px;
  margin: 40px 0;
}

.ear-chart {
  flex: 1;
  text-align: center;
}

.oscillator-bar {
  height: 30px;
  background: linear-gradient(to right, 
    #ff4444 0%, 
    #ffbb33 50%, 
    #00C851 100%);
  border-radius: 15px;
  position: relative;
}

.oscillator-bar::after {
  content: '';
  position: absolute;
  left: var(--progress, 50%);
  top: -5px;
  bottom: -5px;
  width: 4px;
  background: #2d3436;
  transform: translateX(-50%);
}

/* پیام تشخیصی */
.diagnosis-message {
  font-size: 1.2em;
  padding: 15px;
  margin: 20px 0;
  border-radius: 8px;
  text-align: center;
}

.diagnosis-message.severe {
  background: #ffebee;
  color: #c62828;
}

.diagnosis-message.moderate {
  background: #fff8e1;
  color: #f57f17;
}

.diagnosis-message.normal {
  background: #e8f5e9;
  color: #2e7d32;
}
