/* ============================================================
   Minimalist & Eye-Soothing UI - Power BI PL-300 Practice
   Refined, elegant typography and zero visual noise
   ============================================================ */

:root {
  --bg-base: #0E0F12;
  --bg-surface: #16181D;
  --bg-elevated: #1F2229;
  --bg-hover: #262A33;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(255, 255, 255, 0.18);
  
  --text-main: #E2E5EB;
  --text-muted: #8A919E;
  --text-dim: #555B66;
  
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --accent-gold: #CA8A04;
  --accent-gold-soft: rgba(202, 138, 4, 0.12);
  
  --state-success: #15803D;
  --state-success-bg: rgba(21, 128, 61, 0.12);
  --state-error: #B91C1C;
  --state-error-bg: rgba(185, 28, 28, 0.12);
  
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  
  --nav-backdrop: rgba(14, 15, 18, 0.85);
}

[data-theme="light"] {
  --bg-base: #F8F9FA;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F1F3F5;
  --bg-hover: #E9ECEF;
  --border-subtle: rgba(0, 0, 0, 0.07);
  --border-focus: rgba(0, 0, 0, 0.18);
  
  --text-main: #1F242E;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  
  --accent: #1D4ED8;
  --accent-soft: rgba(29, 78, 216, 0.08);
  --accent-gold: #B45309;
  --accent-gold-soft: rgba(180, 83, 9, 0.08);
  
  --state-success: #166534;
  --state-success-bg: rgba(22, 101, 52, 0.08);
  --state-error: #991B1B;
  --state-error-bg: rgba(153, 27, 27, 0.08);
  
  --nav-backdrop: rgba(248, 249, 250, 0.85);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-stack);
  background-color: var(--bg-base);
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: -0.01em;
}

/* ============================================================
   Navigation Header
   ============================================================ */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-backdrop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 18px;
}

.nav-container {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.015em;
}

.brand-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-gold);
  border-radius: var(--radius-pill);
}

.exam-segmented-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
}

.exam-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-stack);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.exam-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  font-weight: 600;
}

