/*
 * Frontend CSS cho Plugin Thi Online
 * Version: 1.0.1 - Optimized
 */

/* ==================== RESET & GLOBAL ==================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.text-ellipsis-2 {
  width: 100%;
  overflow: hidden !important;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box;
}
.fill-blank-hint {
  font-size: 14px;
  color: #666;
}
.exam-list-wrapper,
.exam-detail-wrapper,
.exam-test-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #333;
  line-height: 1.6;
}

.exam-error {
  background: #f8d7da;
  color: #721c24;
  padding: 20px;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  text-align: center;
  margin: 20px auto;
  max-width: 600px;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: flex;
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  justify-content: center;
  align-items: center;
  min-height: 40px;
}

.btn-primary {
  background: #2271b1;
  color: #fff;
}

.btn-primary:hover {
  background: #135e96;
  box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.btn-primary:disabled {
  background: #6c757d;
  color: #fff;
  cursor: not-allowed;
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
}

.btn-secondary:hover {
  background: #545b62;
}

.btn-warning {
  background: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background: #e0a800;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-outlined {
  background: transparent;
  border: 2px solid #2271b1;
  color: #2271b1;
}

.btn-outlined:hover {
  background: #2271b1;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.btn-outline {
  background: transparent;
  color: #2271b1;
  border: 2px solid #2271b1;
}

.btn-outline:hover {
  background: #2271b1;
  color: #fff;
}

.btn-detail {
  background: #fff;
  color: #2271b1;
  border: 1px solid #2271b1;
}

.btn-detail:hover {
  background: #f0f6fc;
}

.btn-show-answers {
  width: 100%;
  padding: 10px;
  background: #f0f6fc;
  color: #2271b1;
  border: 1px solid #2271b1;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-show-answers:hover {
  background: #2271b1;
  color: #fff;
}

/* ==================== BADGES ==================== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.badge-subject {
  background: #e7f5ff;
  color: #0c5686;
}

.badge-category {
  background: #fff3cd;
  color: #856404;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-danger {
  background: #f8d7da;
  color: #721c24;
}

.badge-info {
  background: #d1ecf1;
  color: #0c5460;
}

.badge-passed {
  color: #28a745;
}

.badge-failed {
  color: #dc3545;
}

/* Badge variants for exam-detail-header */
.exam-badges-row .badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 14px;
}

/* ==================== CARDS ==================== */
.exam-card,
.info-card,
.question-card,
.result-item,
.subject-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.exam-card:hover,
.info-card:hover,
.subject-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.exam-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}

.subject-card {
  padding: 30px;
  text-align: center;
  text-decoration: none;
}

.info-card {
  padding: 25px;
  margin-bottom: 20px;
  width: 100%;
  overflow: hidden;
}

.question-card {
  padding: 25px;
}

.result-item {
  padding: 16px 20px;
  border: 2px solid #f0f0f0;
}

.result-item.passed {
  border-color: #d4edda;
  background: #f8fff9;
}

.result-item.failed {
  border-color: #f8d7da;
  background: #fffafa;
}

/* ==================== MODAL ==================== */
.exam-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 2px solid #f0f0f0;
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 2px solid #f0f0f0;
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* ==================== FORM ELEMENTS ==================== */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="number"],
select,
textarea,
.filter-input,
.filter-select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* ==================== EXAM LIST ==================== */

.exam-list-header {
  text-align: center;
  margin-bottom: 20px;
}

.exam-list-header h1 {
  font-size: 32px;
  color: #2271b1;
  margin-bottom: 10px;
  line-height: 1.2;
}

.exam-list-description {
  color: #666;
  font-size: 16px;
}

