/**
 * 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
   ========================================================================== */
@media (min-width: 1240px) {
.aimarker-main-content.practice-main-content {
    max-width: 1000px;
    margin: 15px auto;
    overflow-y: auto;
}
}
.aimarker-practice-quiz-container,
.aimarker-practice-history-container {
  max-width: 800px;
  width: 100%;
  margin: 15px auto;
  padding: 15px;
  background: #ffffff;
  border-radius: var(--aimarker-normal-border-radius);
  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: var(--aimarker-normal-border-radius);
  padding: 0px;
  box-shadow: none;
  max-width: 900px;
  animation: containerFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}



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

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

.aimarker-practice-quiz-header::after,
.aimarker-practice-history-header::after{
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #3658d6, #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,
.aimarker-practice-history-header h2{
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #3658D6 0%, #F329B9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  letter-spacing: -0.5px;
}

/* ==========================================================================
   QUIZ SETUP FORM
   ========================================================================== */



#aimarker-quiz-setup-form, 
#aimarker-targeted-setup-form,
.aimarker-quiz-setup-form {
    display: grid;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: var(--aimarker-normal-border-radius);
    max-width: 980px;
}

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

.aimarker-form-group.aimarker-mode-selection {
    margin-bottom: 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 select,
.aimarker-form-group input,
.aimarker-form-group textarea {
    border-radius: var(--aimarker-small-border-radius);
    padding: 7px;
    border-style: solid;
    width: 100%;
}

/*Switch to practice mode*/
/* Elegant glass-like design */
.aimarker-mode-options {
  display: inline-flex;
  gap: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* Decorative halo */
.aimarker-mode-options::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.8), 
    transparent
  );
  z-index: 1;
}

.aimarker-mode-option {
  position: relative;
  z-index: 2;
  margin-bottom: 0 !important;
}

.aimarker-mode-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.aimarker-mode-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #4a5568;
    background: transparent;
    border-radius: var(--aimarker-normal-border-radius);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    letter-spacing: 0.3px;
    user-select: none;
    gap: 7px;
}


/* Micro border in unselected state */
.aimarker-mode-label {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Selected state */
.aimarker-mode-option input:checked + .aimarker-mode-label {
    position: relative;
    overflow: hidden;
    background-color: var(--aimarker-main-color);
    background-repeat: no-repeat;
    background-position: 20px center;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--aimarker-normal-border-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* Decorative dots when selected */
.aimarker-mode-option input:checked + .aimarker-mode-label::after {
    content: '';
    width: 5px;
    height: 5px;
    position: absolute;
    right: 5px;
    top: 5px;
    background: #ffffff;
    border-radius: 50%;
}

@keyframes slideIn {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 24px;
    opacity: 1;
  }
}

/* Click animation */
@keyframes gentlePress {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

.aimarker-mode-option input:active + .aimarker-mode-label {
  animation: gentlePress 0.2s ease;
}

/* Focused state */
.aimarker-mode-option input:focus-visible + .aimarker-mode-label {
  outline: 2px solid rgba(66, 153, 225, 0.5);
  outline-offset: 2px;
}

/* Decorative separator between options */
.aimarker-mode-option:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translateY(-50%);
  width: 1px;
  height: 24px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 0, 0, 0.1),
    transparent
  );
}

/* Remove separator line when selected */
.aimarker-mode-option:has(input:checked) + .aimarker-mode-option::after,
.aimarker-mode-option:has(input:checked)::after {
  opacity: 0;
}

