/* جلوگیری از تداخل با استایل‌های وردپرس */
.wp-iq-container {
  max-width: 800px;
  margin: 20px auto;
  direction: rtl;
}

.wp-iq-header {
  padding: 25px;
  border-radius: 20px;
  margin-bottom: 30px;
  text-align: center;
  color: #fff;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.wp-iq-header h4 {
  margin: 0;
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 2;
}

.wp-iq-quiz-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 25px;
  padding: 30px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.wp-iq-quiz-container {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
}

.wp-iq-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 20px;
}

.wp-iq-details div {
  background: #f8f9fa;
  padding: 8px 18px;
  border-radius: 50px;
  border: 1px solid #e9ecef;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a4a4a;
}

.wp-iq-details span {
  color: #667eea;
  font-weight: 900;
}

.wp-iq-question {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #dee2e6;
}

.wp-iq-question h1 {
  font-size: 1.15rem;
  color: #2d3436;
  text-align: center;
  line-height: 1.8;
  font-weight: 700;
  margin: 0;
}

.wp-iq-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 25px;
}

.wp-iq-option {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  background: white;
}

.wp-iq-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.wp-iq-option input[type="radio"] {
  display: none;
}

.wp-iq-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  cursor: pointer;
  font-weight: 600;
  color: #2d3436;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  text-align: center;
  min-height: 50px;
  width: 100%;
  margin: 0;
}

.wp-iq-option label:hover {
  background: #f0f3ff;
  color: #667eea;
}

.wp-iq-option input[type="radio"]:checked + label {
  background: #667eea !important;
  color: white !important;
}

.wp-iq-next-button {
  text-align: center;
  margin-top: 10px;
}

.wp-iq-next-button button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 45px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
  font-family: inherit;
}

.wp-iq-next-button button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* مودال‌ها */
.wp-iq-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  animation: wp_iq_fadeIn 0.5s ease;
}

.wp-iq-modal-content {
  background: white;
  border-radius: 25px;
  padding: 40px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  animation: wp_iq_slideUp 0.5s ease;
}

.wp-iq-modal-content h1 {
  color: #2d3436;
  font-size: 1.6rem;
  margin-bottom: 20px;
  font-weight: 900;
}

.wp-iq-grade-details {
  margin: 20px 0;
}

.wp-iq-grade-details p {
  font-size: 1rem;
  color: #4a4a4a;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  margin: 0;
}

.wp-iq-grade-details p:last-child {
  border-bottom: none;
  font-size: 1.2rem;
  font-weight: 700;
  padding-top: 12px;
}

#grade-percentage {
  color: #667eea;
  font-weight: 900;
  font-size: 1.3rem;
}

#remarks {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
}

.wp-iq-modal-button button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 35px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
  font-family: inherit;
  margin-top: 5px;
}

.wp-iq-modal-button button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* انیمیشن‌ها */
@keyframes wp_iq_fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes wp_iq_slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* پاسخ‌های درست و غلط */
.wp-iq-option-correct {
  border-color: #00b894 !important;
  background: #00b894 !important;
}

.wp-iq-option-correct label {
  color: white !important;
}

.wp-iq-option-wrong {
  border-color: #ff6b6b !important;
  background: #ff6b6b !important;
}

.wp-iq-option-wrong label {
  color: white !important;
}

/* واکنش‌گرا */
@media (max-width: 768px) {
  .wp-iq-container {
    padding: 0 10px;
  }

  .wp-iq-quiz-wrapper {
    padding: 15px;
  }

  .wp-iq-options {
    grid-template-columns: 1fr;
  }

  .wp-iq-details {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    text-align: center;
  }

  .wp-iq-details div {
    font-size: 0.9rem;
  }

  .wp-iq-question h1 {
    font-size: 1rem;
  }

  .wp-iq-header h4 {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .wp-iq-quiz-wrapper {
    padding: 10px;
  }

  .wp-iq-quiz-container {
    padding: 15px;
  }

  .wp-iq-question {
    padding: 15px;
    min-height: 80px;
  }

  .wp-iq-option label {
    font-size: 0.85rem;
    padding: 12px 15px;
    min-height: 45px;
  }

  .wp-iq-modal-content {
    padding: 25px 20px;
  }

  .wp-iq-modal-content h1 {
    font-size: 1.3rem;
  }

  .wp-iq-next-button button {
    padding: 12px 30px;
    font-size: 1rem;
  }
}
