/**
 * AIMarker Practice Quiz Styles
 *
 * @package AIMarker
 * @since 1.0.0
 */

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
.aimarker-practice-quiz-container * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   CONTAINERS
   ========================================================================== */
.aimarker-practice-quiz-container,
.aimarker-practice-history-container {
  max-width: 800px;
  margin: 15px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Enhanced Quiz Container */
.aimarker-practice-quiz-container {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.12);
  max-width: 900px;
  animation: containerFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.aimarker-practice-quiz-container::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 50%;
  transform: translate(150px, -150px);
  z-index: 0;
}

.aimarker-practice-quiz-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border-radius: 50%;
  transform: translate(-100px, 100px);
  z-index: 0;
}

/* ==========================================================================
   HEADERS
   ========================================================================== */
.aimarker-practice-quiz-header,
.aimarker-practice-history-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.aimarker-practice-quiz-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  position: relative;
  z-index: 1;
}

.aimarker-practice-quiz-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

.aimarker-practice-quiz-header h2,
.aimarker-practice-history-header h2 {
  margin: 0;
  color: #333;
  font-size: 28px;
  font-weight: 600;
}

.aimarker-practice-quiz-header h2 {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  letter-spacing: -0.5px;
}

.aimarker-practice-quiz-header h2::before {
  content: '📖';
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  opacity: 0.9;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* ==========================================================================
   QUIZ SETUP FORM
   ========================================================================== */
.aimarker-quiz-setup {
  padding: 20px;
}

.aimarker-quiz-setup {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.aimarker-quiz-setup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.aimarker-quiz-setup:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
}

#aimarker-quiz-setup-form {
  display: grid;
  gap: 36px;
}

.aimarker-form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: formGroupFadeIn 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.aimarker-form-group:nth-child(1) { animation-delay: 0.1s; }
.aimarker-form-group:nth-child(2) { animation-delay: 0.2s; }
.aimarker-form-group:nth-child(3) { animation-delay: 0.3s; }

.aimarker-form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
  font-size: 14px;
}

.aimarker-form-group label {
  font-weight: 700;
  font-size: 18px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.5px;
}

.aimarker-form-group label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: inline-block;
}

.aimarker-form-group select,
.aimarker-form-group input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.aimarker-form-group select:focus,
.aimarker-form-group input[type="text"]:focus {
  outline: none;
  border-color: #0073aa;
}

/* Enhanced Select Styles */
.aimarker-quiz-setup select {
  padding: 20px 24px;
  border: 2px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  font-size: 18px;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 24px center;
  background-size: 24px;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.aimarker-quiz-setup select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15),
              0 8px 20px rgba(59, 130, 246, 0.2);
  background-color: white;
}

.aimarker-quiz-setup select:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.aimarker-quiz-setup select option {
  padding: 12px;
  font-size: 16px;
  background: white;
  color: #1e293b;
}

.aimarker-quiz-setup select option[value=""] {
  color: #94a3b8;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.aimarker-button {
  display: inline-block;
  padding: 12px 24px;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

/* Enhanced Button Styles */
.aimarker-button {
  padding: 20px 40px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  min-height: 64px;
  z-index: 1;
}

.aimarker-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.aimarker-button::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -2;
}

.aimarker-button:hover::before {
  opacity: 1;
}

.aimarker-button:hover::after {
  opacity: 0.6;
}

.aimarker-button:active {
  transform: translateY(1px);
}

.aimarker-button:hover {
  background: #f0f0f0;
}

.aimarker-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.aimarker-button-primary {
  background: #0073aa;
  border-color: #0073aa;
  color: #fff;
}

.aimarker-button-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #9f7aea 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4),
              inset 0 1px 1px rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  animation: buttonPulse 2s infinite;
}

.aimarker-button-primary:hover {
  background: #005177;
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5),
              inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.aimarker-button-success {
  background: #46b450;
  border-color: #46b450;
  color: #fff;
}

.aimarker-button-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #34d399 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4),
              inset 0 1px 1px rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.aimarker-button-success:hover {
  background: #3a9a42;
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.5),
              inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.aimarker-button-danger {
  background: #dc3232;
  border-color: #dc3232;
  color: #fff;
}

.aimarker-button-danger:hover {
  background: #b82b2b;
}

/* Secondary Button Styles */
.aimarker-button:not(.aimarker-button-primary):not(.aimarker-button-success) {
  background: white;
  color: #475569;
  border: 2px solid #e2e8f0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.aimarker-button:not(.aimarker-button-primary):not(.aimarker-button-success):hover {
  transform: translateY(-4px);
  border-color: #94a3b8;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  color: #334155;
}

