/* =========================================
   ROOT BRAND VARIABLES
========================================= */

:root {
  --primary: #DDF247;
  --dark: #333;
  --light-bg: #f4f6f9;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
}

/* =========================================
   RESET
========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  background: var(--light-bg);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text);
}

/* =========================================
   WRAPPER
========================================= */

.main-wrapper {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  transition: 0.3s ease;
}

/* =========================================
   CARD
========================================= */

.card {
  background: var(--card-bg);
  padding: 45px 40px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: 0.3s ease;
}

/* =========================================
   HEADINGS
========================================= */

h1 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

h3 {
  font-size: 13px;
  text-align: center;
  color: #6b7280;
  margin-bottom: 28px;
}

/* =========================================
   TABS
========================================= */

.tabs {
  display: flex;
  background: #f3f4f6;
  padding: 4px;
  gap: 8px;
  border-radius: 10px;
  margin-bottom: 28px;
}

.tabs button {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: #6b7280;
  transition: 0.2s ease;
}

.tabs button.active-tab {
  background: var(--dark);
  color: white;
}

.tabs button:hover {
  background: var(--dark);
  color: white;
}

/* =========================================
   INPUTS
========================================= */

input {
  width: 100%;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  transition: 0.2s ease;
}

input:focus {
  outline: none;
  border-color: #b2b1b1;
}

/* =========================================
   BUTTONS
========================================= */

button {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  color: #333;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background-color: #cfea03;
  color: #000;
}

/* =========================================
   ERROR
========================================= */

.form-error {
  font-size: 12px;
  color: #dc2626;
  text-align: center;
  margin-top: 6px;
  opacity: 0;
  transition: 0.2s ease;
}

.form-error.show {
  opacity: 1;
}

/* =========================================
   DASHBOARD
========================================= */

#dashboard-page h1 {
  margin-bottom: 20px;
}

#dashboard-page p {
  margin-bottom: 10px;
}

#exam-section {
  background: #f9fafb;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

#attempted-section {
  background: #fff7ed;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #fed7aa;
}

/* =========================================
   FULLSCREEN EXAM MODE
========================================= */

body.exam-active {
  display: block !important;
  background: #f3f4f6;
}

body.exam-active .main-wrapper {
  max-width: 100% !important;
  padding: 0 !important;
}

body.exam-active .card {
  border-radius: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  width: 100% !important;
}

/* =========================================
   EXAM HEADER
========================================= */

.exam-header {
  background: var(--dark);
  color: var(--primary);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exam-header h2 {
  font-size: 18px;
  color: var(--primary);
}

#timer {
  background: var(--primary);
  color: black;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
}

/* =========================================
   EXAM BODY
========================================= */

#exam-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.exam-body {
  flex: 1;
  overflow-y: auto;
  padding: 50px 100px;
  background: #f9fafb;
}

/* =========================================
   QUESTION CARD
========================================= */

#questions-container > div {
  background: white;
  padding: 25px;
  border-radius: 14px;
  margin-bottom: 25px;
  border: 1px solid var(--border);
  transition: 0.25s ease;
}

#questions-container > div:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  border-color: var(--primary);
}

#questions-container p {
  font-weight: 700;
  margin-bottom: 14px;
}

/* =========================================
   OPTIONS
========================================= */

label {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.2s ease;
  background: #fafafa;
}

label:hover {
  border-color: var(--dark);
  background: #f3f4f6;
}

input[type="radio"] {
  margin-right: 8px;
  accent-color: var(--primary);
}

/* =========================================
   EXAM FOOTER
========================================= */

.exam-footer {
  padding: 20px 40px;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.exam-footer button {
  width: auto;
  padding: 14px 30px;
  font-weight: 700;
  background: var(--dark);
  color: var(--primary);
}

.exam-footer button:hover {
  background: var(--primary);
  color: black;
}

/* =========================================
   SCROLLBAR
========================================= */

.exam-body::-webkit-scrollbar {
  width: 8px;
}

.exam-body::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* =========================================
   MODERN EXAM OPTION UI
   Theme: #DDF247 + #333
========================================= */

.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 10px;
}

/* Hide default radio */
.option-item input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #333;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Inner circle */
.option-item input[type="radio"]::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: 0.2s ease;
}

/* When selected */
.option-item input[type="radio"]:checked {
  border-color: #333;
  background: #DDF247;
}

.option-item input[type="radio"]:checked::before {
  transform: translate(-50%, -50%) scale(1);
}

