/* ============================================
/* ============================================
   RESET & BASE STYLES
   ============================================ */

/* ============================================
   MAIN CONTAINER (GLASSMORPHISM + 3D)
   ============================================ */

body {
  -webkit-user-select: none; /* برای کروم و سافاری موبایل */
  user-select: none; /* برای مرورگرهای دیگر */
}




.exam-wrapper {
  width: 100%;

  height: auto;
  max-height: 95vh;
  background: rgba(15, 35, 30, 0.5);
  backdrop-filter: blur(16px);
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 35px 55px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.2);
  overflow-y: auto;
  transition: transform 0.2s, box-shadow 0.3s;
}

.exam-wrapper:hover {
  box-shadow: 0 40px 65px rgba(0, 0, 0, 0.6);
  transform: translateY(-3px);
}

/* Scrollbar Styling */
.exam-wrapper::-webkit-scrollbar {
  width: 6px;
}
.exam-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
.exam-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 200, 120, 0.6);
  border-radius: 10px;
}

/* ============================================
   STICKY HEADER
   ============================================ */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 34, 41, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid rgba(255, 200, 100, 0.5);
  border-radius: 2rem 2rem 0 0;
  padding: 1rem 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.title-section h1 {
  font-size: 2.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #FFE6B0, #FFC76E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-section p {
  font-size: 0.7rem;
  color: #FFE2B5;
  margin-top: 4px;
}

/* ============================================
   3D TIMER
   ============================================ */
.timer-3d {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  border-radius: 60px;
  padding: 0.5rem 1.3rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;

  gap: 20px;
  border: 1px solid rgba(255, 200, 100, 0.5);
}

.timer-label {
  /* font-weight: 600; */
  color: #FFE2B5;
  /* font-size: 0.85rem; */
}

#timerDisplay {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: monospace;
  letter-spacing: 2px;
  color: #FFE0A3;
  text-shadow: 0 0 8px #ffb347;
}

/* ============================================
   PROGRESS BAR SECTION
   ============================================ */
.progress-sticky-row {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 60px;
}

.progress-bar-3d {
  flex: 3;
  background: rgba(255, 255, 240, 0.25);
  border-radius: 40px;
  height: 10px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #FFD966, #FFA559);
  width: 0%;
  height: 100%;
  border-radius: 40px;
  transition: width 0.3s ease;
  box-shadow: 0 0 6px #FFB347;
}

.answered-counter-sticky {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 0.3rem 1.2rem;
  border-radius: 40px;
  font-weight: 700;
  color: #FFEFCF;
  font-size: 0.85rem;
}

/* ============================================
   QUESTIONS FORM
   ============================================ */
.questions-form {
  padding: 1.5rem 2rem 2rem;
}

/* ============================================
   QUESTION CARD (3D GLASS)
   ============================================ */
.question-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 1.8rem;
  padding: 1.5rem 1.8rem;
  margin-bottom: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.question-card:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 200, 100, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.3);
}