/* Responsive Adjustment */
@media (max-width: 480px) {
  .aimarker-mode-options {
    gap: 12px;
    padding: 12px;
  }
  
  .aimarker-mode-label {
    min-width: 100px;
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* Graceful transition effect */
.aimarker-mode-option {
  transition: all 0.3s ease;
}


/* Format for information on specific skills enhancement */
.aimarker-targeted-abilities-info {
    margin: 0 0 15px 0;
    padding: 0;
    background: transparent;
}

/* Capability summary container */
.aimarker-abilities-summary {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: var(--aimarker-normal-border-radius);
    padding: 35px 40px;
    box-shadow: 
        0 15px 35px rgba(30, 64, 175, 0.08),
        0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

/* Decorative background pattern */
.aimarker-abilities-summary::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at top right, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(147, 197, 253, 0.05) 30%, 
        transparent 70%);
    border-radius: 50%;
    transform: translate(60px, -60px);
    z-index: 0;
}

.aimarker-abilities-summary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at bottom left, 
        rgba(168, 85, 247, 0.05) 0%, 
        rgba(192, 132, 252, 0.05) 30%, 
        transparent 70%);
    border-radius: 50%;
    transform: translate(-40px, 40px);
    z-index: 0;
}

/* Heading paragraph styles */
.aimarker-abilities-summary > p:first-child {
    font-size: 18px;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Subject name highlighting */
.aimarker-abilities-summary > p:first-child strong {
    color: #2563eb;
    background: linear-gradient(120deg, rgba(37, 99, 235, 0.1) 0%, transparent 100%);
    padding: 2px 8px;
    border-radius: var(--aimarker-small-border-radius);
    font-weight: 600;
}

/* Capability list container */
.aimarker-weakest-abilities {
    background: linear-gradient(to bottom, 
        rgba(248, 250, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.9) 100%);
    border-radius: var(--aimarker-normal-border-radius);
    padding: 25px;
    margin: 25px 0;
    border: 1px solid rgba(59, 130, 246, 0.08);
    position: relative;
    z-index: 1;
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.02),
        0 5px 20px rgba(37, 99, 235, 0.05);
}

/* Ability item style */
.aimarker-ability-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    margin: 12px 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 255, 0.95) 100%);
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 
        0 4px 12px rgba(37, 99, 235, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Hover effect for ability items */
.aimarker-ability-item:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 25px rgba(37, 99, 235, 0.12),
        0 3px 10px rgba(0, 0, 0, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%,
        rgba(240, 245, 255, 1) 100%);
}

/* Ability item number */
.aimarker-ability-item::before {
    content: counter(item-counter);
    counter-increment: item-counter;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
}

/* Reset the counter */
.aimarker-weakest-abilities {
    counter-reset: item-counter;
}

/* Ability name style */
#aimarker-container .aimarker-ability-name,
.aimarker-ability-name {
    display: block;
    padding-bottom: 20px;
    padding-left: 0;
    font-size: 15px;
    line-height: 22px;
    text-align: center;
}

#aimarker-container .aimarker-ability-name b {
    color: #676a7b;
    font-size: 12px;
    line-height: 24px;
    font-weight: 400;
    letter-spacing: 0px;
}

#aimarker-container .aimarker-ability-name {
    color: #3658d6;
    font-weight: bold;
}

#aimarker-container .aimarker-weakest-abilities .aimarker-ability-name {
    padding-bottom: 0;
    margin-left: 40px;
}