/* 🔥 Full Background Change */
.option-item:has(input[type="radio"]:checked) {
  border: 1px solid #333;
  color: #000;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Hover effect */
.option-item:hover {
  border-color: #333;
  transform: translateY(-2px);
}

/* =========================================
   FOOTER
========================================= */

.footer-auth {
  margin-top: 19px;
  font-size: 14px;
  color: #333;
  text-align: center;
}

/* .footer {
  color: #333;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  padding: 20px;
  margin-bottom: 40%;
} */

/* ===============================
   DASHBOARD IMPROVEMENTS
================================ */

/* Welcome */
.welcome-text {
  font-weight: 600;
  margin-bottom: 25px;
  font-size: 15px;
  color: #333;
}
/* =========================================
   PREMIUM DASHBOARD CARD
========================================= */

.exam-info {
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  border-radius: 18px;
  padding: 30px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
  transition: 0.3s ease;
}

.exam-info:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

/* =========================================
   EXAM DETAILS SECTION
========================================= */

.exam-details {
  background: #f3f4f6;
  padding: 18px 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  font-size: 14px;
  line-height: 1.8;
  border-left: 4px solid var(--primary);
}

.exam-details p {
  margin-bottom: 6px;
  font-weight: 500;
}

/* =========================================
   RED WARNING INSTRUCTION BOX
========================================= */

.instruction-box {
  background: #fff1f2;
  border: 1px solid #fecaca;
  border-left: 6px solid #dc2626;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 35px;
  margin-top: 35px;
  box-shadow: 0 5px 15px rgba(220, 38, 38, 0.08);
}

.instruction-box h3 {
  color: #b91c1c;
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 700;
}

.instruction-box ul {
  padding-left: 18px;
}

.instruction-box li {
  font-size: 13px;
  color: #7f1d1d;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Highlight Disqualification Text */
.instruction-box strong {
  color: #dc2626;
}



/* =========================================
   START BUTTON SECTION
========================================= */

.start-btn-wrapper {
  text-align: center;
}

.start-btn-wrapper button {
  width: 220px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  background: var(--primary);
  color: #000;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(221, 242, 71, 0.3);
}

.start-btn-wrapper button:hover {
  background: var(--dark);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

 
/* Final Score */
.final-score {
  font-weight: 600;
  font-size: 15px;
  color: #333;
}



/* Logout Section */
.logout-wrapper {
  margin-top: 30px;
}


/* =========================================
   WIDE DASHBOARD LAYOUT ONLY
========================================= */

#dashboard-page {
  width: 100%;
}

body:has(#dashboard-page[style*="block"]) .main-wrapper {
  max-width: 1100px; 
}

.dashboard-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

#welcome-text {
  font-weight: 600;
  font-size: 15px;
  color: #333;
}

/* Logout Link */
.logout-link {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #333;
  transition: 0.2s ease;
}

.logout-link:hover {
  color: #dc2626;
  text-decoration: underline;
}

/* Header Image Styling */
.auth-header-image {
  width: 100%;
  padding-bottom: 20px;   /* space below image */
}

.auth-header-image img {
  width: 100%;
  height: au;          /* adjust height if needed */
  object-fit: fill;      /* keeps image nicely cropped */
  border-radius: 8px 8px 0 0; /* optional rounded top corners */
  display: block;
}

button:disabled {
  transform: none !important;
}

#exam-form {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.auth-header-image img {
  height: auto;   /* FIXED TYPO */
}

/* Selected option fallback */
.option-item.selected {
  border: 1px solid #333;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#exam-page {
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 80px; /* space for footer */
}

.exam-footer {
  bottom: 0;
  background: #fff;
  padding: 15px;
  border-top: 1px solid #ddd;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 10px;
  text-align: left;
}

/* Hide default radio */
.option-item input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #333;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* Inner dot */
.option-item input[type="radio"]::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: 0.2s ease;
}

/* When selected */
.option-item input[type="radio"]:checked {
  border-color: #333;
  background: #DDF247;
}

.option-item input[type="radio"]:checked::before {
  transform: translate(-50%, -50%) scale(1);
}

/* Highlight whole option when selected */
.option-item:has(input[type="radio"]:checked) {
  border: 1px solid #333;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.help-note {
  margin-top: 20px;
  font-size: 14px;
  text-align: center;
  color: #666;
}

.help-note a {
  color: #2b6cb0;
  text-decoration: none;
  font-weight: 500;
}

.help-note a:hover {
  text-decoration: underline;
}