/* ==========================================================================
   QUIZ QUESTIONS & PROGRESS
   ========================================================================== */
.aimarker-quiz-questions {
  padding: 20px;
}

.aimarker-quiz-progress {
  margin-bottom: 30px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  z-index: 1;
}

.aimarker-progress-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.aimarker-progress-bar {
  height: 12px;
  background: rgba(226, 232, 240, 0.8);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

.aimarker-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progressShimmer 3s infinite;
}

.aimarker-progress-fill {
  height: 100%;
  background: #0073aa;
  transition: width 0.3s ease;
}

.aimarker-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2, #9f7aea);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.aimarker-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: fillShimmer 1.5s infinite;
}

.aimarker-progress-text {
  text-align: center;
  color: #666;
  font-size: 14px;
}

.aimarker-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

#aimarker-current-question {
  font-size: 36px;
  color: #3b82f6;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

#aimarker-total-questions {
  font-size: 24px;
  color: #64748b;
  font-weight: 600;
}

/* ==========================================================================
   QUESTION CONTAINER
   ========================================================================== */
.aimarker-question-container {
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  margin-bottom: 32px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  z-index: 1;
  animation: questionSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.aimarker-question-container::before {
  content: '?';
  position: absolute;
  top: -20px;
  right: 30px;
  font-size: 120px;
  color: rgba(102, 126, 234, 0.05);
  font-weight: 800;
  z-index: 0;
}

/* Question Container Alternative */
#aimarker-question-container {
  max-width: 800px;
  margin: 0 auto 30px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.5s ease forwards;
}

#aimarker-question-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.aimarker-question {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.aimarker-question {
  padding: 30px;
}

.aimarker-question-type {
  display: inline-block;
  padding: 4px 12px;
  background: #0073aa;
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

.aimarker-question-type {
  display: inline-block;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  letter-spacing: 0.5px;
}

/* Fill-in question type */
.aimarker-question-type:first-of-type {
  background-color: #4a9eff;
  color: white;
  box-shadow: 0 3px 8px rgba(74, 158, 255, 0.3);
}

/* Multiple choice question type */
.aimarker-question-type:last-of-type {
  background-color: #9d4edd;
  color: white;
  box-shadow: 0 3px 8px rgba(157, 78, 221, 0.3);
}

.aimarker-question-text {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 20px;
}

.aimarker-question-text {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eef2f7;
  line-height: 1.7;
}

/* ==========================================================================
   QUESTION OPTIONS
   ========================================================================== */
.aimarker-question-options {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 10px;
}

.aimarker-question-options li {
  margin-bottom: 12px;
}

.aimarker-option-label {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.aimarker-option-label {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 12px;
  background-color: #f8fafc;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.aimarker-option-label:hover {
  border-color: #0073aa;
  background: #f0f8ff;
  background-color: #edf2f7;
  transform: translateX(5px);
}

.aimarker-option-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #9d4edd;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.aimarker-option-label:hover::before {
  opacity: 1;
}

.aimarker-option-label input[type="radio"],
.aimarker-option-label input[type="checkbox"] {
  margin-right: 12px;
  cursor: pointer;
}

.aimarker-option-label.selected {
  border-color: #0073aa;
  background: #e6f3ff;
}

/* Custom Checkbox */
.aimarker-option-input {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e0;
  border-radius: 6px;
  margin-right: 15px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.aimarker-option-input:checked {
  background-color: #9d4edd;
  border-color: #9d4edd;
}

.aimarker-option-input:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 14px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.aimarker-option-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.2);
}

/* Option Text */
.aimarker-option-label span {
  font-size: 16px;
  color: #2d3748;
  font-weight: 500;
  flex-grow: 1;
}

/* ==========================================================================
   FILL-IN INPUT
   ========================================================================== */
.aimarker-fill-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.aimarker-fill-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 17px;
  border: 2px solid #e1e8f0;
  border-radius: 10px;
  transition: all 0.3s ease;
  background-color: #fbfdfe;
  color: #2c3e50;
  outline: none;
}

.aimarker-fill-input::placeholder {
  color: #a0aec0;
}

.aimarker-fill-input:focus {
  outline: none;
  border-color: #0073aa;
  border-color: #4a9eff;
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.2);
  background-color: white;
}

/* ==========================================================================
   QUIZ NAVIGATION
   ========================================================================== */
.aimarker-quiz-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.aimarker-quiz-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  z-index: 1;
}

.aimarker-quiz-navigation .aimarker-button {
  min-width: 120px;
}

.aimarker-quiz-navigation .aimarker-button {
  min-width: 160px;
  flex: 1;
}

