/* ===============================================================
   ProdiFy Assessment Center v2.0
   Enterprise-Grade Secure Testing Environment
   Inspired by Pearson VUE, Prometric, HackerRank
   =============================================================== */

/* ==================== CSS CUSTOM PROPERTIES ==================== */
:root {
  /* Primary Brand - Professional Blue */
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --primary-light: #60A5FA;
  --primary-50: #EFF6FF;

  /* Secondary - Deep Navy */
  --navy: #0F172A;
  --navy-light: #1E293B;
  --navy-medium: #334155;

  /* Status Colors */
  --success: #10B981;
  --success-dark: #059669;
  --success-light: #34D399;
  --success-bg: #ECFDF5;

  --warning: #F59E0B;
  --warning-dark: #D97706;
  --warning-light: #FBBF24;
  --warning-bg: #FFFBEB;

  --danger: #EF4444;
  --danger-dark: #DC2626;
  --danger-light: #F87171;
  --danger-bg: #FEF2F2;

  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Sizing */
  --header-height: 64px;
  --footer-height: 48px;
  --sidebar-width: 280px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ==================== BASE RESET ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== UTILITIES ==================== */
.hidden { display: none !important; }

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.5);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
}

.btn-outline:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

/* ==================== LOADING SCREEN ==================== */
.loading-screen {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  align-items: center;
  justify-content: center;
}

.loading-content {
  text-align: center;
  padding: 2rem;
}

.loading-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

/* ProdiFy Logo Styles */
.prodify-logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.prodify-logo {
  filter: drop-shadow(0 4px 12px rgba(233, 30, 140, 0.3));
}

.prodify-logo-lg {
  width: 360px;
  height: auto;
  min-height: 100px;
}

.prodify-logo-md {
  width: 320px;
  height: auto;
  min-height: 90px;
}

.prodify-logo-sm {
  width: 180px;
  height: auto;
}

.logo-subtitle-text {
  font-size: 0.875rem;
  color: var(--gray-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Legacy logo styles - keep for backwards compatibility */
.logo-mark svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
}

.logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.logo-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: 0.875rem;
  color: var(--gray-400);
  font-weight: 500;
}

.loading-spinner {
  margin-bottom: 2rem;
}

.spinner-ring {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 3px solid var(--navy-medium);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-status {
  color: var(--gray-400);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 280px;
  margin: 0 auto;
}

.loading-steps .step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  color: var(--gray-500);
  font-size: 0.875rem;
}

.loading-steps .step.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.loading-steps .step i {
  font-size: 0.75rem;
}

.loading-footer {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.security-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-500);
  font-size: 0.8125rem;
}

.security-notice i {
  color: var(--success);
}

/* ==================== ERROR SCREEN ==================== */
.error-screen {
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
}

.error-content {
  text-align: center;
  padding: 2rem;
  max-width: 480px;
}

.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--danger-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-icon i {
  font-size: 2.5rem;
  color: var(--danger);
}

.error-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.error-content p {
  color: var(--gray-600);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.error-code {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.screen-footer {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

/* ==================== POWERED BY ==================== */
.powered-by {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-500);
  font-size: 0.8125rem;
}

.powered-by img {
  height: 20px;
  width: auto;
}

.powered-by .brand {
  font-weight: 600;
  color: var(--gray-700);
}

.powered-by-mini {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--gray-500);
  font-size: 0.75rem;
}

.powered-by-mini img {
  height: 16px;
}

/* ==================== INSTRUCTIONS SCREEN ==================== */
.instructions-screen {
  background: var(--gray-100);
}

.instructions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-brand .prodify-logo-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.header-brand .prodify-logo-md {
  width: 300px;
  height: auto;
  min-height: 85px;
}

.brand-logo svg {
  width: 40px;
  height: 40px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

.brand-tagline {
  display: none; /* Logo includes tagline now */
}

.header-session .session-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--gray-600);
  font-family: var(--font-mono);
}