.exam-filters-section {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.exam-filter-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 15px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

.subjects-grid {
  margin-bottom: 40px;
}

.subjects-grid h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

.subjects-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.subject-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.subject-card h3 {
  color: #2271b1;
  font-size: 18px;
  margin-bottom: 8px;
}

.subject-card p {
  color: #666;
  margin: 0;
}

.exams-grid h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

.exam-count {
  color: #666;
  font-size: 18px;
  font-weight: normal;
}

.exams-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.exam-card-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exam-title {
  font-size: 18px;
  color: #333;
  margin: 0;
  line-height: 1.4;
}

.exam-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.exam-description {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.exam-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 14px;
}

.meta-icon {
  font-size: 16px;
}

.exam-card-footer {
  display: flex;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.exam-card-footer > * {
  flex: 1;
}

.no-exams-found,
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-exams-icon,
.no-results-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.no-exams-found h3,
.no-results h3 {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}

.no-exams-found p,
.no-results p {
  color: #666;
  margin-bottom: 20px;
}

.no-results h3 {
  font-size: 22px;
}

/* ==================== EXAM DETAIL ==================== */

.exam-breadcrumb {
  margin-bottom: 20px;
}

.exam-breadcrumb a {
  color: #2271b1;
  text-decoration: none;
  font-size: 14px;
}

.exam-breadcrumb a:hover {
  text-decoration: underline;
}

.exam-detail-header {
  background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
  color: #fff;
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(34, 113, 177, 0.3);
}

.exam-detail-header h1 {
  font-size: 32px;
  margin: 0 0 15px 0;
  color: #fff;
}

.exam-header-content {
  /* Container for header content */
}

.exam-badges-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.exam-header-description {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0;
}

.exam-detail-grid {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 30px;
}

.exam-info-column {
  /* Left column for exam info */
}

.exam-results-column {
  width: 100%;
  overflow: hidden;
}

.info-card h2 {
  font-size: 18px;
  color: #333;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

.info-stats,
.question-types {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-row,
.type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

.stat-row:last-child,
.type-row:last-child {
  border-bottom: none;
}

.stat-label {
  color: #666;
}

.stat-value {
  font-weight: 600;
  color: #2271b1;
}

.attempt-status {
  border: 2px solid #f0f0f0;
}

.status-allowed,
.status-blocked,
.status-in-progress {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.status-allowed {
  background: #d4edda;
  border: 2px solid #28a745;
}

.status-blocked {
  background: #f8d7da;
  border: 2px solid #dc3545;
}

.status-in-progress {
  background: #fff3cd;
  border: 2px solid #ffc107;
}

.status-icon {
  font-size: 32px;
}

.status-text p {
  margin: 5px 0;
  color: #333;
}

.results-intro {
  color: #666;
  margin-bottom: 20px;
  font-size: 14px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.result-number {
  font-weight: 600;
  color: #333;
}

.result-badge {
  /* Badge for result status (passed/failed) - uses badge-passed/badge-failed */
}

.result-score {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 15px;
}

.score-circle {
  position: relative;
  width: 80px;
  height: 80px;
}

.score-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: #f0f0f0;
  stroke-width: 3;
}

.circle-progress {
  fill: none;
  stroke: #2271b1;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s;
}

.result-item.passed .circle-progress {
  stroke: #28a745;
}

.result-item.failed .circle-progress {
  stroke: #dc3545;
}

.score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: bold;
  color: #2271b1;
}

.score-details p {
  margin: 5px 0;
  color: #333;
}

.result-time {
  font-size: 13px;
  color: #666;
}

.detailed-answers {
  margin-top: 15px;
  padding-top: 15px;
}

.answer-detail {
  padding: 16px;
  margin-bottom: 15px;
  border-radius: 8px;
  border-left: 5px solid #e0e0e0;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}


.answer-detail.correct {
  border-left-color: #28a745;
}

.answer-detail.incorrect {
  border-left-color: #dc3545;
}

.question-number {
  font-size: 18px;
  font-weight: bold;
  color: #2271b1;
}

.mb-3 {
  margin-bottom: 12px;
}

.question-guide {
  background: #fff9e6;
  padding: 14px 16px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  border-left: 3px solid #ffc107;
}

.question-guide strong {
  display: block;
  margin-bottom: 8px;
  color: #856404;
  font-size: 15px;
}

.essay-answer {
  /* Container for essay answer display */
}

.answer-info {
  font-size: 15px;
  color: #495057;
  font-weight: 500;
  display: flex;  
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}


.answer-info p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.answer-info strong {
  font-weight: 600;
}

/* User Answer Section */
.user-answer-section {
  margin: 16px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}


.user-answer-section > strong {
  display: block;
  color: #333;
  font-size: 15px;
  font-weight: 600;
}

.user-answer-text {
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  margin-top: 6px;
  word-wrap: break-word;
  line-height: 1.5;
  color: #212529;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.user-answer-text.no-answer {
  color: #999;
  font-style: italic;
}

.user-answer-file {
  margin-top: 10px;
  padding: 8px 12px;
  background: #e7f3ff;
  border-radius: 4px;
  border-left: 3px solid #2271b1;
}

.user-answer-file strong {
  display: inline;
  margin-right: 8px;
  color: #2271b1;
}

.file-attachment-name {
  color: #333;
  font-weight: 500;
}

.file-attachment-link {
  color: #2271b1;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.file-attachment-link:hover {
  border-bottom-color: #2271b1;
  text-decoration: none;
}



.correct-answer-section > strong {
  display: block;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.correct-answer-text {
  margin-top: 10px;
  word-wrap: break-word;
  line-height: 1.7;
}

/* ==================== EXAM TEST ==================== */

.exam-test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.header-left h1 {
  margin: 0 0 5px 0;
  font-size: 24px;
  color: #333;
}

.header-left p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.header-right {
  /* Right side of exam test header */
}

.timer-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  background: #f0f6fc;
  border: 2px solid #2271b1;
  border-radius: 8px;
}

.timer-icon {
  font-size: 24px;
}

.timer-text {
  font-size: 24px;
  font-weight: bold;
  color: #2271b1;
  font-family: "Courier New", monospace;
}

/* ==================== EXAM TEST LAYOUT ==================== */
.exam-main-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  margin-top: 30px;
}

.exam-question-column {
  /* Left column for current question */
}

.exam-questions-list-column {
  /* Right column for questions list */
  position: sticky;
  top: 20px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.exam-questions-container {
  margin-bottom: 20px;
}

.question-card {
  display: none;
}

.question-card.active {
  display: block;
}

.question-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  gap: 10px;
}

.question-navigation .btn svg {
  display: block;
}

.question-counter {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.questions-list-header {
  background: #fff;
  padding: 15px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid #f0f0f0;
}

.questions-list-header h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #333;
}

.answered-count {
  font-size: 14px;
  color: #666;
}

.answered-count strong {
  color: #2271b1;
}

.answered-count span {
  color: #333;
  font-weight: 600;
}

.questions-list {
  background: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

.question-list-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  background: #f9f9f9;
  position: relative;
}

.question-list-item:hover {
  border-color: #2271b1;
  background: #f0f6fc;
  transform: translateY(-2px);
}

.question-list-item.current {
  border-color: #2271b1;
  background: #e7f5ff;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
}

.question-list-item.answered {
  background: #d4edda;
  border-color: #28a745;
}

.question-list-item.answered .status-icon {
  color: #28a745;
}

.question-list-item.current.answered {
  background: #c3e6cb;
  border-color: #28a745;
}

.item-number {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}



.question-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.question-points {
  background: #fff3cd;
  color: #856404;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.question-type-badge {
  background: #e7f5ff;
  color: #0c5686;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}

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

.question-answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-option {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.answer-option:hover {
  background: #f0f6fc;
  border-color: #2271b1;
}

.answer-option input[type="radio"],
.answer-option input[type="checkbox"] {
  margin-right: 12px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.answer-option input:checked + .option-label {
  color: #2271b1;
  font-weight: 600;
}

.option-label {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
}

.multiple-hint {
  background: #fff3cd;
  color: #856404;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 14px;
}

.essay-textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s;
}

.essay-textarea:focus {
  outline: none;
  border-color: #2271b1;
}

.file-upload-section {
  margin-top: 15px;
}

.file-upload-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #f0f6fc;
  color: #2271b1;
  border: 1px solid #2271b1;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.file-upload-btn:hover {
  background: #2271b1;
  color: #fff;
}

.file-upload-btn input,
.file-input {
  display: none;
}

.uploaded-files {
  margin-top: 10px;
}

.uploaded-file {
  padding: 8px 12px;
  background: #d4edda;
  color: #155724;
  border-radius: 4px;
  font-size: 14px;
}

.exam-submit-section {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 30px 20px;
}

.result-summary {
  text-align: center;
}

.result-icon {
  font-size: 80px;
  margin-bottom: 10px;
}

.result-summary h3 {
  font-size: 28px;
}

.result-score-big {
  font-size: 54px;
  font-weight: bold;
  color: #2271b1;
  margin-bottom: 10px;
}

.result-summary.passed .result-score-big {
  color: #28a745;
}

.result-summary.failed .result-score-big {
  color: #dc3545;
}

.save-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: #fff;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  animation: slideIn 0.3s, slideOut 0.3s 1.7s;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==================== UTILITIES ==================== */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2271b1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  animation: slideInRight 0.3s, slideOutRight 0.3s 2.7s;
}

.notification.success {
  background: #28a745;
  color: #fff;
}

.notification.error {
  background: #dc3545;
  color: #fff;
}

.notification.info {
  background: #17a2b8;
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

*:focus-visible {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .result-item {
    padding: 16px 12px;
  }
  .question-header {
    gap: 10px;
  }
  .result-icon {
    margin-bottom: 0;
  }
  .modal-body{
    padding: 16px;
  }
  .question-navigation {
    box-shadow: none;
    padding: 0;
    background: transparent;
  }
  .question-card{
    padding: 16px;
  }
  .exam-card {
    gap: 8px;
  }
  .info-card {
    padding: 16px;
  }
  .status-allowed,
  .status-blocked,
  .status-in-progress {
    padding: 8px 12px;
  }
  .exam-detail-header {
    padding: 16px;
  }
  .status-icon {
    font-size: 24px;
  }
  .answer-detail {
    padding: 12px;
    margin-bottom: 12px;
  }

  .user-answer-section {
    padding: 14px;
    margin: 14px 0;
  }

  .user-answer-text {
    padding: 10px 12px;
    font-size: 14px;
  }

  .answer-info {
    margin-top: 14px;
    padding-top: 14px;
    font-size: 14px;
  }

  .exam-filter-form {
    grid-template-columns: 1fr;
  }

  .exams-list {
    grid-template-columns: 1fr;
  }

  .subjects-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .exam-meta {
    grid-template-columns: 1fr;
  }

  .exam-test-header {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .header-left {
    text-align: center;
  }

  .exam-submit-section {
    flex-direction: column;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-content {
    width: 95%;
    margin: 10px;
  }

  .exam-main-content {
    grid-template-columns: 1fr;
    //reverse column
    flex-direction: column-reverse;

  }

  .exam-questions-list-column {
    position: static;
    max-height: none;
  }

  .questions-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 968px) {
  .exam-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  .notification {
    left: 10px;
    right: 10px;
    top: 10px;
  }
}