.exam-toggle-btn:hover:not(.active) {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pill-action {
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease;
  text-decoration: none;
}

.btn-pill-action:hover {
  opacity: 0.9;
}

.btn-theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-theme-toggle:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

/* ============================================================
   Top Status Strip
   ============================================================ */
.status-strip {
  border-bottom: 1px solid var(--border-subtle);
  padding: 7px 16px;
  background: var(--bg-surface);
  font-size: 0.77rem;
  color: var(--text-muted);
}

.status-strip-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.status-counts {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-counts strong {
  color: var(--text-main);
  font-weight: 600;
}

.status-badge {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
}

.status-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.status-link:hover {
  text-decoration: underline;
}

/* ============================================================
   Controls: Segmented Switcher, Topic Scroll & Search
   ============================================================ */
.controls-container {
  max-width: 760px;
  width: 100%;
  margin: 14px auto 12px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.segmented-control {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  display: flex;
  gap: 2px;
}

.segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.segment-btn.active {
  background: var(--bg-elevated);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Topic Filter Horizontal Scroll */
.topic-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.topic-scroll::-webkit-scrollbar {
  display: none;
}

.topic-pill {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.topic-pill:hover {
  color: var(--text-main);
}

.topic-pill.active {
  background: var(--text-main);
  color: var(--bg-base);
  border-color: transparent;
}

/* Minimal Search */
.search-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 12px 7px 30px;
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--border-focus);
}

.search-icon-slot {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  display: flex;
  align-items: center;
}

/* ============================================================
   Main Content Area & Practice Card
   ============================================================ */
.main-wrapper {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 36px;
  flex: 1;
}

.practice-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

@media (max-width: 480px) {
  .nav-header {
    padding: 8px 10px;
  }
  .nav-container {
    gap: 6px;
  }
  .exam-toggle-btn {
    padding: 2px 7px;
    font-size: 0.72rem;
  }
  .practice-card {
    padding: 16px 12px;
  }
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.card-meta-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.q-position-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.meta-pill {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

.btn-star-bookmark {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.btn-star-bookmark.active {
  color: var(--accent-gold);
}

/* Question Prompt Typography */
.q-body-text {
  font-size: 0.94rem;
  font-weight: 450;
  color: var(--text-main);
  line-height: 1.65;
  margin-bottom: 16px;
  white-space: pre-line;
  word-break: break-word;
}

@media (max-width: 480px) {
  .q-body-text {
    font-size: 0.88rem;
    line-height: 1.6;
  }
}

/* Exhibit Box */
.exhibit-panel {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.exhibit-panel img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  cursor: zoom-in;
  display: block;
}

.exhibit-caption-text {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Options List (Clean Inset Style) */
.options-container {
  list-style: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.option-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.1s ease;
  user-select: none;
  min-height: 40px;
}

.option-row:last-child {
  border-bottom: none;
}

.option-row:hover {
  background: var(--bg-hover);
}

.option-marker {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.option-row.selected .option-marker {
  border-color: var(--accent);
  background: var(--accent);
}

.option-marker-dot {
  width: 6px;
  height: 6px;
  background: #FFFFFF;
  border-radius: var(--radius-pill);
  display: none;
}

.option-row.selected .option-marker-dot {
  display: block;
}

.option-desc {
  font-size: 0.86rem;
  color: var(--text-main);
  line-height: 1.5;
  word-break: break-word;
}

/* Verification State Styles (Subtle & Quiet - No Ticks, No Crosses) */
.option-row.state-correct {
  background: var(--state-success-bg) !important;
}
.option-row.state-correct .option-marker {
  border-color: var(--state-success);
  background: var(--state-success);
}

.option-row.state-wrong {
  background: var(--state-error-bg) !important;
}
.option-row.state-wrong .option-marker {
  border-color: var(--state-error);
  background: var(--state-error);
}

/* Card Bottom Actions */
.card-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.action-buttons-left {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-action-primary {
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-action-primary:hover {
  opacity: 0.9;
}

.btn-action-ghost {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-ghost:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.nav-buttons-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-step-nav {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-step-nav:hover:not(:disabled) {
  color: var(--text-main);
  background: var(--bg-hover);
}

.btn-step-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Explanation Inset Panel */
.explanation-panel {
  margin-top: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.exp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 6px;
  flex-wrap: wrap;
}

.exp-heading {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.exp-verified-answer {
  background: var(--state-success-bg);
  color: var(--state-success);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.exp-text-content {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.6;
  white-space: pre-line;
}

/* ============================================================
   All Questions Grid (Mode 2)
   ============================================================ */
.questions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

@media (max-width: 480px) {
  .questions-grid {
    grid-template-columns: 1fr;
  }
}

.grid-card-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: all 0.1s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.grid-card-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.grid-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.grid-card-title {
  font-size: 0.82rem;
  font-weight: 450;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.status-tag {
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
}
.status-tag.passed {
  color: var(--state-success);
  background: var(--state-success-bg);
}
.status-tag.review {
  color: var(--state-error);
  background: var(--state-error-bg);
}

/* ============================================================
   Sheet Modal (Complete Dumps PDF ₹399 - Authenticity & Policies)
   ============================================================ */
.modal-overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

@media (min-width: 600px) {
  .modal-overlay-bg {
    align-items: center;
    padding: 16px;
  }
}

.modal-overlay-bg.active {
  opacity: 1;
  pointer-events: auto;
}

.sheet-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px 16px 0 0;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 600px) {
  .sheet-container {
    border-radius: var(--radius-lg);
    padding: 24px;
    transform: scale(0.97);
  }
}

.modal-overlay-bg.active .sheet-container {
  transform: translateY(0);
}
@media (min-width: 600px) {
  .modal-overlay-bg.active .sheet-container {
    transform: scale(1);
  }
}

.sheet-handle {
  width: 32px;
  height: 3px;
  background: var(--text-dim);
  border-radius: 2px;
  margin: 0 auto 14px;
  opacity: 0.4;
}

.sheet-header-box {
  text-align: center;
  margin-bottom: 14px;
}

.sheet-title-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.015em;
  margin-bottom: 2px;
}

.sheet-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sheet-price-tag {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 6px 0;
}
.sheet-price-tag span {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Feature List */
.sheet-feature-list {
  list-style: none;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-bottom: 12px;
}

.sheet-feature-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.79rem;
  color: var(--text-main);
  line-height: 1.45;
}

.sheet-feature-list li:last-child {
  border-bottom: none;
}

/* Transparency & Policy Info Panels */
.info-callout-panel {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.info-callout-header {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.info-callout-text {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.info-callout-text strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Policy Terms List */
.policy-rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.policy-rules-list li {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.policy-rules-list li strong {
  color: var(--text-main);
  font-weight: 550;
}

.sheet-btn-main {
  width: 100%;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 6px;
  transition: opacity 0.15s ease;
}

.sheet-btn-main:hover {
  opacity: 0.9;
}

.sheet-btn-secondary {
  width: 100%;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sheet-btn-secondary:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

/* Quiet Toast */
.quiet-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 1200;
  pointer-events: none;
  white-space: nowrap;
  animation: toastFade 2.4s forwards;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 8px); }
}

/* Lightbox Modal */
.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.image-lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox-overlay img {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
}
