/* Test Solve Styles - Matching Test Page Design */
.test-solve-container {
   background: var(--gradient);
   min-height: 100vh;
   padding: 120px 0 100px;
   position: relative;
   overflow: hidden;
}

.test-solve-container::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
   opacity: 0.6;
   pointer-events: none;
}

.test-layout {
   max-width: 1400px;
   margin: 0 auto;
   padding: 0 20px;
   display: flex;
   gap: 30px;
   align-items: flex-start;
   position: relative;
   z-index: 1;
}

.test-main-area {
   flex: 1;
   min-width: 0;
}

.test-sidebar {
   width: 320px;
   flex-shrink: 0;
   position: sticky;
   top: 100px;
}

/* Test Header Card - Matching Test Page Style */
.test-header-card {
   background: var(--white);
   border-radius: 24px;
   padding: 36px;
   margin-bottom: 30px;
   box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.08);
   border: 1px solid rgba(255, 255, 255, 0.8);
   display: flex;
   justify-content: space-between;
   align-items: center;
   flex-wrap: wrap;
   gap: 20px;
   position: relative;
   overflow: hidden;
}

.test-header-card::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   height: 4px;
   background: var(--gradient);
}

.test-title h2 {
   font-size: 1.75rem;
   font-weight: 800;
   color: var(--text-color);
   margin-bottom: 8px;
   letter-spacing: -0.02em;
}

.test-title p {
   color: var(--dark-gray);
   font-size: 1rem;
   font-weight: 500;
}

.test-utils {
   display: flex;
   gap: 10px;
}

.btn-util {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 12px 20px;
   border-radius: 12px;
   font-size: 0.95rem;
   font-weight: 600;
   background: var(--white);
   border: 2px solid #e2e8f0;
   color: #475569;
   cursor: pointer;
   transition: var(--transition);
   font-family: inherit;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.btn-util:hover {
   background: var(--white);
   border-color: var(--primary-color);
   transform: translateY(-3px);
   box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.btn-util i {
   color: var(--primary-color);
   font-size: 1.1em;
}

/* Question Card - Matching Test Page Card Style */
.question-card {
   background: var(--white);
   border-radius: 24px;
   padding: 44px;
   margin-bottom: 30px;
   box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
   border: 1px solid rgba(255, 255, 255, 0.8);
   transition: var(--transition);
   position: relative;
   overflow: hidden;
}

.question-card::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   height: 4px;
   background: var(--gradient);
}

.question-card:hover {
   box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.08);
   transform: translateY(-2px);
}

.question-header {
   margin-bottom: 32px;
   padding-bottom: 24px;
   border-bottom: 2px solid #f1f5f9;
   display: flex;
   align-items: center;
   gap: 12px;
}

.q-badge {
   background: var(--gradient);
   color: var(--white);
   padding: 10px 20px;
   border-radius: 24px;
   font-size: 1rem;
   font-weight: 700;
   box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
   letter-spacing: 0.02em;
}

.question-content {
   font-size: 1.2rem;
   line-height: 1.8;
   color: var(--text-color);
   margin-bottom: 40px;
   font-weight: 500;
}