.instructions-main {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.instructions-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Assessment Card */
.assessment-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.card-header {
  margin-bottom: 1rem;
}

.assessment-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary-50) 0%, #DBEAFE 100%);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.assessment-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.assessment-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.meta-icon {
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.meta-icon i {
  font-size: 1.25rem;
  color: var(--primary);
}

.meta-content {
  display: flex;
  flex-direction: column;
}

.meta-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

.meta-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Rules Grid */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rule-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.rule-card.warning {
  background: linear-gradient(135deg, var(--warning-bg) 0%, #FEF3C7 100%);
  border-color: var(--warning-light);
}

.rule-icon {
  width: 48px;
  height: 48px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.rule-card.warning .rule-icon {
  background: rgba(245, 158, 11, 0.2);
}

.rule-icon i {
  font-size: 1.25rem;
  color: var(--primary);
}

.rule-card.warning .rule-icon i {
  color: var(--warning-dark);
}

.rule-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.rule-list {
  list-style: none;
}

.rule-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.rule-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  background: var(--gray-400);
  border-radius: 50%;
}

.rule-card.warning .rule-list li::before {
  background: var(--warning);
}

/* Candidate Card */
.candidate-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

.candidate-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.candidate-avatar i {
  font-size: 1.25rem;
  color: var(--gray-500);
}

.candidate-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.candidate-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.candidate-id {
  font-size: 0.8125rem;
  color: var(--gray-500);
  font-family: var(--font-mono);
}

.candidate-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--success-bg);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success-dark);
}

/* Consent Card */
.consent-card {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
}