/* Fraction style */
.aimarker-ability-score {
    font-size: 16px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #10b981, #34d399);
    padding: 8px 20px;
    border-radius: var(--aimarker-normal-border-radius);
    min-width: 85px;
    text-align: center;
    box-shadow: 
        0 4px 12px rgba(16, 185, 129, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

/* Score hover effect */
.aimarker-ability-item:hover .aimarker-ability-score {
    transform: scale(1.05);
    box-shadow: 
        0 6px 18px rgba(16, 185, 129, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

/* Prompt message style */
.aimarker-targeted-info {
    font-size: 17px;
    color: #374151;
    text-align: center;
    margin-top: 35px;
    padding: 20px;
    background: linear-gradient(135deg, 
        rgba(249, 250, 251, 0.9) 0%,
        rgba(243, 244, 246, 0.9) 100%);
    border-radius: 14px;
    border: 1px dashed rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Decorative icon for notification messages */
.aimarker-targeted-info::before {
    content: ' ';
    width: 18px;
    height: 18px;
    background-image: url('../svg/emoji/target-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Responsive design */
@media (max-width: 640px) {
    .aimarker-abilities-summary {
        padding: 25px 20px;
        border-radius: var(--aimarker-normal-border-radius);
    }
    
    .aimarker-abilities-summary > p:first-child {
        font-size: 16px;
        margin-bottom: 22px;
        padding-bottom: 18px;
    }
    
    .aimarker-weakest-abilities {
        padding: 18px;
        margin: 20px 0;
    }
    
    .aimarker-ability-item {
        padding: 16px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .aimarker-ability-name {
        margin-left: 40px;
        margin-bottom: 5px;
    }
    
    .aimarker-ability-score {
        align-self: flex-end;
        margin-top: 5px;
        padding: 6px 16px;
        min-width: 75px;
    }
    
    .aimarker-targeted-info {
        font-size: 16px;
        padding: 18px 18px 18px 50px;
        text-align: left;
    }
}

/* Animation effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aimarker-abilities-summary {
    animation: fadeInUp 0.6s ease-out;
}

.aimarker-ability-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.aimarker-ability-item:nth-child(1) { animation-delay: 0.1s; }
.aimarker-ability-item:nth-child(2) { animation-delay: 0.2s; }
.aimarker-ability-item:nth-child(3) { animation-delay: 0.3s; }
.aimarker-targeted-info { animation-delay: 0.4s; }



/* Ability Checkboxes */

.aimarker-ability-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.aimarker-checkbox-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 12px 20px;
  background-color: white;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.aimarker-checkbox-label:hover {
  border-color: var(--aimarker-main-color);
  background-color: #f7fafc;
}

.aimarker-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.aimarker-checkbox-label span {
  position: relative;
  padding-left: 32px;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
}

.aimarker-checkbox-label span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
      top: auto;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.aimarker-checkbox-label span::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    top: auto;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
}

.aimarker-checkbox-label input[type="checkbox"]:checked + span::before {
  background-color: var(--aimarker-main-color);
  border-color: var(--aimarker-main-color);
}

.aimarker-checkbox-label input[type="checkbox"]:checked + span {
  color: #1f2937;
  font-weight: 600;
}

.aimarker-checkbox-label input[type="checkbox"]:focus + span::before {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

#aimarker-ability-checkboxes .aimarker-checkbox-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100px;
    width: 178px;
}


/* 当复选框被选中时，修改整个 label 的样式 */
.aimarker-checkbox-label:has(input[type="checkbox"]:checked) {
    border: 2px solid var(--aimarker-main-color);
    background-color: #ebf4ff; /* 浅蓝色背景 */
    border-radius: 6px;
    padding: 4px 8px;
}

/* 同时修改文字样式 */
.aimarker-checkbox-label:has(input[type="checkbox"]:checked) .aimarker-ability-name {
    color: var(--aimarker-main-color);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.aimarker-button {
  display: inline-block;
  padding: 12px 20px;
  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: 15px 40px;
  border-radius: var(--aimarker-normal-border-radius);
  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: #3658d6;
  border-color: #3658d6;
  color: #fff;
}

.aimarker-button-primary {
  background: linear-gradient(135deg, #3658d6 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: var(--aimarker-main-color);
  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-progress {
  margin-bottom: 20px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--aimarker-normal-border-radius);
  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: var(--aimarker-small-border-radius);
  overflow: hidden;
  margin-bottom: 15px;
  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: #3658d6;
  transition: width 0.3s ease;
}

.aimarker-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3658d6, #764ba2, #9f7aea);
  border-radius: var(--aimarker-small-border-radius);
  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: 20px;
  color: #64748b;
  font-weight: 600;
}

/* ==========================================================================
   QUESTION CONTAINER
   ========================================================================== */
.aimarker-question-container {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--aimarker-normal-border-radius);
    padding: 20px;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.12);
    margin-bottom: 20px;
    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);
}


/* Question Container Alternative */
.aimarker-question-container {
  background-color: white;
  border-radius: var(--aimarker-normal-border-radius);
  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;
  max-width: 1000px;
}

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

.aimarker-question {
  padding-bottom: 15px;
  border-bottom: 1px solid #E5E6E8;
  margin-bottom: 15px !important;
}

.aimarker-quiz-questions .aimarker-question {
    margin-bottom: 0;
}

.aimarker-question-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

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

.aimarker-question-type {
  display: inline-block;
  padding: 6px 15px;
  border-radius: 7px;
  font-size: 14px;
  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: #FF9800;
    color: white;
    box-shadow: 0 3px 8px rgb(221 137 78 / 30%);
    min-width: fit-content;
}

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

.aimarker-question-text {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0;
  padding-bottom: 0;
  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: 8px 16px;
  margin-bottom: 12px;
  border-radius: var(--aimarker-small-border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.aimarker-option-label:hover {
  border-color: var(--aimarker-main-color);
  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: var(--aimarker-main-color);
  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: #3658d6;
  background: #e6f3ff;
}

/* Custom Checkbox */
.aimarker-option-input {
  appearance: none;
  width: 18px;
  height: 18px;
  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: var(--aimarker-main-color);
  border-color: var(--aimarker-main-color);
}

.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 15px;
  font-size: 17px;
  border: 2px solid #e1e8f0;
  border-radius: var(--aimarker-normal-border-radius);
  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: #3658d6;
  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: 15px;
  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: var(--aimarker-normal-border-radius);
  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;
  max-width: 1000px;
}

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

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

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

.aimarker-results-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  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: 33px;
  line-height: 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 15px rgba(0, 0, 0, 0.05);
  letter-spacing: -0.5px;
}

.aimarker-results-summary {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
  background: #f9f9f9;
  border-radius: var(--aimarker-normal-border-radius);
}

.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: var(--aimarker-normal-border-radius);
  padding: 15px;
  text-align: center;
  box-shadow: 0 15px 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: #FF9800;
  z-index: 1;
}

.aimarker-result-correct::before {
    background: #00BCD4;
}

.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: #3658d6;
  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: #FF9800;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


.aimarker-correct-value {
    background: #00BCD4;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.aimarker-result-item {
  padding-bottom: 15px;
  border-bottom: 1px solid #E5E6E8;
  margin-bottom: 15px !important;
}

.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-question {
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  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: var(--aimarker-normal-border-radius);
  backdrop-filter: blur(5px);
}

.aimarker-result-answer .correct {
  color: #46b450;
  color: #065f46;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  padding: 8px 15px;
  border-radius: var(--aimarker-normal-border-radius);
  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 15px;
  border-radius: var(--aimarker-normal-border-radius);
  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: #D6F4F7;
  padding: 20px;
  border-radius: var(--aimarker-normal-border-radius);
  margin-top: 20px;
  border: 1px solid #00BAD1;
  position: relative;
  z-index: 1;
}

.aimarker-result-item.incorrect .aimarker-result-explanation {
    border-color: #F9D7D8;
    background: #FDECEC;
}

.aimarker-result-explanation strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.aimarker-result-options {
  list-style: none;
  padding: 0;
  margin: 15px 0;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--aimarker-normal-border-radius);
  padding: 15px;
  position: relative;
  z-index: 1;
}

.aimarker-result-options li {
  padding: 8px 16px 8px 30px;
  margin-bottom: 8px;
  border-radius: var(--aimarker-small-border-radius);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  position: relative;
}
.aimarker-result-options li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-8px);
    width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 16px;
    border: 1px solid #ccc;
    border-radius: 2px;
    color:#fff;
    text-align: center;
    border-color: #5B6780;
    background: #fff;
    transition: all 0.3s ease;
}

.aimarker-result-options li:last-child {
  margin-bottom: 0;
}

.aimarker-result-options li .option-label {
  font-weight: 700;
  color: #475569;
  min-width: 30px;
  font-size: 16px;
}

.aimarker-result-options li .option-text {
  flex: 1;
  color: #334155;
  font-size: 15px;
  line-height: 1.5;
}

.aimarker-result-options li.correct-selected:before,
.aimarker-result-options li.wrong-selected:before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-8px);
    width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 16px;
    border: 2px solid #ccc;
    border-radius: 2px;
    color:#fff;
    text-align: center;
    border-color: var(--aimarker-main-color);
    background: var(--aimarker-main-color);
    transition: all 0.3s ease;
}