/* Question Header */
.q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.q-badge {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.q-num {
  background: rgba(0, 0, 0, 0.5);
  padding: 0.2rem 1rem;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFDEB3;
}

.q-type {
  background: rgba(255, 180, 70, 0.25);
  padding: 0.2rem 0.9rem;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #FFD8A5;
  border: 0.5px solid rgba(255, 200, 100, 0.5);
}

/* Question Text */
.q-text {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0.7rem 0 1rem 0;
  color: white;
  line-height: 1.45;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   CLEAR ANSWER BUTTON (3D)
   ============================================ */
.clear-btn-3d {
  background: rgba(180, 60, 50, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 120, 100, 0.6);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.7rem;
  color: #FFDDCC;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 5px;
}

.clear-btn-3d:hover {
  background: rgba(200, 70, 50, 0.9);
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  color: white;
}

.clear-btn-3d:active {
  transform: translateY(2px) scale(0.96);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   OPTIONS LIST (MCQ) - 3D BUTTONS
   ============================================ */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.8rem 1.2rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.option-item:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #FFC285;
  transform: translateX(5px) translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.option-item:active {
  transform: translateX(3px) translateY(1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Selected state for option (when radio checked) */
.option-item:has(input[type="radio"]:checked) {
  background: rgba(255, 180, 70, 0.3);
  border-color: #FFB347;
  box-shadow: 0 0 12px rgba(255, 180, 70, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

input[type="radio"] {
  accent-color: #FFB347;
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.option-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #FEF3DF;
  flex: 1;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* ============================================
   ESSAY SECTION
   ============================================ */
.essay-area textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 240, 0.35);
  border-radius: 1.2rem;
  padding: 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: #fff3e0;
  resize: vertical;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
}

.essay-area textarea:focus {
  outline: none;
  border-color: #FFB347;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px rgba(255, 180, 70, 0.2), inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.essay-area textarea::placeholder {
  color: rgba(255, 245, 210, 0.6);
}

small.hint {
  color: rgba(255, 235, 190, 0.7);
  font-size: 0.7rem;
  margin-top: 0.4rem;
  display: block;
}

/* ============================================
   SUBMIT BUTTON (3D GLASS IOS STYLE)
   ============================================ */
.ios-glass-btn {
  position: relative;
  padding: 14px 34px;
  font-size: 1rem;
  font-weight: 700;
  color: #FFEFCF;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(30px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.3), inset 0 -4px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: 0.15s ease;
  overflow: hidden;
}

.ios-glass-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
  opacity: 0.3;
  pointer-events: none;
}

.ios-glass-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(178, 255, 243, 0.4), transparent);
  transform: skewX(-20deg);
  transition: 0.6s;
}

.ios-glass-btn:hover::before {
  left: 130%;
}

.ios-glass-btn:hover {
  transform: translateY(-3px) scale(1.02);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.45);
}

.ios-glass-btn:active {
  transform: scale(0.96);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.submit-area {
  display: flex;
  justify-content: center;
  margin: 2rem 0 1rem;
}

/* ============================================
   RESULT MODAL (3D GLASS)
   ============================================ */
.result-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-card {
  background: rgba(20, 31, 45, 0.95);
  backdrop-filter: blur(24px);
  border-radius: 2rem;
  max-width: 90%;
  width: 550px;
  padding: 1.8rem;
  border: 1px solid rgba(255, 215, 150, 0.5);
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.5);
  color: white;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-card h3 {
  font-size: 1.7rem;
  background: linear-gradient(135deg, #FFE6B0, #FFC76E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
}

.result-details {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 1.2rem;
  padding: 1rem;
  margin: 1rem 0;
  max-height: 55vh;
  overflow-y: auto;
}

.close-modal {
  background: rgba(255, 255, 240, 0.15);
  border: 1px solid rgba(255, 200, 100, 0.6);
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  color: #FFEFCF;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  margin: 0 auto;
}

.close-modal:hover {
  background: rgba(255, 200, 100, 0.3);
  transform: scale(1.02);
}

/* ============================================
   FOOTER
   ============================================ */
.exam-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.7rem;
  color: #e2dccd;
  border-top: 1px solid rgba(255, 255, 200, 0.2);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  body {
    padding: 0.6rem;
  }
  .sticky-header {
    padding: 0.8rem 1rem;
  }
  .questions-form {
    padding: 1rem;
  }
  .question-card {
    padding: 1rem;
  }
  .q-text {
    font-size: 1rem;
  }
  .timer-3d #timerDisplay {
    font-size: 1.3rem;
  }
  .timer-3d {
    padding: 0.3rem 1rem;
  }
  .clear-btn-3d {
    padding: 0.25rem 0.8rem;
    font-size: 0.65rem;
  }
  .option-item {
    padding: 0.6rem 1rem;
  }
  .option-label {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .title-section h1 {
    font-size: 1.2rem;
  }
  .modal-card {
    width: 95%;
    padding: 1.2rem;
  }
}