.consent-checkbox input {
  display: none;
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: var(--white);
  border: 2px solid var(--gray-400);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.checkbox-custom i {
  font-size: 0.75rem;
  color: var(--white);
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}

.consent-checkbox input:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.consent-checkbox input:checked + .checkbox-custom i {
  opacity: 1;
  transform: scale(1);
}

.consent-text {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Start Button */
.btn-start {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.btn-start:disabled {
  background: var(--gray-300);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-start:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.btn-hint {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* Instructions Footer */
.instructions-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.footer-left, .footer-right {
  flex: 1;
}

.footer-right {
  text-align: right;
}

.footer-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.timestamp {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.version {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-family: var(--font-mono);
}

/* ==================== EXAM SCREEN ==================== */
.assessment-screen {
  background: var(--gray-100);
}

/* Exam Header */
.exam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 1.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.exam-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.exam-brand .prodify-logo-sm {
  width: 160px;
  height: auto;
  min-height: 40px;
}

.exam-brand .brand-icon {
  width: 32px;
  height: 32px;
}

.exam-brand .brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.header-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
}

.exam-info {
  display: flex;
  flex-direction: column;
}

.exam-type {
  font-size: 0.6875rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exam-course {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
}

/* Timer Display */
.timer-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-icon-wrapper {
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-icon-wrapper i {
  font-size: 1.125rem;
  color: var(--primary);
}

.timer-content {
  display: flex;
  flex-direction: column;
}

.timer-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

.timer-label {
  font-size: 0.625rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timer-display.warning {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--warning);
}

.timer-display.warning .timer-icon-wrapper {
  background: var(--warning);
}

.timer-display.warning .timer-icon-wrapper i {
  color: var(--white);
}

.timer-display.warning .timer-value {
  color: var(--warning-light);
}

.timer-display.danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  animation: pulse-danger 1s infinite;
}

.timer-display.danger .timer-icon-wrapper {
  background: var(--danger);
}

.timer-display.danger .timer-icon-wrapper i {
  color: var(--white);
}

.timer-display.danger .timer-value {
  color: var(--danger-light);
}

@keyframes pulse-danger {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Progress Indicator */
.progress-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.progress-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.progress-bar-mini {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill-mini {
  height: 100%;
  background: var(--success);
  border-radius: 2px;
  transition: width var(--transition-normal);
}

/* Security Status */
.security-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success-light);
}

.security-status.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning-light);
}

.session-id {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--gray-400);
  font-family: var(--font-mono);
}

/* Exam Body */
.exam-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Sidebar */
.exam-sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.sidebar-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-toggle {
  width: 28px;
  height: 28px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Collapsed sidebar state */
.exam-sidebar.collapsed {
  width: 60px;
  transition: width 0.3s ease;
}

.exam-sidebar.collapsed .sidebar-header h3 span,
.exam-sidebar.collapsed .sidebar-header h3 {
  font-size: 0;
  overflow: hidden;
}

.exam-sidebar.collapsed .sidebar-header h3 i {
  font-size: 1rem;
}

.exam-sidebar.collapsed .sidebar-stats,
.exam-sidebar.collapsed .sidebar-legend,
.exam-sidebar.collapsed .sidebar-footer {
  display: none;
}

.exam-sidebar.collapsed .question-grid {
  padding: 0.5rem;
  gap: 4px;
}

.exam-sidebar.collapsed .question-grid .q-item {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
}

.exam-sidebar {
  transition: width 0.3s ease;
}

.sidebar-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 1rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.stat-item .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-700);
}

.stat-item.answered .stat-value {
  color: var(--success);
}

.stat-item.flagged .stat-value {
  color: var(--warning);
}

.stat-item .stat-label {
  font-size: 0.625rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--gray-500);
}

.legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-item .dot.current {
  background: var(--primary);
}

.legend-item .dot.answered {
  background: var(--success);
}

.legend-item .dot.flagged {
  background: var(--warning);
}

.legend-item .dot.unanswered {
  background: var(--gray-200);
  border: 1px solid var(--gray-300);
}

/* Question Grid */
.question-grid {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-content: start;
}

.question-grid .q-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.question-grid .q-item:hover {
  background: var(--gray-100);
  border-color: var(--primary-light);
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Current question - prominent blue */
.question-grid .q-item.current {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-dark);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
  transform: scale(1.08);
  z-index: 2;
}

/* Answered questions - green tint */
.question-grid .q-item.answered {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border-color: var(--success);
  color: var(--success-dark);
}

.question-grid .q-item.answered::before {
  content: '✓';
  position: absolute;
  font-size: 0.5rem;
  bottom: 2px;
  right: 3px;
  color: var(--success);
}

/* Flagged questions - orange indicator */
.question-grid .q-item.flagged::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--white), 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: pulse-flag 2s ease-in-out infinite;
}

@keyframes pulse-flag {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Current + Answered combo */
.question-grid .q-item.current.answered {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-dark);
  color: var(--white);
}