.aimarker-result-options li .option-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.aimarker-result-options li .option-badge.user-selected {
  background: #3b82f6;
  color: #fff;
  margin-left: auto;
  display:none;
}

.aimarker-result-options li .option-badge.correct-answer {
  background: #10b981;
  color: #fff;
  display:none;
}

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

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

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

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

.aimarker-results-actions {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--aimarker-normal-border-radius);
  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-results-actions .aimarker-button {
  min-width: 200px;
}

/* ==========================================================================
   PRACTICE HISTORY
   ========================================================================== */
/* Reset basic styles */


.aimarker-history-list .aimarker-loading {
    grid-column: 1 / -1;
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

/* Extra-large screen: 5 columns */
@media (min-width: 1920px) {
  .aimarker-history-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }
}

/* Large screen: 4 columns */
@media (min-width: 1440px) and (max-width: 1919px) {
  .aimarker-history-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Medium screen: 3 columns */
@media (min-width: 1024px) and (max-width: 1439px) {
  .aimarker-history-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Flat panel: 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
  .aimarker-history-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Large mobile phone: 2 columns */
@media (min-width: 480px) and (max-width: 767px) {
  .aimarker-history-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Mobile phones: 1 column */
@media (max-width: 479px) {
  .aimarker-history-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
/* Historical Project Cards */
.aimarker-history-item {
  background: white;
  border-radius: var(--aimarker-normal-border-radius);
  padding: 18px;
  margin-bottom: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  cursor: pointer;
}

.aimarker-history-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #d1d5db;
}

/* Header area */
.aimarker-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

/* Subject Tags */
.aimarker-history-subject {
  background: #4f46e5;
  color: white;
  padding: 6px 14px;
  border-radius: var(--aimarker-normal-border-radius);
  font-size: 14px;
  font-weight: 600;
}

/* date */
.aimarker-history-date {
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
}

/* Information area */
.aimarker-history-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.aimarker-history-info span {
  background: #f9fafb;
  padding: 8px 14px;
  border-radius: var(--aimarker-normal-border-radius);
  font-size: 14px;
  color: #374151;
  border: 1px solid #e5e7eb;
}

span.aimarker-history-score {
    border: none;
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 640px) {
  .aimarker-history-item {
    padding: 14px;
  }
  
  .aimarker-history-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .aimarker-history-date {
    align-self: flex-start;
  }
  
  .aimarker-history-info {
    gap: 8px;
  }
  
  .aimarker-history-info span {
    font-size: 13px;
    padding: 6px 10px;
  }
}


/* ==========================================================================
   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: var(--aimarker-normal-border-radius);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: containerFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.aimarker-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  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 {
    background: linear-gradient(135deg, #f6f9fc 0%, #edf2f7 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
}

/* 總結卡片 - 玻璃擬態風格 */
.aimarker-history-detail-summary {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-radius: var(--aimarker-normal-border-radius);
    padding: 20px;
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.1),
        0 2px 16px rgba(31, 38, 135, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

/* 裝飾性元素 */
.aimarker-history-detail-summary::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea80 0%, #764ba280 100%);
    border-radius: 0 0 0 100px;
    z-index: 0;
}

/* 網格佈局容器 */
.aimarker-history-detail-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}

/* 資訊卡片樣式 */
.aimarker-detail-info {
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--aimarker-normal-border-radius);
    padding: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
}

.aimarker-detail-info:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 20px rgba(31, 38, 135, 0.1);
    border-color: rgba(255, 255, 255, 1);
}

