/* css/rom.css - Complete updated styles for ROM Analyzer */
:root {
  --rom-accent: #009688;
  --rom-accent-soft: #00968820;
  --card-bg: rgba(255, 255, 255, 0.75);
  --scan-line-color: rgba(0, 150, 136, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.2);
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.02), 0 4px 8px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 20px 30px -10px rgba(0, 150, 136, 0.15), 0 8px 18px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --card-bg: rgba(30, 42, 50, 0.8);
  --scan-line-color: rgba(20, 184, 166, 0.9);
  --glass-bg: rgba(30, 42, 50, 0.8);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* Main layout */
.rom-main {
  padding: 1.5rem 1rem 2rem;
  min-height: calc(100vh - 140px);
}

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

/* Progress Steps */
.rom-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.step.active {
  opacity: 1;
}

.step.completed .step-number {
  background: var(--rom-accent);
  color: white;
  border-color: var(--rom-accent);
}

.step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.step.active .step-number {
  border-color: var(--rom-accent);
  background: var(--rom-accent-soft);
  color: var(--rom-accent);
}

.step-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-connector {
  width: 80px;
  height: 2px;
  background: var(--border-light);
  margin: 0 1rem;
}

/* Stage Containers */
.stage-container {
  display: none;
  animation: fadeSlide 0.4s ease;
}

.stage-container.active {
  display: block;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glass card base */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.glass-card:hover {
  box-shadow: var(--shadow-hover);
}

/* Camera Card - Full width for larger view */
.camera-card.full-width {
  padding: 1.5rem;
}

.camera-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.camera-header h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.camera-header h3 i {
  color: var(--rom-accent);
}

.camera-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Camera View - Large with scanning overlay */
.camera-view {
  position: relative;
  background: #00000015;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  border: 1px solid var(--border-light);
}

.camera-view.large {
  aspect-ratio: 9 / 16;
  max-height: 70vh;
  width: 100%;
  border-radius: 1.2rem;
}

#cameraPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 1.2rem;
  gap: 0.8rem;
}

.camera-placeholder i {
  font-size: 3.5rem;
  opacity: 0.5;
}

/* Scanning line overlay - FIXED */
.scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 1rem;
  z-index: 10;
  display: none; /* Hidden by default, shown when camera starts */
}

.scan-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--scan-line-color) 10%,
    var(--scan-line-color) 50%,
    var(--scan-line-color) 90%,
    transparent
  );
  box-shadow: 
    0 0 15px var(--scan-line-color),
    0 0 30px var(--scan-line-color),
    0 0 45px rgba(0, 150, 136, 0.5);
  animation: scanMove 3.5s ease-in-out infinite;
  filter: blur(0.5px);
}

@keyframes scanMove {
  0% {
    top: -5%;
    opacity: 0.2;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 105%;
    opacity: 0.2;
  }
}

/* Camera Controls */
.camera-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.btn-primary {
  padding: 0.9rem 2.5rem;
  border-radius: 3rem;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--rom-accent);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 150, 136, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 150, 136, 0.4);
  filter: brightness(1.05);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Capture Button Container */
.capture-btn-container {
  display: flex;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}

/* Accent Button for Capture */
.btn-accent {
  padding: 1rem 2.5rem;
  border-radius: 3rem;
  border: 2px solid var(--rom-accent);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--rom-accent-soft);
  color: var(--rom-accent);
  box-shadow: 0 2px 8px rgba(0, 150, 136, 0.2);
}

.btn-accent:hover:not(:disabled) {
  background: var(--rom-accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 150, 136, 0.4);
}

.btn-accent:active:not(:disabled) {
  transform: translateY(0);
}

.btn-accent:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--border-light);
  box-shadow: none;
}

/* Joint Selection */
.joint-selection {
  margin-bottom: 1.2rem;
}

.joint-selection label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.joint-select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 3rem;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
  outline: none;
}

.joint-select:focus {
  border-color: var(--rom-accent);
  box-shadow: 0 0 0 3px var(--rom-accent-soft);
}

/* Movement Prompt Box */
.movement-prompt-box {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.2rem 1.8rem;
  margin: 1.2rem 0;
  border-left: 4px solid var(--rom-accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  transition: border-left-color 0.3s ease;
}

.movement-prompt-box.completed {
  border-left-color: #10b981;
}

.prompt-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
}