.question-grid .q-item.current.answered::before {
  color: var(--white);
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.btn-submit-exam {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-submit-exam:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Exam Content */
.exam-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5rem;
}

/* Exam Progress */
.exam-progress {
  margin-bottom: 1rem;
}

.progress-track {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
  border-radius: 3px;
  transition: width var(--transition-normal);
}

/* Question Panel */
.question-panel {
  flex: 1;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.question-number-badge {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}

.q-label {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.q-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
}

.q-total {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.question-tags {
  display: flex;
  gap: 0.5rem;
}

.tag {
  display: inline-flex;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-skill {
  background: var(--primary-50);
  color: var(--primary-dark);
}

.tag-difficulty {
  background: var(--warning-bg);
  color: var(--warning-dark);
}

.tag-difficulty.easy {
  background: var(--success-bg);
  color: var(--success-dark);
}

.tag-difficulty.hard {
  background: var(--danger-bg);
  color: var(--danger-dark);
}

.tag-points {
  background: var(--gray-100);
  color: var(--gray-600);
}

.question-body {
  padding: 1.5rem 2rem;
  flex: 1;
  overflow-y: auto;
}

.question-text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--gray-800);
  margin-bottom: 1.5rem;
}

.question-code {
  background: var(--navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--navy-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: var(--gray-400);
}

.code-header .code-copy {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.25rem;
}

.question-code pre {
  margin: 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
}

.question-code code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #E2E8F0;
  line-height: 1.6;
}

/* Options */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 2rem 1.5rem;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.option-item:hover {
  background: var(--white);
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.option-item.selected {
  background: var(--primary-50);
  border-color: var(--primary);
}

.option-item.correct {
  background: var(--success-bg);
  border-color: var(--success);
}

.option-item.incorrect {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.option-letter {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--gray-600);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.option-item.selected .option-letter {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.option-item.correct .option-letter {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.option-item.incorrect .option-letter {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}

.option-text {
  flex: 1;
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.option-icon {
  display: none;
  font-size: 1.125rem;
}

.option-item.correct .option-icon,
.option-item.incorrect .option-icon {
  display: block;
}

.option-item.correct .option-icon {
  color: var(--success);
}

.option-item.incorrect .option-icon {
  color: var(--danger);
}

/* Option Error */
.option-error {
  padding: 1.5rem;
  text-align: center;
  color: var(--gray-500);
  font-style: italic;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 2px dashed var(--gray-300);
}

/* Feedback Panel */
.feedback-panel {
  margin: 0 2rem 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.feedback-panel.correct .feedback-header {
  background: var(--success);
  color: var(--white);
}

.feedback-panel.incorrect .feedback-header {
  background: var(--danger);
  color: var(--white);
}

.feedback-body {
  padding: 1rem 1.25rem;
}

.feedback-panel.correct .feedback-body {
  background: var(--success-bg);
}

.feedback-panel.incorrect .feedback-body {
  background: var(--danger-bg);
}

.feedback-explanation {
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.feedback-tip {
  font-size: 0.8125rem;
  color: var(--gray-600);
  font-style: italic;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Navigation */
.exam-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-prev, .nav-flag {
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
}

.nav-prev:hover, .nav-flag:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.nav-flag.flagged {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: var(--warning-dark);
}

.nav-flag.flagged i {
  font-weight: 900;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-next {
  background: var(--primary);
  color: var(--white);
}

.nav-next:hover {
  background: var(--primary-dark);
}

.nav-submit {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  color: var(--white);
}

.nav-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Exam Footer */
.exam-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--footer-height);
  padding: 0 1.5rem;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.keyboard-hints {
  display: flex;
  gap: 1.5rem;
}

.keyboard-hints span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.keyboard-hints kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 0.375rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--gray-600);
}

.auto-save-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--success);
}

/* ==================== RESULTS SCREEN ==================== */
.results-screen {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  padding-top: 2rem;
  overflow-y: auto;
}

.results-wrapper {
  width: 100%;
  max-width: 560px;
}

.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.results-brand .prodify-logo-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.results-brand .prodify-logo-md {
  width: 320px;
  height: auto;
  min-height: 90px;
}

.results-brand .brand-tagline {
  display: none; /* Logo includes tagline now */
}

/* Legacy styles - no longer needed with new logo */
.results-brand .brand-text {
  text-align: left;
}

.results-brand .brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
}

.results-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.results-subtitle {
  font-size: 1rem;
  color: var(--gray-400);
}

.results-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
}

/* Score Section */
.score-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.score-ring {
  position: relative;
  width: 140px;
  height: 140px;
}

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

.ring-bg {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 10;
}

.ring-fill {
  fill: none;
  stroke: var(--success);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 1s ease;
}

.score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-inner .score-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
}

.score-inner .score-max {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.score-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.grade-badge {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.grade-letter {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
}

.grade-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--success-dark);
}

/* Pass Status */
.pass-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--success-bg);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.pass-status.failed {
  background: var(--danger-bg);
}

.status-icon {
  width: 48px;
  height: 48px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-icon i {
  font-size: 1.25rem;
  color: var(--white);
}

.pass-status.failed .status-icon {
  background: var(--danger);
}

.status-text {
  display: flex;
  flex-direction: column;
}

.status-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--success-dark);
}

.pass-status.failed .status-title {
  color: var(--danger-dark);
}

.status-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card .stat-icon.correct {
  background: var(--success-bg);
  color: var(--success);
}

.stat-card .stat-icon.incorrect {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-card .stat-icon.skipped {
  background: var(--gray-200);
  color: var(--gray-500);
}

.stat-card .stat-icon.time {
  background: var(--primary-50);
  color: var(--primary);
}

.stat-card .stat-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-card .stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-800);
}