/* 標籤樣式 - 現代感設計 */
.aimarker-detail-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.aimarker-detail-label::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #3658d6, #764ba2);
    border-radius: 2px;
}

/* 數值樣式 */
.aimarker-detail-value {
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

/* 分數特殊樣式 - 漸層文字 */
.aimarker-score {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 20px;
    position: relative;
    display: inline-block;
}

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

/* 難度特殊樣式 - 徽章設計 */
.aimarker-detail-info:nth-child(3) .aimarker-detail-value {
    background: linear-gradient(135deg, #f87171, #dc2626);
    color: white;
    padding: 6px 16px;
    border-radius: var(--aimarker-normal-border-radius);
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* 科目特殊樣式 */
.aimarker-detail-info:nth-child(1) .aimarker-detail-value {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 22px;
}

/* 題數特殊樣式 */
.aimarker-detail-info:nth-child(2) .aimarker-detail-value {
    color: #3b82f6;
    position: relative;
    padding-left: 20px;
}

.aimarker-detail-info:nth-child(2) .aimarker-detail-value::before {
    content: '📝';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* 答對率特殊樣式 */
.aimarker-detail-info:nth-child(5) .aimarker-detail-value {
    color: #f59e0b;
    font-weight: 800;
}

/* 時間特殊樣式 - 科技感設計 */
.aimarker-detail-info:nth-child(6) .aimarker-detail-value {
    background: rgba(30, 41, 59, 0.08);
    padding: 10px 16px;
    border-radius: var(--aimarker-normal-border-radius);
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-left: 3px solid #3b82f6;
    color: #334155;
}

/* ===== 題目列表容器 ===== */
.aimarker-history-detail-questions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== 單個題目卡片 ===== */
.aimarker-detail-question {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--aimarker-normal-border-radius);
    padding: 22px;
    box-shadow: 
        0 6px 15px rgba(31, 38, 135, 0.08),
        0 1px 4px rgba(31, 38, 135, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.aimarker-detail-question:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(31, 38, 135, 0.12),
        0 2px 8px rgba(31, 38, 135, 0.06);
}

/* 正確/錯誤狀態指示器 */
.aimarker-detail-question::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to bottom, #10b981, #059669);
    border-radius: 6px 0 0 6px;
}

.aimarker-detail-incorrect::before {
    background: linear-gradient(to bottom, #f87171, #dc2626);
}

/* 題目頭部樣式 */
.aimarker-detail-question-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(226, 232, 240, 0.5);
}

/* 題號樣式 */
.aimarker-detail-question-number {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 6px 16px;
    border-radius: var(--aimarker-normal-border-radius);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* 題型樣式 */
.aimarker-detail-question-type {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    padding: 6px 14px;
    border-radius: var(--aimarker-normal-border-radius);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* 狀態標籤樣式 */
.aimarker-detail-question-status {
    padding: 6px 14px;
    border-radius: var(--aimarker-normal-border-radius);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aimarker-status-correct {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.aimarker-status-incorrect {
    background: linear-gradient(135deg, #f87171, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* 題目文本樣式 */
.aimarker-detail-question-text {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(248, 250, 252, 0.6);
    border-radius: var(--aimarker-normal-border-radius);
    border-left: 4px solid #3b82f6;
}

/* 選項容器樣式 */
.aimarker-detail-question-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

/* 單個選項樣式 */
.aimarker-detail-option {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e2e8f0;
    border-radius: var(--aimarker-normal-border-radius);
    padding: 16px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.aimarker-detail-option.aimarker-detail-option-incorrect {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.05));
    color: #dc2626;
    border-left: 4px solid #f87171;
}

.aimarker-detail-option.aimarker-detail-option-correct {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    color: #059669;
    border-left: 4px solid #10b981;
}

/* 選項標籤樣式 */
.aimarker-history-detail-questions .aimarker-option-label {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* 選項文本樣式 */
.aimarker-history-detail-questions .aimarker-option-text {
    color: #334155;
    font-size: 15px;
    line-height: 1.5;
    flex: 1;
}

/* 答案區域樣式 */
.aimarker-detail-question-answer {
    background: rgba(248, 250, 252, 0.8);
    border-radius: var(--aimarker-normal-border-radius);
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.aimarker-detail-answer-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.aimarker-detail-answer-row:last-child {
    margin-bottom: 0;
}

.aimarker-detail-answer-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    min-width: 100px;
}

/* 答案文本樣式 */
.aimarker-detail-answer-value {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--aimarker-normal-border-radius);
    flex: 1;
}

.aimarker-answer-correct {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    color: #059669;
    border-left: 4px solid #10b981;
}

.aimarker-answer-incorrect {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.05));
    color: #dc2626;
    border-left: 4px solid #f87171;
}

/* 選項徽章容器 */
.aimarker-detail-option {
    position: relative;
    padding-right: 140px; /* 為徽章預留空間 */
}

/* 徽章容器樣式 */
.aimarker-option-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: var(--aimarker-normal-border-radius);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 8px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    animation: badgePop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* 多個徽章的堆疊效果 */
.aimarker-detail-option-correct .aimarker-option-badge + .aimarker-option-badge {
    top: calc(50% - 15px);
    z-index: -1;
    transform: translateY(-50%) scale(0.5);
}

/* 正確答案徽章 */
.aimarker-badge-correct {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.aimarker-badge-correct::before {
    content: '✓ ';
    font-size: 10px;
    margin-right: 2px;
}

/* 你的答案徽章 */
.aimarker-badge-selected {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.aimarker-badge-selected::before {
    content: '👤 ';
    font-size: 10px;
    margin-right: 2px;
}

/* 錯誤答案徽章 */
.aimarker-badge-incorrect {
    background: linear-gradient(135deg, #f87171, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.aimarker-badge-incorrect::before {
    content: '✗ ';
    font-size: 10px;
    margin-right: 2px;
}

/* 選中但錯誤的選項樣式 */
.aimarker-detail-option-selected {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.05));
    border-color: #3b82f6;
    position: relative;
}

/* 正確的選項樣式 */
.aimarker-detail-option-correct {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border-color: #10b981;
    position: relative;
}



/* 錯誤的選項樣式 */
.aimarker-detail-option-incorrect {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.05));
    border-color: #f87171;
    position: relative;
}



/* 徽章動畫 */
@keyframes badgePop {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    70% {
        transform: translateY(-50%) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* 延遲顯示動畫 */
.aimarker-option-badge:nth-child(3) {
    animation-delay: 0.1s;
}

.aimarker-option-badge:nth-child(4) {
    animation-delay: 0.2s;
}

/* 鼠標懸停效果 */
.aimarker-detail-option:hover .aimarker-option-badge {
    transform: translateY(-50%) scale(1.05);
    transition: transform 0.2s ease;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .aimarker-detail-option {
        padding-right: 120px;
        padding-bottom: 40px; /* 為堆疊徽章增加底部空間 */
    }
    
    .aimarker-option-badge {
        position: absolute;
        right: 12px;
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* 在小屏幕上堆疊顯示 */
    .aimarker-detail-option-correct .aimarker-option-badge:nth-child(3),
    .aimarker-detail-option-correct .aimarker-option-badge:nth-child(4) {
        top: auto;
        bottom: 8px;
        transform: none;
    }
    
    .aimarker-detail-option-correct .aimarker-option-badge:nth-child(3) {
        right: 12px;
    }
    
    .aimarker-detail-option-correct .aimarker-option-badge:nth-child(4) {
        right: 80px;
    }
}

/* 選項標籤美化 */
.aimarker-detail-option-correct .aimarker-option-label {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.aimarker-detail-option-selected .aimarker-option-label {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.aimarker-detail-option-incorrect .aimarker-option-label {
    background: linear-gradient(135deg, #f87171, #dc2626);
    color: white;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.2);
}

.aimarker-history-detail-questions span.aimarker-option-label {
    display: none;
}

/* 解析區域樣式 */
.aimarker-detail-explanation {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(124, 58, 237, 0.02));
    border-radius: var(--aimarker-normal-border-radius);
    padding: 15px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    position: relative;
}

.aimarker-detail-explanation::before {
    content: ' ';
    background-image: url('../svg/emoji/light-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    width: 18px;
    height: 18px;
    position: absolute;
    top: 18px;
    left: 18px;
}

.aimarker-detail-explanation-label {
    color: #7c3aed;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-left: 30px;
}

.aimarker-detail-explanation-text {
    color: #475569;
    font-size: 15px;
    line-height: 1.7;
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aimarker-detail-question {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

/* 交錯動畫延遲 */
.aimarker-detail-question:nth-child(odd) { animation-delay: 0.1s; }
.aimarker-detail-question:nth-child(even) { animation-delay: 0.2s; }

/* 滑鼠懸停指示器 */
.aimarker-detail-info::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3658d6, #764ba2);
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aimarker-detail-info:hover::after {
    opacity: 1;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .aimarker-modal-body {
        padding: 16px;
    }
    
    .aimarker-history-detail-summary {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 16px;
    }
    
    .aimarker-detail-question {
        padding: 15px;
    }
    
    .aimarker-detail-question-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .aimarker-detail-question-options {
        grid-template-columns: 1fr;
    }
    
    .aimarker-detail-question-text {
        font-size: 16px;
        padding: 12px;
    }
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */
.aimarker-history-list .aimarker-message {
    padding: 15px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    text-align: center;
}

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

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

.aimarker-history-list .aimarker-info {
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  color: #3658d6;
}

.aimarker-history-list .aimarker-message {
    border-radius: var(--aimarker-normal-border-radius);
    padding: 24px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.aimarker-history-list .aimarker-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #60a5fa);
    border-radius: 12px 0 0 12px;
}

.aimarker-history-list .aimarker-message.aimarker-info {
    border-left-color: #3b82f6;
}

.aimarker-history-list .aimarker-message p {
    margin: 0 0 12px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #334155;
    font-weight: 500;
}

.aimarker-history-list .aimarker-message p:last-child {
    margin-bottom: 0;
}

.aimarker-filter-hint {
    color: #64748b !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    opacity: 0.9;
}

/* ==========================================================================
   LOADING
   ========================================================================== */
.aimarker-loading {
  text-align: center;
  padding: 40px;
  color: #999;
  padding: 80px 48px;
  font-size: 20px;
  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: 20px;
    border-radius: var(--aimarker-normal-border-radius);
    margin: 15px;
  }
  
  .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: 15px;
  }
  
  .aimarker-form-group label {
    font-size: 16px;
  }
  
  .aimarker-quiz-setup select {
    padding: 10px 15px;
    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: repeat(auto-fit, minmax(120px, 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 */
  
  .aimarker-question {
    padding: 15px;
  }
  
  .aimarker-question-text {
    font-size: 17px;
  }
  
  .aimarker-option-label {
    padding: 15px;
  }
}

@media (max-width: 1024px) {
  .aimarker-practice-quiz-container {
    padding: 32px;
    margin: 15px;
  }
  
  .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: 15px;
    margin: 10px;
  }
  
  .aimarker-practice-quiz-header h2 {
    font-size: 20px;
  }
  
  .aimarker-quiz-setup,
  .aimarker-question-container,
  .aimarker-results-details {
    padding: 15px;
  }
  
  #aimarker-quiz-setup-form {
    gap: 20px;
  }
  
  .aimarker-button {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  #aimarker-current-question {
    font-size: 28px;
  }
  
  #aimarker-total-questions {
    font-size: 15px;
  }
}

ul.aimarker-question-options.aimarker-question-options-single .aimarker-option-input {
    border-radius: 50%;
}