.question-content img {
   max-width: 100%;
   height: auto;
   border-radius: 16px;
   border: 1px solid #e2e8f0;
   margin: 24px 0;
   display: block;
   box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Answer Section */
.answer-section {
   background: var(--light-gray);
   border-radius: var(--border-radius);
   padding: 30px;
   border: 1px solid rgba(37, 99, 235, 0.1);
}

.answer-textarea {
   width: 100%;
   min-height: 150px;
   padding: 20px;
   border: 2px solid #e2e8f0;
   border-radius: 12px;
   font-size: 1.05rem;
   line-height: 1.6;
   resize: vertical;
   margin-bottom: 20px;
   font-family: inherit;
   transition: var(--transition);
   background: var(--white);
}

.answer-textarea:focus {
   outline: none;
   border-color: var(--primary-color);
   box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-check-answer {
   width: 100%;
   padding: 16px;
   background: var(--white);
   border: 2px solid var(--primary-color);
   color: var(--primary-color);
   border-radius: 12px;
   font-weight: 700;
   font-size: 1rem;
   cursor: pointer;
   transition: var(--transition);
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   font-family: inherit;
}

.btn-check-answer:hover {
   background: #eff6ff;
   transform: translateY(-2px);
   box-shadow: var(--shadow-md);
}

.btn-check-answer.active {
   background: var(--gradient);
   color: var(--white);
   border-color: transparent;
   box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.correct-answer-box {
   margin-top: 25px;
   padding: 25px;
   background: #f0fdf4;
   border: 2px solid #bbf7d0;
   border-radius: 12px;
   color: #166534;
   font-size: 1.05rem;
   line-height: 1.6;
   animation: slideDown 0.3s ease;
}

.correct-answer-box img {
   max-width: 100%;
   border-radius: 8px;
   margin-top: 10px;
}

/* OMR Card - Matching Test Page Card Style */
.omr-card {
   background: var(--white);
   border-radius: 24px;
   padding: 28px;
   box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
   border: 1px solid rgba(255, 255, 255, 0.8);
}

.omr-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 20px;
   font-weight: 700;
   color: var(--text-color);
   font-size: 1.1rem;
}

.achieve-tools {
   display: flex;
   justify-content: center;
   gap: 12px;
   margin-bottom: 20px;
   padding-bottom: 20px;
   border-bottom: 2px solid #f1f5f9;
}

.btn-achieve {
   width: 44px;
   height: 44px;
   border-radius: 50%;
   border: 2px solid #e2e8f0;
   background: var(--white);
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   transition: var(--transition);
   font-size: 1.2rem;
}

.btn-achieve:hover {
   transform: scale(1.15);
   box-shadow: var(--shadow-sm);
}

.btn-achieve[data-check="C"]:hover,
.btn-achieve[data-check="C"].active {
   border-color: #10b981;
   color: #10b981;
   background: #ecfdf5;
   box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-achieve[data-check="Q"]:hover,
.btn-achieve[data-check="Q"].active {
   border-color: #f59e0b;
   color: #f59e0b;
   background: #fffbeb;
   box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
}

.btn-achieve[data-check="W"]:hover,
.btn-achieve[data-check="W"].active {
   border-color: #ef4444;
   color: #ef4444;
   background: #fef2f2;
   box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.omr-grid {
   display: grid;
   grid-template-columns: repeat(5, 1fr);
   gap: 10px;
   margin-bottom: 25px;
   max-height: 400px;
   overflow-y: auto;
   padding-right: 5px;
}

.omr-item {
   aspect-ratio: 1;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 10px;
   background: #f1f5f9;
   color: var(--dark-gray);
   font-weight: 600;
   font-size: 0.9rem;
   cursor: pointer;
   transition: var(--transition);
   border: 2px solid transparent;
}

.omr-item:hover {
   background: #e2e8f0;
   transform: scale(1.05);
}

.omr-item.active {
   background: var(--gradient);
   color: var(--white);
   box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
   transform: scale(1.05);
}

.omr-item.correct {
   background: #10b981;
   color: var(--white);
   box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.omr-item.wrong {
   background: #ef4444;
   color: var(--white);
   box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.omr-item.check {
   background: #f59e0b;
   color: var(--white);
   box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.omr-actions {
   display: flex;
   flex-direction: column;
   gap: 12px;
}

.btn-submit {
   width: 100%;
   padding: 16px;
   background: var(--gradient);
   color: var(--white);
   border: none;
   border-radius: 12px;
   font-weight: 700;
   font-size: 1rem;
   cursor: pointer;
   transition: var(--transition);
   box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
   font-family: inherit;
}

.btn-submit:hover {
   transform: translateY(-3px);
   box-shadow: 0 8px 16px rgba(37, 99, 235, 0.4);
}

.btn-report {
   width: 100%;
   padding: 12px;
   background: #fff1f2;
   color: #be123c;
   border: 2px solid #fecdd3;
   border-radius: 12px;
   font-weight: 600;
   cursor: pointer;
   transition: var(--transition);
   font-family: inherit;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
}

.btn-report:hover {
   background: #ffe4e6;
   transform: translateY(-2px);
   box-shadow: var(--shadow-sm);
}

/* Animations */
@keyframes slideDown {
   from {
      opacity: 0;
      transform: translateY(-10px);
   }

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

/* Responsive */
@media (max-width: 1024px) {
   .test-layout {
      flex-direction: column;
   }

   .test-sidebar {
      width: 100%;
      position: static;
      order: 2;
   }
}

@media (max-width: 768px) {
   .test-solve-container {
      padding-top: 100px;
   }

   .test-header-card {
      flex-direction: column;
      align-items: flex-start;
   }

   .test-utils {
      width: 100%;
      justify-content: space-between;
   }

   .btn-util {
      flex: 1;
      justify-content: center;
   }
}