.stat-card .stat-label {
  font-size: 0.6875rem;
  color: var(--gray-500);
  text-transform: uppercase;
}

/* Accuracy Section */
.accuracy-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.accuracy-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

.accuracy-value {
  color: var(--success);
}

.accuracy-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.accuracy-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, var(--success-light) 100%);
  border-radius: 4px;
  transition: width 0.8s ease;
}

/* Session Summary */
.session-summary {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}

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

.summary-label {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.summary-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  font-family: var(--font-mono);
}

/* Results Actions */
.results-actions {
  display: flex;
  gap: 1rem;
}

.results-actions .btn {
  flex: 1;
}

.results-footer {
  margin-top: 2rem;
  text-align: center;
}

.results-footer .powered-by {
  justify-content: center;
}

.results-footer .powered-by,
.results-footer .powered-by .brand {
  color: var(--gray-400);
}

/* ==================== NEW RESULTS SCREEN (Enterprise Full Screen) ==================== */
.results-screen-new {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: #0f172a;
  background-image:
    radial-gradient(ellipse at top, rgba(233, 30, 140, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
}

/* Custom Scrollbar for Results Screen */
.results-screen-new::-webkit-scrollbar {
  width: 8px;
}

.results-screen-new::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.results-screen-new::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e91e8c, #3b82f6);
  border-radius: 4px;
}

.results-screen-new::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f472b6, #60a5fa);
}

.results-topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.results-logo {
  width: 200px;
  height: 60px;
}

.results-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 2rem;
  gap: 1.5rem;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

/* Status Banner - Enterprise Card */
.results-status {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.results-status::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #34d399);
}

.results-status.failed::before {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.status-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  position: relative;
}

.status-badge::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.status-badge.passed {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
}

.status-badge.failed {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.4);
}

.status-content {
  flex: 1;
}

.status-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.375rem 0;
  letter-spacing: -0.02em;
}