.prompt-header i {
  color: var(--rom-accent);
  font-size: 1.5rem;
}

.prompt-progress {
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: var(--rom-accent-soft);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-weight: 500;
}

/* Capture Preview */
.capture-preview {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-light);
}

.capture-preview h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.capture-preview h4 span {
  color: var(--rom-accent);
  font-weight: 600;
}

.thumbnail-container {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
}

.thumbnail {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 0.6rem;
  border: 2px solid var(--border-light);
  transition: all 0.2s ease;
  cursor: pointer;
}

.thumbnail:hover {
  border-color: var(--rom-accent);
  transform: scale(1.05);
}

#proceedToAnalysisBtn {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1.1rem;
}

/* Analysis Stage */
.analysis-card {
  text-align: center;
  padding: 3rem 2rem;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.rom-spinner {
  width: 70px;
  height: 70px;
  border: 4px solid var(--border-light);
  border-top-color: var(--rom-accent);
  border-right-color: var(--rom-accent);
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  box-shadow: 0 0 20px var(--rom-accent-soft);
}

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

.loading-container h3 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

#analysisStatus {
  color: var(--text-secondary);
  font-size: 1rem;
}

.analysis-progress {
  width: 100%;
  max-width: 400px;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rom-accent), #00b8a9);
  transition: width 0.4s ease;
  border-radius: 3px;
}

/* Results Stage */
.results-card {
  padding: 0;
  overflow: hidden;
}

.results-toolbar {
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--surface);
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.badge-ai {
  background: var(--rom-accent);
  color: white;
  padding: 0.3rem 1.2rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#resultDate {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.results-actions {
  display: flex;
  gap: 0.8rem;
}

.tool-btn {
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  color: var(--text-primary);
  font-weight: 500;
}

.tool-btn:hover {
  background: var(--rom-accent-soft);
  border-color: var(--rom-accent);
  color: var(--rom-accent);
  transform: translateY(-1px);
}

.tool-btn.secondary:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #dc2626;
}

.results-body {
  padding: 2rem 2.5rem;
  max-height: 550px;
  overflow-y: auto;
  line-height: 1.7;
}

/* Typography for results */
.typography-clean h1,
.typography-clean h2,
.typography-clean h3 {
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  color: var(--text-primary);
  font-weight: 500;
}

.typography-clean h1 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--rom-accent);
  padding-bottom: 0.5rem;
}

.typography-clean h2 {
  font-size: 1.5rem;
}

.typography-clean h3 {
  font-size: 1.2rem;
}

.typography-clean p {
  margin-bottom: 1.2em;
  color: var(--text-secondary);
}

.typography-clean ul,
.typography-clean ol {
  margin-bottom: 1.2em;
  padding-left: 1.8rem;
}

.typography-clean li {
  margin-bottom: 0.5em;
}

.typography-clean strong {
  color: var(--rom-accent);
}

/* History Drawer */
.history-drawer {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  height: 100vh;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-light);
  z-index: 1000;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.history-drawer.active {
  left: 0;
}

.drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
}

.drawer-header h3 i {
  color: var(--rom-accent);
}

.drawer-close-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.drawer-close-btn:hover {
  background: var(--rom-accent-soft);
  color: var(--rom-accent);
  transform: rotate(90deg);
}

.history-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
}

