/* === Base Layout === */
body {
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
}

pre {
  background-color: #1f2937;
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  overflow-x: auto;
}

code {
  font-family: monospace;
}

.progress-bar-container {
  width: 100%;
  height: 0.4rem;
  background-color: #1e293b;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

#progress-bar-fill {
  margin: 0;
  padding: 0;
  width: 0%;
  background-color: #3b82f6;
  height: 100%;
  border-radius: 9999px 0 0 9999px;
  transition: width 0.3s ease-in-out;
}

.progress-bar-complete {
  background-color: #22c55e;
}

#quiz-container {
  min-height: calc(100vh - 2.5rem);
  box-sizing: border-box;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#analytics-container {
  max-width: 800px;
  margin: 1rem auto;
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  text-align: center;
}

#analytics-container h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

#analytics-container p {
  font-size: 1rem;
  color: #4b5563;
  margin: 0.5rem 0;
}

#analytics-container span {
  font-weight: 500;
  color: #3b82f6;
}

#question-content {
  flex-grow: 1;
}

#score-display {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  color: #fef9c3;
  line-height: 1.3;
  letter-spacing: 0.02rem;
  font-family: 'Poppins', Arial, sans-serif;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 0.3rem;
  padding: 0.25rem 0.5rem;
  margin: 0.5rem 0;
  white-space: nowrap;
  direction: ltr;
}

#score-display-wrapper {
  background-color: #2563eb;
  border-radius: 0.3rem;
  padding: 0.25rem 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 160px;
  max-width: 180px;
  margin: 0 auto;
}

#tip-container {
  margin-top: 1rem;
  display: block;
}

#tip-btn {
  display: block;
  width: 100%;
  max-width: 140px; /* or whatever width you like */
  padding: 0.5rem 1rem;
  background-color: #5ba269;
  color: white;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  margin: 0 auto;
  transition: background-color 0.2s ease-in-out;
  text-align: center;
}

#tip-btn:hover {
  background-color: #04ca46;
}

#tip-text {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: #fef9c3;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #6b3e0e;
  line-height: 1.4;
  border: 1px solid #e5e7eb;
  transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
}

html[lang="hi"] #tip-btn {
  max-width: 160px;
  font-size: 0.9rem;
}


.dlm-logo-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #2563eb;
  color: white;
  flex-direction: column;
  gap: 0.4rem;
}

.dlm-logo {
  width: 64px;
  height: 64px;
  margin-right: 0.75rem;
}

.dlm-heading {
  font-size: 1.5rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
}

#result-sheet {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 50vh;
  -webkit-overflow-scrolling: touch;
}

.table-cell {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  word-break: break-word;
  white-space: normal;
  text-align: left;
  color: #1f2937;
  line-height: 1.4;
  font-family: Arial, Helvetica, sans-serif;
}

.nav-button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  background-color: #eab308;
  color: white;
  border: none;
  cursor: pointer;
  margin: 0.75rem auto;
  transition: background-color 0.2s ease-in-out;
  text-align: center;
}

.nav-button:hover {
  background-color: #ca8a04;
}

#result-container .flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

/* 🌐 Base Styles */
.dlm-back-button {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem auto;
  max-width: fit-content;
  padding: 0.5rem;
  border-radius: 0.5rem;
  text-align: center;
}

.dlm-btn.secondary {
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.25;
  background-color: #107eeb;
  color: #ffffff;
  border: 1px solid #107eeb;
  border-radius: 0.5rem; /* smooth corners */
  transition: background-color 0.3s ease;
}

/* 🖱️ Hover Styles */
.dlm-btn.secondary:hover {
  background-color: #2563eb;
  color: #ffffff;
}

/* 🌑 Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .dlm-back-button {
    background-color: #0f172a;
  }

  .dlm-btn.secondary {
    color: #ffffff !important;
    background-color: #107eeb !important;
    border-color: #107eeb !important;
  }

  .dlm-btn.secondary:hover {
    background-color: #2563eb !important;
  }
}

/* 📱 Mobile Tweaks */
@media (max-width: 640px) {
  .dlm-btn.secondary {
    font-size: 0.85rem;
    padding: 0.3rem 0.9rem;
    max-width: 100%;
  }
}
/* In case Tailwind doesn’t cover it */
#language-toggle {
  background-color: #dbeafe; /* blue-100 */
  color: #1e3a8a; /* blue-900 */
  border: 1px solid #93c5fd; /* blue-300 */
}


  #result-container button {
    width: auto;
    min-width: 160px;
    max-width: 95%;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.2;
    margin: 0.2rem 0;
  }

  .table-cell {
    padding: 0.4rem;
    font-size: 0.875rem;
  }

  .dlm-btn {
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
  }

  .dlm-tagline {
    font-size: 0.9rem;
  }

  #question-content pre {
    font-size: 0.75rem;
  }

  h1,
  #analytics-container h3 {
    font-size: 1.5rem;
  }

  p,
  #analytics-container p,
  #score-display {
    font-size: 0.875rem;
  }  

  #score-display {
    font-size: 0.875rem;
  }

  #score-display-wrapper {
    min-width: 120px;
    max-width: 130px;
    padding: 0.1rem 0.2rem;
  }

  .dlm-logo-header {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
  }

  .dlm-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 0.1rem;
  }

  .dlm-heading {
    font-size: 1rem;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
  }

  #result-container .flex {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.3rem;
    align-items: center;
  }

  #result-container button {
    width: auto;
    min-width: 180px;
    max-width: 90%;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    margin: 0.25rem auto;
  }

  #result-sheet {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 40vh;
  }
  
.pdf-page {
  width: 794px;
  height: 1123px;
  padding: 30px 40px;        /* Top-Bottom 30px, Left-Right 40px */
  margin: 0 auto;
  box-sizing: border-box;
  background: white;
}

.pdf-page h2 {
  text-align: center;
  font-weight: bold;
  margin: 0 auto 20px;
  font-size: 20px;
}

.question-text {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

li[data-answer="true"] {
  font-weight: bold;
  color: #007700;
}

.score-summary {
  margin-bottom: 1.5rem;
  background-color: var(--card-bg, #fff);
  padding: 1rem;
  border-left: 5px solid var(--accent, #2563eb);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.score-summary h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.results-table th,
.results-table td {
  border: 1px solid #ddd; /* Add this if not already */
}

th, td {
  border: 1px solid red !important;
}

#quiz-export-wrapper {
  display: none;
}

.inline-code {
  font-family: 'Courier New', monospace;
  background-color: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.block-code {
  font-family: 'Courier New', monospace;
  background-color: #f9f9f9;
  padding: 10px;
  border-left: 4px solid #ccc;
  white-space: normal;
  display: block;
  line-height: 1.5;
}

.code-block {
  background-color: #1f2937;
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  overflow-x: auto;
  white-space: pre;
  word-wrap: normal;
  tab-size: 4;
}

code.language-python {
  font-family: 'Courier New', Courier, monospace;
}

@media (max-width: 640px) {
  #question-content pre {
    font-size: 0.875rem;
    line-height: 1.4;
    padding: 8px;
  }
}

.pdf-page pre {
  background-color: #f4f4f4;
  color: #000;
  padding: 10px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre;
  overflow-x: auto;
  tab-size: 4;
}

.bilingual-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lang-en {
  font-weight: 500;
}
.lang-hi {
  font-style: italic;
  color: #444;
}

