.listening-bar {
  background: var(--card-bg, #13131e);
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.section-tabs-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  max-width: 100%;
}

.section-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-sub, #94a3b8);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.audio-player-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.q-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.q-num-btn {
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.q-num-btn:hover {
  border-color: #60a5fa;
  color: #fff;
}

.q-num-btn.answered {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.q-num-btn.current {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.25);
  color: #fff;
}

.q-card-box {
  background: var(--card-bg, #13131e);
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.instructions-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.4;
}

.question-stem {
  font-size: 1.15rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.6;
  margin-bottom: 22px;
}

.blank-highlight {
  display: inline-block;
  min-width: 70px;
  border-bottom: 2px solid #3b82f6;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 2px 8px;
  border-radius: 4px 4px 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  text-align: center;
  margin: 0 4px;
}

.input-text-answer {
  width: 100%;
  max-width: 420px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.05rem;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.input-text-answer:focus {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.mcq-option-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
  font-size: 0.98rem;
  color: #e2e8f0;
}

.mcq-option-label:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(96, 165, 250, 0.4);
}

.mcq-option-label input[type="radio"] {
  accent-color: #2563eb;
  transform: scale(1.2);
  flex-shrink: 0;
}

.audio-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 42px;
}

.audio-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

.audio-btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  box-shadow: none;
}

.audio-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.speed-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 40px;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .listening-bar {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .audio-player-box {
    padding: 14px 16px;
  }

  .audio-controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .audio-controls-row > div {
    width: 100%;
    justify-content: space-between;
  }

  .q-matrix {
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 6px;
    padding: 12px;
  }

  .q-card-box {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .question-stem {
    font-size: 1.05rem;
    margin-bottom: 16px;
  }

  .input-text-answer {
    max-width: 100%;
    font-size: 0.98rem;
    padding: 12px 14px;
  }

  .mcq-option-label {
    padding: 12px 14px;
    font-size: 0.92rem;
  }
}

@media (max-width: 480px) {
  .section-tab {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .q-num-btn {
    height: 32px;
    font-size: 0.76rem;
  }
}