/* ==========================================================================
   QUIZ RESULTS
   ========================================================================== */
.aimarker-quiz-results {
  padding: 20px;
  animation: resultsFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.aimarker-results-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 32px;
  position: relative;
}

.aimarker-results-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 2px;
}

.aimarker-results-header h3 {
  margin: 0;
  color: #333;
  font-size: 24px;
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  letter-spacing: -0.5px;
}

.aimarker-results-summary {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
  background: #f9f9f9;
  border-radius: 8px;
}

.aimarker-results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-bottom: 48px;
}

.aimarker-result-score,
.aimarker-result-correct {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.aimarker-result-score::before,
.aimarker-result-correct::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  z-index: 1;
}

.aimarker-result-correct::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.aimarker-result-score:hover,
.aimarker-result-correct:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}

.aimarker-score-value,
.aimarker-correct-value {
  font-size: 48px;
  font-weight: 700;
  color: #0073aa;
  margin-bottom: 8px;
}

.aimarker-score-value,
.aimarker-correct-value {
  font-size: 64px;
  font-weight: 900;
  margin-bottom: 16px;
  position: relative;
  line-height: 1;
}

.aimarker-score-value {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #9f7aea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.aimarker-correct-value {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.aimarker-score-label,
.aimarker-correct-label {
  font-size: 14px;
  color: #666;
  font-size: 20px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ==========================================================================
   RESULTS DETAILS
   ========================================================================== */
.aimarker-results-details {
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  margin-bottom: 48px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
}



.aimarker-result-item {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 15px;
  border-left: 4px solid #ddd;
  padding: 32px;
  border-radius: 16px;
  margin-bottom: 24px;
  border-left: 6px solid;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: resultItemSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  transform: translateX(30px);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.aimarker-result-item:nth-child(1) { animation-delay: 0.1s; }
.aimarker-result-item:nth-child(2) { animation-delay: 0.2s; }
.aimarker-result-item:nth-child(3) { animation-delay: 0.3s; }
.aimarker-result-item:nth-child(4) { animation-delay: 0.4s; }
.aimarker-result-item:nth-child(5) { animation-delay: 0.5s; }

.aimarker-result-item:hover {
  transform: translateX(8px);
}

.aimarker-result-item.correct {
  border-left-color: #46b450;
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.9) 0%, rgba(220, 252, 231, 0.9) 100%);
  border-left-color: #10b981;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.15);
}

.aimarker-result-item.incorrect {
  border-left-color: #dc3232;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.9) 0%, rgba(254, 226, 226, 0.9) 100%);
  border-left-color: #ef4444;
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.15);
}