.status-subtitle {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* Score Circle Large - Enterprise Style */
.results-score-container {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  width: 100%;
}

.score-circle-large {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.score-circle-large svg {
  width: 100%;
  height: 100%;
}

.score-circle-large .score-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.score-circle-large .score-progress {
  transition: stroke-dashoffset 1.5s ease-out;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
}

.score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-percent {
  font-size: 2.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.score-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
  margin-top: 0.25rem;
}

.score-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.score-item {
  text-align: center;
}

.score-item-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
}

.score-item-value.grade {
  font-size: 2.25rem;
  background: linear-gradient(135deg, #E91E8C 0%, #FF4081 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-item-label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.score-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* Stats Grid - Enterprise */
.results-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  width: 100%;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.stat-box i {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.stat-box.correct i { color: #34d399; }
.stat-box.incorrect i { color: #f87171; }
.stat-box.skipped i { color: #94a3b8; }
.stat-box.time i { color: #60a5fa; }

.stat-num {
  font-size: 1.375rem;
  font-weight: 700;
  color: #ffffff;
}

.stat-text {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* Accuracy - Enterprise */
.results-accuracy {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.results-accuracy .accuracy-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}

.results-accuracy .accuracy-label span:last-child {
  color: #34d399;
}

.accuracy-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.results-accuracy .accuracy-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  border-radius: 5px;
  transition: width 1s ease-out;
}

/* Bottom Section - Enterprise */
.results-bottom {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 2rem 2rem;
}

.results-meta {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.results-screen-new .meta-item {
  text-align: center;
  background: transparent;
  border: none;
  padding: 0;
}

.results-screen-new .meta-label {
  display: block;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.375rem;
}

.results-screen-new .meta-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'SF Mono', 'Consolas', monospace;
}

.results-screen-new .meta-value.violations {
  color: #34d399;
}

.results-actions-new {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-results {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-results.primary {
  background: linear-gradient(135deg, #E91E8C 0%, #C2185B 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(233, 30, 140, 0.35);
}

.btn-results.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(233, 30, 140, 0.45);
}

.btn-results.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-results.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Footer Branding */
.results-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding-top: 1rem;
}

.powered-text {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 500;
}

.footer-logo {
  width: 120px;
  height: auto;
}

.footer-tagline {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 640px) {
  .results-main {
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  .results-score-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .score-circle-large {
    width: 140px;
    height: 140px;
  }

  .score-percent {
    font-size: 2.25rem;
  }

  .results-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-meta {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .results-actions-new {
    flex-direction: column;
  }

  .btn-results {
    width: 100%;
    justify-content: center;
  }

  .status-title {
    font-size: 1.375rem;
  }
}

/* ==================== MODALS ==================== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
}

.modal-container {
  position: relative;
  width: 90%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modal-in 0.3s ease;
}

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

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 2rem 1.5rem;
  text-align: center;
}

.modal-header.submit {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
}

.modal-header.warning {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
  color: var(--white);
}

.modal-header.danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
  color: var(--white);
}

.modal-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon i {
  font-size: 1.5rem;
}

.modal-icon.pulse {
  animation: icon-pulse 1.5s infinite;
}

@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.modal-body {
  padding: 1.5rem 2rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.summary-item.warning {
  background: var(--warning-bg);
}

.item-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.item-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.summary-item.warning .item-value {
  color: var(--warning-dark);
}

.submit-warning {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--warning-bg);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--warning-dark);
}

.confirm-text {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--gray-600);
}

.modal-footer {
  display: flex;
  gap: 1rem;
  padding: 1rem 2rem 2rem;
}

.modal-footer .btn {
  flex: 1;
}

/* Violation Modal */
.violation-message {
  text-align: center;
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

.violation-meter {
  margin-bottom: 1rem;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.meter-track {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: var(--danger);
  border-radius: 4px;
  transition: width var(--transition-normal);
}

.violation-warning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
  text-align: center;
  justify-content: center;
}

/* Time Warning */
.time-countdown {
  text-align: center;
  margin-bottom: 1rem;
}

.countdown-value {
  display: block;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--danger);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }

  .assessment-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .instructions-header,
  .instructions-footer {
    padding: 0.75rem 1rem;
  }

  .instructions-main {
    padding: 1rem;
  }

  .assessment-card,
  .rules-grid,
  .consent-card {
    margin-bottom: 1rem;
  }

  .assessment-title {
    font-size: 1.25rem;
  }

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

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .exam-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: var(--footer-height);
    transform: translateX(-100%);
    z-index: 100;
    transition: transform var(--transition-normal);
    width: 280px;
  }

  .exam-sidebar.open {
    transform: translateX(0);
  }

  .exam-content {
    padding: 1rem;
  }

  .question-body {
    padding: 1rem 1.25rem;
  }

  .options-list {
    padding: 0 1.25rem 1rem;
  }

  .exam-navigation {
    flex-wrap: wrap;
  }

  .nav-center {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }

  .header-left .exam-info,
  .header-right .security-status,
  .keyboard-hints {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .timer-display {
    padding: 0.5rem 0.75rem;
  }

  .timer-icon-wrapper {
    width: 32px;
    height: 32px;
  }

  .timer-value {
    font-size: 1.125rem;
  }

  .score-section {
    flex-direction: column;
    gap: 1.5rem;
  }

  .modal-container {
    width: 95%;
  }

  .modal-body {
    padding: 1rem 1.25rem;
  }

  .modal-footer {
    padding: 0.75rem 1.25rem 1.25rem;
    flex-direction: column;
  }
}