.history-item {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.history-item:hover {
  border-color: var(--rom-accent);
  transform: translateX(-4px);
  box-shadow: var(--shadow-sm);
}

.history-info {
  flex: 1;
}

.history-name {
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.history-meta {
  display: flex;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.meta-tag {
  background: var(--rom-accent-soft);
  padding: 0.2rem 0.8rem;
  border-radius: 1rem;
  color: var(--rom-accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--rom-accent);
  cursor: pointer;
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.view-btn:hover {
  background: var(--rom-accent-soft);
  transform: translateX(3px);
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem 2rem;
}

.empty-state i {
  font-size: 3rem;
  opacity: 0.4;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1rem;
}

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--surface);
  border-left: 4px solid var(--rom-accent);
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideUp 0.3s ease;
  max-width: 350px;
  color: var(--text-primary);
  font-weight: 500;
}

.toast.success {
  border-left-color: var(--rom-accent);
}

.toast.error {
  border-left-color: #dc2626;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.info {
  border-left-color: #3b82f6;
}

.toast i {
  font-size: 1.2rem;
}

.toast.success i {
  color: var(--rom-accent);
}

.toast.error i {
  color: #dc2626;
}

.toast.info i {
  color: #3b82f6;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .rom-main {
    padding: 1rem 0.8rem;
  }
  
  .glass-card {
    padding: 1.5rem;
  }
  
  .camera-card.full-width {
    padding: 1.2rem;
  }
  
  .camera-view.large {
    max-height: 50vh;
  }
  
  .camera-header h3 {
    font-size: 1.3rem;
  }
  
  .camera-controls {
    flex-direction: column;
  }
  
  .btn-primary {
    width: 100%;
    justify-content: center;
  }
  
  .btn-accent {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }
  
  .movement-prompt-box {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }
  
  .prompt-header {
    justify-content: center;
  }
  
  .thumbnail {
    width: 70px;
    height: 55px;
  }
  
  .history-drawer {
    width: 320px;
    left: -320px;
  }
  
  .results-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .results-actions {
    justify-content: space-between;
  }
  
  .tool-btn {
    flex: 1;
    justify-content: center;
  }
  
  .results-body {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
  
  .step-connector {
    width: 30px;
  }
  
  .camera-view.large {
    max-height: 40vh;
  }
  
  .thumbnail {
    width: 60px;
    height: 45px;
  }
  
  .history-drawer {
    width: 280px;
    left: -280px;
  }
  
  .toast {
    max-width: 280px;
    padding: 12px 16px;
  }
  
  .camera-header h3 {
    font-size: 1.1rem;
  }
  
  .movement-prompt-box {
    padding: 0.8rem;
  }
  
  .prompt-header {
    font-size: 1rem;
  }
}

/* Dark mode specific adjustments */
[data-theme="dark"] .scan-line {
  box-shadow: 
    0 0 20px var(--scan-line-color),
    0 0 40px var(--scan-line-color),
    0 0 60px rgba(20, 184, 166, 0.4);
}

[data-theme="dark"] .movement-prompt-box {
  background: var(--surface);
}

[data-theme="dark"] .badge-ai {
  background: var(--rom-accent);
  color: white;
}

[data-theme="dark"] .empty-state i {
  opacity: 0.3;
}

[data-theme="dark"] .btn-accent {
  background: rgba(20, 184, 166, 0.15);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .scan-line,
  .rom-spinner {
    animation: none;
  }
  
  .scan-line {
    display: none;
  }
}



/* Assessment Mode - Mobile First Design with Vertical Stack */
.assessment-mode {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: stretch;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background: var(--surface);
  border-radius: 1rem;
  border: 1px solid var(--border-light);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.radio-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.radio-label i {
  font-size: 1.25rem;
  width: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.radio-label:hover {
  background: var(--rom-accent-soft);
  border-color: var(--rom-accent);
  color: var(--rom-accent);
  transform: translateX(4px);
}

.radio-label:hover i {
  transform: scale(1.1);
}

.radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

/* Custom radio indicator */
.radio-label::before {
  content: '';
  position: absolute;
  right: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.radio-label:has(input:checked)::before {
  border-color: var(--rom-accent);
  background: var(--rom-accent);
  box-shadow: inset 0 0 0 3px var(--surface);
}

/* Selected state */
.radio-label:has(input:checked) {
  background: var(--rom-accent-soft);
  border-color: var(--rom-accent);
  color: var(--rom-accent);
  font-weight: 600;
  padding-left: 1.5rem;
}

.radio-label:has(input:checked) i {
  color: var(--rom-accent);
  animation: pulseIcon 0.3s ease;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Active/pressed state for touch */
.radio-label:active {
  transform: scale(0.98);
  background: var(--rom-accent-soft);
  border-color: var(--rom-accent);
}

/* Focus visible for accessibility */
.radio-label:focus-within {
  outline: 2px solid var(--rom-accent);
  outline-offset: 2px;
}

/* Description text for each mode */
.radio-label .mode-description {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  opacity: 0.8;
}

.radio-label:has(input:checked) .mode-description {
  color: var(--rom-accent);
  opacity: 0.9;
}

/* Enhanced content structure */
.radio-label-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.radio-label-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

/* Tablet and desktop - switch to horizontal */
@media (min-width: 640px) {
  .assessment-mode {
    flex-direction: row;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.375rem;
    border-radius: 3rem;
  }
  
  .radio-label {
    justify-content: center;
    padding: 0.85rem 1.2rem;
    border-radius: 2.5rem;
    border: none;
  }
  
  .radio-label:hover {
    transform: translateY(-2px);
  }
  
  .radio-label:has(input:checked) {
    padding-left: 1.2rem;
  }
  
  .radio-label::before {
    display: none;
  }
  
  .radio-label-content {
    align-items: center;
  }
  
  .radio-label-title {
    justify-content: center;
  }
  
  .mode-description {
    text-align: center;
  }
}

/* Small mobile adjustments */
@media (max-width: 360px) {
  .radio-label {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
  
  .radio-label i {
    font-size: 1.1rem;
  }
  
  .radio-label::before {
    right: 1rem;
  }
}

/* Dark mode adjustments */
[data-theme="dark"] .assessment-mode {
  background: rgba(30, 42, 50, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .radio-label {
  background: rgba(30, 42, 50, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

[data-theme="dark"] .radio-label:hover {
  background: rgba(20, 184, 166, 0.15);
  border-color: #14b8a6;
  color: #14b8a6;
}

[data-theme="dark"] .radio-label:has(input:checked) {
  background: rgba(20, 184, 166, 0.15);
  border-color: #14b8a6;
  color: #14b8a6;
}

[data-theme="dark"] .radio-label:has(input:checked) i {
  color: #14b8a6;
}

[data-theme="dark"] .radio-label::before {
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .radio-label:has(input:checked)::before {
  border-color: #14b8a6;
  background: #14b8a6;
  box-shadow: inset 0 0 0 3px rgba(30, 42, 50, 0.8);
}

/* Beta badge for Full Assessment */
.radio-label:has(input[value="full"]) .radio-label-title::after {
  content: "NEW";
  margin-left: 0.5rem;
  background: linear-gradient(135deg, #ff9800, #ff5722);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  letter-spacing: 0.3px;
}

/* Ensure proper spacing with joint selection */
.joint-selection {
  margin-top: 1rem;
}



/* Preview Modal - same as documentation.css */
.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.preview-card {
  position: relative;
  background: var(--surface, white);
  border-radius: 24px;
  max-width: 500px;
  width: 90%;
  margin: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.preview-card-header {
  background: linear-gradient(135deg, var(--rom-accent, #009688), #00695c);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.preview-icon {
  font-size: 32px;
}

.preview-card-header h3 {
  margin: 0;
  flex: 1;
  font-size: 1.25rem;
  font-weight: 600;
}

.preview-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.preview-close:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

.preview-card-body {
  padding: 24px;
}

.preview-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-badge {
  background: var(--rom-accent-soft, #e0f2f1);
  color: var(--rom-accent, #009688);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.preview-date {
  font-size: 0.8rem;
  color: var(--text-secondary, #666);
}

.preview-description {
  margin-bottom: 24px;
  line-height: 1.6;
  color: var(--text-primary, #333);
}

.preview-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.preview-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
}

.preview-btn.primary {
  background: var(--rom-accent, #009688);
  color: white;
}

.preview-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 150, 136, 0.3);
}

.preview-btn.secondary {
  background: var(--surface, #f0f0f0);
  color: var(--text-primary, #333);
  border: 1px solid var(--border-light, #ddd);
}

.preview-btn.secondary:hover {
  background: var(--border-light, #e0e0e0);
}

.preview-note {
  text-align: center;
  color: var(--text-secondary, #666);
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  .preview-actions {
    flex-direction: column;
    gap: 10px;
  }
  .preview-btn {
    width: 100%;
    padding: 14px 20px;
  }
}

[data-theme="dark"] .preview-card {
  background: #1e2a32;
}
[data-theme="dark"] .preview-btn.secondary {
  background: #2e3b45;
  color: #eef2f6;
  border-color: #3e4b55;
}