.aimarker-result-question {
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 24px;
  padding-left: 16px;
  border-left: 4px solid #3b82f6;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

.aimarker-result-answer {
  margin: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.aimarker-result-answer span {
  font-weight: 500;
  color: #666;
}

.aimarker-result-answer span:first-child {
  font-weight: 700;
  color: #475569;
  min-width: 100px;
  background: rgba(255, 255, 255, 0.6);
  padding: 8px 16px;
  border-radius: 12px;
  backdrop-filter: blur(5px);
}

.aimarker-result-answer .correct {
  color: #46b450;
  color: #065f46;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  padding: 8px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.aimarker-result-answer .incorrect {
  color: #dc3232;
  color: #991b1b;
  background: linear-gradient(135deg, #fecaca, #fca5a5);
  padding: 8px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.aimarker-result-explanation {
  margin-top: 10px;
  padding: 12px;
  background: #fff;
  border-radius: 4px;
  font-size: 14px;
  color: #555;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.9) 0%, rgba(253, 230, 138, 0.9) 100%);
  padding: 24px;
  border-radius: 16px;
  margin-top: 24px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.1);
}

.aimarker-result-explanation strong {
  color: #92400e;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}



.aimarker-results-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  gap: 24px;
  padding-top: 48px;
  border-top: 2px solid rgba(226, 232, 240, 0.8);
  position: relative;
}



.aimarker-results-actions .aimarker-button {
  min-width: 200px;
}

/* ==========================================================================
   PRACTICE HISTORY
   ========================================================================== */
.aimarker-history-list {
  min-height: 200px;
}

.aimarker-history-item {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 15px;
  border-left: 4px solid #0073aa;
  cursor: pointer;
  transition: all 0.3s;
}

.aimarker-history-item:hover {
  background: #f0f8ff;
  transform: translateX(5px);
}

.aimarker-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.aimarker-history-subject {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.aimarker-history-date {
  color: #999;
  font-size: 12px;
}

.aimarker-history-info {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #666;
}

.aimarker-history-info span {
  display: flex;
  align-items: center;
}

.aimarker-history-score {
  font-weight: 600;
  color: #0073aa;
}

.aimarker-history-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.aimarker-pagination-btn {
  padding: 8px 16px;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.aimarker-pagination-btn:hover {
  background: #f0f0f0;
}

.aimarker-pagination-btn.active {
  background: #0073aa;
  border-color: #0073aa;
  color: #fff;
}

.aimarker-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.aimarker-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.aimarker-modal-content {
  background: #fff;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.aimarker-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.aimarker-modal-header h3 {
  margin: 0;
  color: #333;
}

.aimarker-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}

.aimarker-modal-close:hover {
  color: #333;
}

.aimarker-modal-body {
  padding: 20px;
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */
.aimarker-message {
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.aimarker-error {
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #dc3232;
}

.aimarker-success {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #46b450;
}

.aimarker-info {
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  color: #0073aa;
}

/* ==========================================================================
   LOADING
   ========================================================================== */
.aimarker-loading {
  text-align: center;
  padding: 40px;
  color: #999;
  padding: 80px 48px;
  font-size: 24px;
  color: #64748b;
  font-weight: 600;
  animation: loadingPulse 1.8s infinite;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes containerFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes formGroupFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes questionSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes resultsFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes resultItemSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.6);
  }
}

@keyframes loadingPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.98);
  }
}

@keyframes progressShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes fillShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
  .aimarker-practice-quiz-container,
  .aimarker-practice-history-container {
    padding: 15px;
  }
  
  .aimarker-practice-quiz-container {
    padding: 24px;
    border-radius: 16px;
    margin: 20px;
  }
  
  .aimarker-practice-quiz-header {
    margin-bottom: 36px;
  }
  
  .aimarker-practice-quiz-header h2 {
    font-size: 28px;
  }
  
  .aimarker-practice-quiz-header h2::before {
    display: none;
  }
  
  .aimarker-quiz-setup,
  .aimarker-question-container,
  .aimarker-results-details {
    padding: 32px 24px;
  }
  
  .aimarker-form-group label {
    font-size: 16px;
  }
  
  .aimarker-quiz-setup select {
    padding: 16px 20px;
    font-size: 16px;
  }
  
  .aimarker-button {
    padding: 16px 28px;
    font-size: 16px;
    min-height: 56px;
  }
  
  .aimarker-results-summary {
    flex-direction: column;
    gap: 20px;
    grid-template-columns: 1fr;
  }
  
  .aimarker-history-info {
    flex-direction: column;
    gap: 8px;
  }
  
  .aimarker-quiz-navigation {
    flex-direction: column;
    gap: 10px;
    gap: 16px;
  }
  
  .aimarker-quiz-navigation .aimarker-button {
    width: 100%;
  }
  
  .aimarker-score-value,
  .aimarker-correct-value {
    font-size: 48px;
  }
  
  .aimarker-result-question {
    font-size: 18px;
  }
  
  .aimarker-result-answer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .aimarker-result-answer span:first-child {
    min-width: auto;
  }
  
  .aimarker-results-actions {
    flex-direction: column;
    gap: 16px;
  }
  
  .aimarker-results-actions .aimarker-button {
    min-width: auto;
    width: 100%;
  }
  
  /* Mobile question styles */
  body {
    padding: 15px;
  }
  
  .aimarker-question {
    padding: 20px;
  }
  
  .aimarker-question-text {
    font-size: 17px;
  }
  
  .aimarker-option-label {
    padding: 15px;
  }
}

@media (max-width: 1024px) {
  .aimarker-practice-quiz-container {
    padding: 32px;
    margin: 20px;
  }
  
  .aimarker-practice-quiz-header h2 {
    font-size: 36px;
  }
  
  .aimarker-practice-quiz-header h2::before {
    right: -50px;
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .aimarker-practice-quiz-container {
    padding: 20px;
    margin: 10px;
  }
  
  .aimarker-practice-quiz-header h2 {
    font-size: 24px;
  }
  
  .aimarker-quiz-setup,
  .aimarker-question-container,
  .aimarker-results-details {
    padding: 24px 20px;
  }
  
  #aimarker-quiz-setup-form {
    gap: 24px;
  }
  
  .aimarker-button {
    padding: 14px 24px;
    font-size: 15px;
  }
  
  #aimarker-current-question {
    font-size: 28px;
  }
  
  #aimarker-total-questions {
    font-size: 20px;
  }
}

/* ==========================================================================
   SCROLLBAR STYLING
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c9d2;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}