/* Main SCP Cases Stylesheet - Claude-inspired Design */

:root {
  --claude-cream: #F9F6F1;
  --claude-text: #0A0A0A;
  --claude-accent: #D97757;
  --claude-hover: #C5654A;
  --claude-border: #E8E3D9;
  --claude-card-bg: #FFFFFF;
  --claude-sidebar: #FFFFFF;
  --claude-secondary: #4B535A;
  --claude-light-accent: #FBF0ED;
  --claude-primary: #0A2540;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: var(--claude-cream);
  display: flex;
  height: 100vh;
  color: var(--claude-text);
  line-height: 1.6;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--claude-sidebar);
  border-bottom: 1px solid var(--claude-border);
  color: var(--claude-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-left {
  position: absolute;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.claude-logo {
  height: 40px;
  width: 40px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.claude-logo:hover {
  transform: rotate(180deg);
}

.beanie-hat-logo {
  height: 50px;
  width: 50px;
  cursor: pointer;
}

.beanie-hat {
  transform-origin: 12px 6px;
  animation: beanie-sway 3s ease-in-out infinite;
}

@keyframes beanie-sway {
  0%, 100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

.beanie-hat-logo:hover .beanie-hat {
  animation: beanie-bounce 0.6s ease-in-out;
}

@keyframes beanie-bounce {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-5px) rotate(-5deg);
  }
  50% {
    transform: translateY(0) rotate(5deg);
  }
  75% {
    transform: translateY(-3px) rotate(-3deg);
  }
}

.logo-animation-group {
  transform-origin: center;
  animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

.logo-spike {
  animation: spike-float 4s ease-in-out infinite;
}

.logo-spike:nth-child(2) { animation-delay: 0s; }
.logo-spike:nth-child(3) { animation-delay: 0.5s; }
.logo-spike:nth-child(4) { animation-delay: 1s; }
.logo-spike:nth-child(5) { animation-delay: 1.5s; }
.logo-spike:nth-child(6) { animation-delay: 2s; }
.logo-spike:nth-child(7) { animation-delay: 2.5s; }
.logo-spike:nth-child(8) { animation-delay: 3s; }
.logo-spike:nth-child(9) { animation-delay: 3.5s; }

@keyframes spike-float {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.mdhub-text {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--claude-text);
  letter-spacing: -0.01em;
}

.sheptech-logo-header {
  height: 36px;
  width: auto;
  transition: opacity 0.2s ease;
}

.sheptech-logo-header:hover {
  opacity: 0.8;
}

.sheptech-text {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--claude-secondary);
  opacity: 0.5;
  text-transform: uppercase;
}

header h1 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--claude-text);
  margin: 0;
}

.search-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.search-bar {
  width: 100%;
  padding: 10px 18px;
  border: 1px solid var(--claude-border);
  border-radius: 8px;
  background: var(--claude-cream);
  color: var(--claude-text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.search-bar::placeholder {
  color: var(--claude-secondary);
  opacity: 0.6;
}

.search-bar:focus {
  outline: none;
  border-color: var(--claude-accent);
  background: var(--claude-card-bg);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1);
}

.header-right {
  position: absolute;
  right: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Flagged Questions Link */
.flagged-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background-color: var(--claude-card-bg);
  border: 1.5px solid var(--claude-border);
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s ease;
  color: var(--claude-text);
}

.flagged-link:hover {
  background-color: var(--claude-light-accent);
  border-color: var(--claude-accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(217, 119, 87, 0.15);
}

.flagged-count {
  background-color: #ff6b6b;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Authentication Button */
.auth-button {
  padding: 8px 18px;
  background-color: var(--claude-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

.auth-button:hover {
  background-color: var(--claude-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.25);
}

/* User Profile Circle */
.user-profile {
  position: relative;
}

.user-initial-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--claude-text);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(10, 10, 10, 0.2);
  font-family: 'Georgia', 'Times New Roman', serif;
  letter-spacing: -0.01em;
}

.user-initial-circle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 10, 10, 0.3);
}

/* User Dropdown */
.user-dropdown {
  display: none;
  position: absolute;
  top: 52px;
  right: 0;
  background: var(--claude-card-bg);
  border: 1px solid var(--claude-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 240px;
  z-index: 1000;
  animation: dropdownFadeIn 0.2s ease;
}

.user-dropdown.show {
  display: block;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--claude-border);
}

.dropdown-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--claude-text);
  margin-bottom: 4px;
}

.dropdown-user-email {
  font-size: 13px;
  color: var(--claude-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-signout-btn {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--claude-accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
  border-radius: 0;
}

.dropdown-signout-btn:hover {
  background: var(--claude-light-accent);
}

.dropdown-switch-year-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 8px 16px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  font-family: Georgia, 'Times New Roman', serif;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.dropdown-switch-year-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Dark Mode Toggle */
.dark-mode-toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--claude-border);
  border-radius: 0 0 12px 12px;
}

.dark-mode-label {
  font-size: 14px;
  color: var(--claude-text);
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: all 0.3s ease;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--claude-text);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-switch:hover .toggle-slider {
  opacity: 0.9;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--claude-sidebar);
  border-right: 1px solid var(--claude-border);
  color: var(--claude-text);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  margin-top: 72px;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding: 16px 0;
  text-align: center;
  font-size: 11px;
  color: rgba(10, 37, 64, 0.5);
  font-weight: 400;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.sidebar h2 {
  font-size: 14px;
  margin: 24px 0 8px 0;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  background-color: transparent;
  color: var(--claude-text);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flagged-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 16px;
  color: #dc3545;
  filter: drop-shadow(0 1px 2px rgba(220, 53, 69, 0.3));
}

.sidebar h2:first-child {
  margin-top: 8px;
}

.sidebar h2:hover {
  background-color: var(--claude-light-accent);
}

.sidebar h2.active {
  background-color: var(--claude-light-accent);
  color: var(--claude-accent);
}

/* Sidebar Icons */
.sidebar-icon {
  margin-right: 8px;
  flex-shrink: 0;
}

#scpsToggle .sidebar-icon {
  position: relative;
  top: 3px;
}

/* Main Section Headings - Past Exams and SCPs Toggle */
.sidebar-main-heading,
#osceTimerSection,
#pastExamsSection,
#scpsToggle {
  font-size: 16px;
  font-weight: 400;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 12px 14px;
  background-color: transparent;
  border-left: 3px solid transparent;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  text-transform: none;
}

#osceTimerSection {
  text-transform: capitalize;
}

#pastExamsSection {
  text-transform: capitalize;
}

#scpsToggle {
  margin-top: 4px;
}

#osceTimerSection:hover,
#pastExamsSection:hover,
#scpsToggle:hover {
  background-color: var(--claude-light-accent);
  border-left-color: var(--claude-border);
}

#osceTimerSection.active,
#pastExamsSection.active,
#scpsToggle.active {
  background-color: var(--claude-light-accent);
  color: var(--claude-accent);
  border-left-color: var(--claude-accent);
}

/* Sub-headings under SCPs (Flagged Cases, All SCPs, Medicine, Surgery) */
#scpsContent > h2 {
  font-size: 13px;
  font-weight: 500;
  margin: 8px 0 4px 0;
}

/* First sub-heading (Flagged Cases or All SCPs) - closer to SCPs heading */
#scpsContent > h2:first-child {
  margin-top: 4px;
}

/* Surgery heading - add more space above to separate from Medicine section */
#scpsContent > h2[data-group="surgery"] {
  margin-top: 16px;
}

#scpsContent > h2:hover {
  background-color: var(--claude-light-accent);
}

#scpsContent > h2.active {
  background-color: var(--claude-light-accent);
  color: var(--claude-accent);
}

/* SCPs toggle chevron positioning */
#scpsToggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scps-toggle-content {
  flex: 0 0 auto;
}

.chevron-icon {
  font-size: 1.2em;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  margin-left: auto;
}

/* Completion Progress for Sidebar Headings */
.completion-text {
  font-size: 11px;
  color: var(--claude-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.completion-bar {
  height: 4px;
  background-color: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 3px;
}

.completion-bar-fill {
  height: 100%;
  background-color: #4CAF50;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Hide total count for subspecialties */
.specialty .count {
  display: none;
}

/* Right-align completion text for subspecialties */
.specialty .completion-text {
  position: absolute;
  right: 14px;
  top: 10px;
  margin-top: 0;
}

/* Make specialty position relative for absolute positioning */
.specialty {
  position: relative;
}

.specialty {
  margin: 2px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 10px 28px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 15px;
  font-weight: 400;
  color: var(--claude-secondary);
}

.specialty:hover {
  background-color: var(--claude-light-accent);
  color: var(--claude-text);
}

.specialty.active {
  background-color: var(--claude-light-accent);
  color: var(--claude-accent);
  font-weight: 500;
}

.specialty .count {
  font-size: 13px;
  color: var(--claude-secondary);
  opacity: 0.7;
}

/* Main Area */
.main {
  flex: 1;
  padding: 96px 40px 40px 40px;
  overflow-y: auto;
  max-width: 1400px;
  margin: 0 auto;
}

.week {
  font-size: 24px;
  margin: 56px 0 24px 0;
  padding-top: 32px;
  color: var(--claude-text);
  font-weight: 500;
  letter-spacing: -0.02em;
  border-top: 1px solid var(--claude-border);
  font-family: 'Georgia', 'Times New Roman', serif;
}

.week:first-of-type,
.week.first-visible-week {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* Welcome Page */
#welcomePage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  width: 100%;
}

.welcome-container {
  text-align: center;
  max-width: 900px;
  padding: 40px;
}

.welcome-greeting {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 56px;
  font-weight: 400;
  color: var(--claude-text);
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.welcome-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--claude-secondary);
  margin: 0;
  letter-spacing: -0.01em;
}

/* Holiday Message Styles */
.holiday-section {
  margin-top: 60px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  border: 1px solid var(--claude-border);
}

.holiday-message {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--claude-text);
  margin: 0 0 30px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
}

.santa-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.santa-emoji {
  font-size: 120px;
  line-height: 1;
  animation: gentle-bounce 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes gentle-bounce {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Snowfall Canvas */
#snowfallCanvas {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: calc(100vh - 72px);
  pointer-events: none;
  z-index: 999;
  background: transparent;
}

#welcomePage {
  position: relative;
}

#welcomePage .welcome-container {
  position: relative;
  z-index: 10;
}

/* Exam Timeline Styles */
.exam-timeline-container {
  margin-top: 48px;
  padding: 48px 40px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  border: 1px solid var(--claude-border);
}

.exam-countdown-top {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.countdown-text {
  font-size: 16px;
  color: var(--claude-text);
  margin: 0;
  font-weight: 400;
}

.countdown-text strong {
  font-size: 18px;
  font-weight: 600;
  color: var(--claude-accent);
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}

.exam-timeline-track {
  position: relative;
  height: 10px;
  background-color: var(--claude-border);
  border-radius: 5px;
  margin: 60px 0;
  overflow: visible;
}

.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--claude-accent), var(--claude-primary));
  border-radius: 5px;
  width: 25%;
  transition: width 1s ease-out;
  animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.9;
  }
}

.running-student {
  position: absolute;
  left: 25%;
  top: -28px;
  font-size: 36px;
  transform: translateX(-50%) scaleX(-1);
  animation: student-run 2s ease-in-out infinite;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes student-run {
  0%, 100% {
    transform: translateX(-50%) scaleX(-1) translateY(0px);
  }
  50% {
    transform: translateX(-50%) scaleX(-1) translateY(-4px);
  }
}

.exam-marker {
  position: absolute;
  top: -35px;
  transform: translateX(-50%);
  text-align: center;
}

.marker-pole {
  width: 2px;
  height: 70px;
  background-color: var(--claude-accent);
  margin: 0 auto 8px auto;
}

.marker-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--claude-text);
  margin-bottom: 4px;
}

.marker-date {
  font-size: 12px;
  color: var(--claude-secondary);
  white-space: nowrap;
}

.finish-line {
  position: absolute;
  right: -20px;
  top: -32px;
  text-align: center;
}

.finish-beer {
  font-size: 40px;
  animation: beer-bounce 3s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.finish-beer:hover {
  transform: scale(1.2);
}

@keyframes beer-bounce {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

.encouragement-text {
  font-size: 18px;
  font-weight: 500;
  color: var(--claude-primary);
  margin-bottom: 32px;
  text-align: center;
  font-style: italic;
}

/* Pint Easter Egg */
.pint-easter-egg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.pint-love-text {
  position: absolute;
  font-size: 24px;
  font-weight: 600;
  color: var(--claude-accent);
  white-space: nowrap;
  animation: fall-and-fade 4s linear forwards;
  opacity: 0.9;
}

@keyframes fall-and-fade {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.9;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.case-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
}

.case-card {
  width: 280px;
  height: 140px;
  min-width: 280px;
  max-width: 280px;
  min-height: 140px;
  max-height: 140px;
  background: var(--claude-card-bg);
  border: 1px solid var(--claude-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  flex-shrink: 0;
  flex-grow: 0;
  position: relative;
}

.case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217, 119, 87, 0.12);
  border-color: var(--claude-accent);
}

a.case-card {
  color: inherit;
}

.case-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  color: var(--claude-text);
  text-align: center;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* Completion Badge */
.completion-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: #4CAF50;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.completion-badge:hover {
  background-color: #45a049;
  box-shadow: 0 2px 12px rgba(76, 175, 80, 0.4);
  transform: scale(1.05);
}

/* Tooltip for completed badge */
.completion-badge::after {
  content: 'Mark as Not Attempted';
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.completion-badge:hover::after {
  opacity: 1;
}

/* Incomplete Completion Badge - Grey Outline */
.completion-badge-incomplete {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: transparent;
  color: #ccc;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.completion-badge-incomplete:hover {
  border-color: #4CAF50;
  color: #4CAF50;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

/* Tooltip for incomplete badge */
.completion-badge-incomplete::after {
  content: 'Mark Case as Completed';
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.completion-badge-incomplete:hover::after {
  opacity: 1;
}

.case-card.completed {
  border-color: #4CAF50;
  background: linear-gradient(135deg, #FFFFFF 0%, #F0FFF0 100%);
}

/* Case Flag Bookmark */
.case-flag-bookmark {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 20px;
  height: 26px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s ease;
  background-image: url('../assets/bookmark-outline.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.case-flag-bookmark:hover {
  background-image: url('../assets/bookmark-outline-red.svg');
}

.case-flag-bookmark.flagged {
  background-image: url('../assets/bookmark-filled-red.svg');
}

/* Tooltip for bookmark */
.case-flag-bookmark::after {
  content: 'Flag this case';
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.case-flag-bookmark:hover::after {
  opacity: 1;
}

/* Flagged Question Count Badge */
.flagged-question-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
  z-index: 2;
  pointer-events: none;
  transition: all 0.2s ease;
}

.case-card:hover .flagged-question-count {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(255, 107, 107, 0.4);
}

.case-flag-bookmark.flagged::after {
  content: 'Unflag this case';
}

/* Flagged Questions Count Badge */
.flagged-questions-count {
  position: absolute !important;
  bottom: 12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  color: #a02030 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  z-index: 2 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

/* Progress Stats */
.progress-stats {
  background: var(--claude-light-accent);
  border: 1px solid var(--claude-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.progress-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--claude-text);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: var(--claude-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--claude-accent), #4CAF50);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 13px;
  color: var(--claude-secondary);
  text-align: center;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(43, 31, 21, 0.5);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--claude-card-bg);
  width: 96%;
  max-width: 1600px;
  height: 90%;
  overflow-y: auto;
  border-radius: 16px;
  padding: 40px 48px;
  position: relative;
  animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--claude-border);
}

/* SAQ Exam Modal - width to fit 2 exam tiles */
#saqExamModal .modal-content {
  max-width: 500px;
  width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

#saqExamModal h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 28px;
  cursor: pointer;
  color: var(--claude-secondary);
  transition: color 0.2s;
  line-height: 1;
}

.close-btn:hover {
  color: var(--claude-accent);
}

h2, h3 {
  margin-top: 20px;
}

.question {
  margin-top: 16px;
}

.answer {
  display: none;
  background: var(--claude-light-accent);
  margin-top: 8px;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--claude-border);
}

button.toggle {
  margin-top: 12px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: var(--claude-accent);
  color: white;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

button.toggle:hover {
  background-color: var(--claude-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.25);
}

/* Authentication Modal */
.auth-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
}

/* Auth Hero Text */
.auth-hero-text {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--claude-card-bg);
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0;
  text-align: center;
}

@keyframes heroTextPulse {
  0%, 100% {
    text-shadow: 0 0 20px rgba(217, 119, 87, 0.8),
                 0 0 40px rgba(217, 119, 87, 0.5),
                 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  50% {
    text-shadow: 0 0 30px rgba(217, 119, 87, 1),
                 0 0 50px rgba(217, 119, 87, 0.7),
                 0 2px 10px rgba(0, 0, 0, 0.3);
  }
}

/* Hologram Logo */
.auth-hologram-container {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 2001;
  pointer-events: none;
}

.hologram-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hologram-image {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
  opacity: 0.9;
}

.hologram-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--claude-accent);
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes hologramSpin {
  0% {
    transform: rotateY(0deg) rotateX(0deg);
  }
  100% {
    transform: rotateY(360deg) rotateX(0deg);
  }
}

@keyframes hologramFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes hologramPulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(217, 119, 87, 0.6))
            drop-shadow(0 0 40px rgba(217, 119, 87, 0.4))
            drop-shadow(0 0 60px rgba(217, 119, 87, 0.2));
    opacity: 1;
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(217, 119, 87, 0.8))
            drop-shadow(0 0 50px rgba(217, 119, 87, 0.6))
            drop-shadow(0 0 70px rgba(217, 119, 87, 0.4));
    opacity: 0.9;
  }
}

@keyframes hologramTextPulse {
  0%, 100% {
    text-shadow: 0 0 10px rgba(217, 119, 87, 0.8),
                 0 0 20px rgba(217, 119, 87, 0.6),
                 0 0 30px rgba(217, 119, 87, 0.4);
    opacity: 1;
  }
  50% {
    text-shadow: 0 0 15px rgba(217, 119, 87, 1),
                 0 0 30px rgba(217, 119, 87, 0.8),
                 0 0 45px rgba(217, 119, 87, 0.6);
    opacity: 0.9;
  }
}

.auth-modal-content {
  background: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 40px;
  border-radius: 20px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@media (max-height: 700px) {
  .auth-modal-content {
    top: 20px;
    transform: translate(-50%, 0);
    margin-bottom: 20px;
  }
}

@keyframes slideDown {
  0% {
    transform: translate(-50%, -60%);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

.auth-modal-close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  line-height: 20px;
  background: none;
  border: none;
  padding: 0;
}

.auth-modal-close:hover {
  color: #000;
}

.auth-modal h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--claude-text);
  margin: 0 0 8px 0;
  text-align: center;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--claude-secondary);
  text-align: center;
  margin: 0 0 24px 0;
  font-style: italic;
  opacity: 0.8;
}

.auth-form {
  margin-top: 0;
}

.auth-form input {
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  border: 2px solid #e8ecef;
  border-radius: 10px;
  font-size: 1rem;
  font-family: Georgia, 'Times New Roman', serif;
  transition: border-color 0.3s ease;
  background: white;
  color: var(--claude-text);
  box-sizing: border-box;
}

.auth-form input:focus {
  outline: none;
  border-color: #D97757;
}

.auth-submit-button {
  width: 100%;
  background: #D97757;
  color: white;
  border: none;
  padding: 15px;
  font-size: 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 20px;
  font-family: Georgia, 'Times New Roman', serif;
  transition: all 0.3s ease;
}

.auth-submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(217, 119, 87, 0.3);
  background: #c66847;
}

.auth-submit-button:disabled {
  background-color: var(--claude-border);
  cursor: not-allowed;
  transform: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 16px 0;
  color: var(--claude-secondary);
  opacity: 0.6;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--claude-border);
}

.auth-divider span {
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
}

.auth-signup-button {
  width: 100%;
  padding: 12px 20px;
  background-color: transparent;
  color: var(--claude-accent);
  border: 2px solid var(--claude-accent);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.auth-signup-button:hover {
  background-color: var(--claude-accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.25);
}

.auth-signup-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  color: #D97757;
  cursor: pointer;
  font-size: 14px;
}

.auth-link a {
  color: #D97757;
  text-decoration: none;
  font-weight: 500;
}

.auth-link a:hover {
  text-decoration: underline;
}

.auth-error {
  background-color: #f44336;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.auth-description {
  font-size: 14px;
  color: var(--claude-secondary);
  text-align: center;
  margin: 0 0 16px 0;
}

/* Auth Modal Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8ecef;
  margin-bottom: 25px;
  margin-top: 20px;
}

.auth-tab {
  flex: 1;
  padding: 15px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #5a6c7d;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: Georgia, 'Times New Roman', serif;
  margin-bottom: -2px;
}

.auth-tab:hover {
  color: #D97757;
}

.auth-tab.active {
  color: #D97757;
  border-bottom-color: #D97757;
  font-weight: 600;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-right: 12px;
  color: var(--claude-text);
  font-size: 24px;
  transition: color 0.2s ease;
}

.mobile-menu-toggle:hover {
  color: var(--claude-accent);
}

/* Mobile Search - Hidden on Desktop */
.mobile-search {
  display: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--claude-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--claude-accent);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  header {
    padding: 0 16px;
    height: 60px;
    justify-content: flex-start;
  }

  .header-left {
    position: static;
    gap: 10px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .sheptech-logo-header {
    height: 32px;
  }

  .search-container {
    display: none;
  }

  .header-right {
    position: static;
    margin-left: auto;
  }

  /* Sidebar becomes a slide-out menu */
  .sidebar {
    position: fixed;
    top: 60px;
    left: -280px;
    width: 280px;
    height: calc(100vh - 60px);
    margin-top: 0;
    z-index: 200;
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  }

  .sidebar.open {
    left: 0;
  }

  /* Overlay when sidebar is open */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(43, 31, 21, 0.5);
    z-index: 150;
    backdrop-filter: blur(2px);
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* Main content adjustments */
  .main {
    width: 100%;
    margin-top: 60px;
    padding: 24px 16px;
  }

  .week {
    font-size: 20px;
    margin: 40px 0 20px 0;
    padding-top: 24px;
  }

  .week:first-of-type {
    margin-top: 0;
  }

  .case-grid {
    gap: 16px;
    justify-content: center;
  }

  .case-card {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
  }

  /* Welcome page mobile adjustments */
  .welcome-greeting {
    font-size: 36px;
  }

  .welcome-subtitle {
    font-size: 18px;
  }

  .welcome-container {
    padding: 20px;
  }

  /* Holiday message mobile adjustments */
  .holiday-section {
    margin-top: 40px;
    padding: 24px;
  }

  .holiday-message {
    font-size: 28px;
  }

  .santa-emoji {
    font-size: 80px;
  }

  /* Mobile search - show at top of main content */
  .main::before {
    content: '';
    display: block;
    margin-bottom: 24px;
  }

  /* Add search to mobile */
  .mobile-search {
    display: block;
    margin-bottom: 24px;
    padding: 0;
  }

  .mobile-search .search-bar {
    width: 100%;
  }

  /* Auth hero text responsive */
  .auth-hero-text {
    font-size: 32px;
    padding: 0 20px;
  }

  /* Logo on mobile - smaller and adjusted position */
  .auth-hologram-container {
    bottom: 20px;
    right: 20px;
  }

  .hologram-image {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.15));
  }

  .hologram-text {
    font-size: 10px;
  }
}

/* Past Exams Section */
#pastExamsContent {
  display: none;
}

#pastExamsContent .week,
#pastExamsContent .case-grid {
  display: block !important;
}

#pastExamsContent .case-grid {
  display: flex !important;
}

/* Force Past Exams cards to always be visible */
#pastExamsContent .case-card {
  display: flex !important;
}

/* Exam Modal Enhancements */
.exam-item {
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--claude-border);
  border-radius: 12px;
  background: var(--claude-card-bg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.exam-item:hover {
  border-color: var(--claude-accent);
  background: var(--claude-light-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(204, 120, 92, 0.15);
}

.exam-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.exam-item h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--claude-text);
}

.exam-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.exam-completion-badge {
  padding: 4px 10px;
  background: #4CAF50;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  display: none;
}

.exam-completion-badge.completed {
  display: inline-block;
}

.exam-flags-badge {
  padding: 4px 10px;
  background: #ff6b6b;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  display: none;
}

.exam-flags-badge.has-flags {
  display: inline-block;
}

.mark-complete-btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--claude-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
}

.mark-complete-btn:hover {
  background: var(--claude-hover);
  transform: translateY(-1px);
}

.mark-complete-btn.completed {
  background: #4CAF50;
}

.exam-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
}

/* Exam Category Titles */
.exam-category-title {
  font-size: 24px;
  margin: 56px 0 24px 0;
  padding-top: 32px;
  color: var(--claude-text);
  font-weight: 500;
  letter-spacing: -0.02em;
  border-top: 1px solid var(--claude-border);
  font-family: 'Georgia', 'Times New Roman', serif;
}

.exam-category-title:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* New exam card style matching case cards */
.exam-card-style {
  position: relative;
  width: 280px;
  height: 140px;
  min-width: 280px;
  max-width: 280px;
  min-height: 140px;
  max-height: 140px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch !important;
  padding: 20px;
  box-sizing: border-box;
}

.exam-card-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exam-card-style .exam-card-top h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--claude-text);
  text-align: left !important;
}

.exam-card-bottom {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px;
  align-items: flex-start !important;
  width: 100% !important;
  text-align: left !important;
}

.exam-flagged-badge {
  padding: 4px 10px;
  background: rgba(255, 107, 107, 0.08);
  border: 1.5px solid #ff6b6b;
  color: #ff6b6b;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
}

.exam-completion-icon {
  display: none !important;
}

.exam-attempts-count {
  font-size: 12px;
  color: var(--claude-secondary);
  font-weight: 500;
  text-align: left !important;
  width: 100%;
  align-self: flex-start !important;
  margin-right: auto !important;
}

.exam-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
  align-self: flex-start !important;
}

.exam-progress-fill {
  height: 100%;
  background: #4CAF50;
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }

  .search-container {
    max-width: 400px;
    margin: 0 24px;
  }

  header {
    padding: 0 24px;
  }

  .main {
    padding: 80px 32px 32px 32px;
  }

  .case-card {
    width: calc(50% - 10px);
    max-width: calc(50% - 10px);
    min-width: calc(50% - 10px);
  }
}

/* ===== DARK MODE ===== */
body.dark-mode {
  --claude-cream: #1a1a1a;
  --claude-text: #e8e8e8;
  --claude-accent: #D97757;
  --claude-hover: #C5654A;
  --claude-border: #333333;
  --claude-card-bg: #242424;
  --claude-sidebar: #1f1f1f;
  --claude-secondary: #b0b0b0;
  --claude-light-accent: #2a2a2a;
  --claude-primary: #e8e8e8;
  background-color: var(--claude-cream);
  color: var(--claude-text);
}

body.dark-mode .search-bar {
  background: #2a2a2a;
  color: var(--claude-text);
  border-color: var(--claude-border);
}

body.dark-mode .case-card {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
  color: var(--claude-text);
}

body.dark-mode .week {
  color: var(--claude-text);
  border-color: var(--claude-border);
}

body.dark-mode header {
  background: var(--claude-sidebar);
  border-bottom-color: var(--claude-border);
}

body.dark-mode .sidebar {
  background-color: var(--claude-sidebar);
  border-right-color: var(--claude-border);
}

body.dark-mode .auth-modal-content {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
}

body.dark-mode .auth-modal {
  background: rgba(0, 0, 0, 0.85);
}

body.dark-mode .auth-tabs {
  border-bottom-color: var(--claude-border);
}

body.dark-mode .auth-tab {
  color: #b0b0b0;
}

body.dark-mode .auth-tab:hover {
  color: #D97757;
}

body.dark-mode .auth-tab.active {
  color: #D97757;
  border-bottom-color: #D97757;
}

body.dark-mode .auth-form input {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
  color: var(--claude-text);
}

body.dark-mode .auth-form input:focus {
  border-color: #D97757;
}

body.dark-mode .user-dropdown {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
}

body.dark-mode .user-initial-circle {
  background: var(--claude-text);
  color: #1a1a1a;
}

body.dark-mode .claude-logo path,
body.dark-mode .claude-logo circle {
  stroke: var(--claude-text);
  fill: var(--claude-text);
}

body.dark-mode .beanie-hat-logo .beanie-hat {
  filter: brightness(1.1);
}

body.dark-mode .lock-overlay {
  background: rgba(26, 26, 26, 0.65);
}

body.dark-mode .lock-content {
  background: rgba(30, 30, 30, 0.95);
  border-color: rgba(217, 119, 87, 0.5);
}

body.dark-mode .lock-text {
  color: #b0b0b0;
}

body.dark-mode .lock-content:hover {
  background: rgba(217, 119, 87, 0.15);
  border-color: rgba(217, 119, 87, 0.6);
}

body.dark-mode .hologram-image path,
body.dark-mode .hologram-image circle {
  stroke: var(--claude-text);
  fill: var(--claude-text);
}

/* Exam cards and modals in dark mode */
body.dark-mode .exam-type-card {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
  color: var(--claude-text);
}

body.dark-mode .exam-type-card:hover {
  background: var(--claude-light-accent);
}

/* Coming Soon Exam Cards */
.exam-type-card.coming-soon {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
  background: var(--claude-card-bg);
  border: 1px dashed var(--claude-border);
}

.exam-type-card.coming-soon h3 {
  color: var(--claude-secondary);
}

.coming-soon-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--claude-border);
  color: var(--claude-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.dark-mode .exam-type-card.coming-soon {
  opacity: 0.5;
  background: var(--claude-card-bg);
  border: 1px dashed var(--claude-border);
}

body.dark-mode .coming-soon-badge {
  background: var(--claude-border);
  color: var(--claude-secondary);
}

body.dark-mode .modal {
  background: rgba(0, 0, 0, 0.85);
}

body.dark-mode .modal-content {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
  color: var(--claude-text);
}

body.dark-mode .exam-card-style {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
}

body.dark-mode .exam-card-header h3 {
  color: var(--claude-text);
}

body.dark-mode .exam-progress-bar {
  background: #333333;
}

body.dark-mode .exam-attempts-count {
  color: var(--claude-secondary);
}

body.dark-mode .close-btn {
  color: var(--claude-secondary);
}

body.dark-mode .close-btn:hover {
  color: var(--claude-text);
}

body.dark-mode .specialty {
  color: var(--claude-secondary);
}

body.dark-mode .specialty:hover {
  color: var(--claude-text);
}

body.dark-mode .mdhub-text {
  color: var(--claude-text);
}

/* Additional Exam Modal Dark Mode Styles */
body.dark-mode .exam-item {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
}

body.dark-mode .exam-item:hover {
  background: var(--claude-light-accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .exam-item h3 {
  color: var(--claude-text);
}

body.dark-mode .exam-meta {
  color: var(--claude-secondary);
}

body.dark-mode .exam-completion-badge {
  background: var(--claude-border);
  color: var(--claude-secondary);
}

body.dark-mode .exam-completion-badge.completed {
  background: #4CAF50;
  color: white;
}

body.dark-mode .exam-flags-badge {
  background: var(--claude-border);
  color: var(--claude-secondary);
}

body.dark-mode .exam-flags-badge.has-flags {
  background: #dc3545;
  color: white;
}

body.dark-mode .exam-category-title {
  color: var(--claude-text);
  border-bottom-color: var(--claude-border);
}

body.dark-mode .exam-card-top h3 {
  color: var(--claude-text);
}

body.dark-mode .exam-card-bottom {
  background: var(--claude-light-accent);
  border-top-color: var(--claude-border);
}

body.dark-mode .exam-flagged-badge {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border-color: #dc3545;
}

body.dark-mode .exam-completion-icon {
  color: var(--claude-secondary);
}

body.dark-mode .exam-progress-fill {
  background: var(--claude-accent);
}

body.dark-mode #saqExamModal .modal-content,
body.dark-mode #mcqExamModal .modal-content {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark-mode #saqExamModal h2,
body.dark-mode #mcqExamModal h2 {
  color: var(--claude-text);
}

body.dark-mode .modal h2,
body.dark-mode .modal h3 {
  color: var(--claude-text);
}

body.dark-mode .modal .question {
  background: var(--claude-card-bg);
  border-color: var(--claude-border);
  color: var(--claude-text);
}

body.dark-mode .modal .answer {
  background: var(--claude-light-accent);
  border-color: var(--claude-border);
  color: var(--claude-text);
}

/* ============================================
   LUDICROUS MODE - ABSOLUTE CHAOS
   ============================================ */

/* CSS Variables for dynamic colors */
:root {
  --ludicrous-bg-hue: 280;
}

/* Ludicrous mode body styles */
body.ludicrous-mode {
  background: linear-gradient(
    135deg,
    hsl(var(--ludicrous-bg-hue), 100%, 85%),
    hsl(calc(var(--ludicrous-bg-hue) + 60), 100%, 75%),
    hsl(calc(var(--ludicrous-bg-hue) + 120), 100%, 85%)
  ) !important;
  background-size: 400% 400%;
  animation: ludicrous-gradient 8s ease infinite !important;
  transition: background 0.5s ease;
}

/* Confetti particles */
.ludicrous-confetti {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  z-index: 999999;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Card wobble animation */
@keyframes ludicrous-wobble {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(2deg) scale(1.02); }
  50% { transform: rotate(0deg) scale(1.05); }
  75% { transform: rotate(-2deg) scale(1.02); }
}

@keyframes ludicrous-mega-wobble {
  0%, 100% { transform: rotate(0deg) scale(1.1); }
  25% { transform: rotate(5deg) scale(1.15); }
  50% { transform: rotate(0deg) scale(1.2); }
  75% { transform: rotate(-5deg) scale(1.15); }
}

/* Rainbow gradient animation */
@keyframes ludicrous-rainbow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Spinning logo */
@keyframes ludicrous-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Background gradient animation */
@keyframes ludicrous-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Shake animation */
@keyframes ludicrous-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Ludicrous mode card styles with readable text */
body.ludicrous-mode .case-card,
body.ludicrous-mode .exam-card-style {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 3px solid;
  border-image: linear-gradient(
    45deg,
    #ff0000, #ff7f00, #ffff00, #00ff00,
    #0000ff, #4b0082, #9400d3
  ) 1;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5),
              0 0 40px rgba(0, 255, 255, 0.3) !important;
  transition: all 0.3s ease;
}

body.ludicrous-mode.dark-mode .case-card,
body.ludicrous-mode.dark-mode .exam-card-style {
  background: rgba(30, 30, 40, 0.95) !important;
  color: #ffffff !important;
}

/* Ensure text is readable */
body.ludicrous-mode .case-card .case-title,
body.ludicrous-mode .case-card p,
body.ludicrous-mode .case-card .case-meta,
body.ludicrous-mode .exam-card-style h3,
body.ludicrous-mode .exam-card-style p {
  color: #1a1a1a !important;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

body.ludicrous-mode.dark-mode .case-card .case-title,
body.ludicrous-mode.dark-mode .case-card p,
body.ludicrous-mode.dark-mode .case-card .case-meta,
body.ludicrous-mode.dark-mode .exam-card-style h3,
body.ludicrous-mode.dark-mode .exam-card-style p {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Pulsing buttons */
body.ludicrous-mode button,
body.ludicrous-mode .auth-button {
  animation: ludicrous-pulse 2s ease-in-out infinite;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: 2px solid #fff !important;
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
  color: white !important;
}

@keyframes ludicrous-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(102, 126, 234, 0.6); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(118, 75, 162, 0.8); }
}

/* Ludicrous mode header */
body.ludicrous-mode header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4) !important;
}

body.ludicrous-mode .logo,
body.ludicrous-mode .nav-link {
  color: white !important;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Sidebar in ludicrous mode */
body.ludicrous-mode .sidebar {
  background: linear-gradient(180deg, #a8edea 0%, #fed6e3 100%) !important;
  border-right: 3px solid #667eea !important;
}

body.ludicrous-mode .sidebar-link {
  color: #333 !important;
  transition: all 0.3s ease;
}

body.ludicrous-mode .sidebar-link:hover {
  background: rgba(102, 126, 234, 0.3) !important;
  transform: translateX(10px) scale(1.1);
}

/* Floating animation for toggle slider */
.ludicrous-slider {
  animation: ludicrous-float 3s ease-in-out infinite;
}

@keyframes ludicrous-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-3px); }
}

/* Modal in ludicrous mode */
body.ludicrous-mode .modal-content {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 5px solid;
  border-image: linear-gradient(
    45deg,
    #ff0000, #ff7f00, #ffff00, #00ff00,
    #0000ff, #4b0082, #9400d3
  ) 1;
  box-shadow: 0 0 50px rgba(102, 126, 234, 0.8) !important;
}

body.ludicrous-mode.dark-mode .modal-content {
  background: rgba(30, 30, 40, 0.98) !important;
}

/* Sparkle cursor effect */
body.ludicrous-mode {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><text y="20" font-size="20">✨</text></svg>'), auto;
}

/* Text selection in ludicrous mode */
body.ludicrous-mode ::selection {
  background: rgba(255, 0, 255, 0.5);
  color: white;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Scrollbar in ludicrous mode */
body.ludicrous-mode ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

body.ludicrous-mode ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   LUDICROUS MODE VORTEX TRANSITION
   ============================================ */

/* Vortex overlay */
.ludicrous-vortex {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle, #000000 0%, #1a0033 50%, #000000 100%);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Spiral vortex elements */
.vortex-spiral {
  position: absolute;
  width: 200vw;
  height: 200vh;
  border: 20px solid;
  border-color: transparent transparent #ff00ff transparent;
  border-radius: 50%;
  animation: vortex-spin 2s linear infinite;
  opacity: 0.6;
}

.vortex-spiral-2 {
  border-color: transparent #00ffff transparent transparent;
  animation-delay: -0.66s;
  animation-duration: 1.5s;
}

.vortex-spiral-3 {
  border-color: transparent transparent transparent #ffff00;
  animation-delay: -1.33s;
  animation-duration: 1.8s;
}

@keyframes vortex-spin {
  0% {
    transform: rotate(0deg) scale(0.1);
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    transform: rotate(720deg) scale(3);
    opacity: 0;
  }
}

/* Vortex sheep animation */
.vortex-sheep {
  position: relative;
  width: 300px;
  height: 300px;
  z-index: 10;
  animation: vortex-sheep-spin 3s ease-in forwards;
  opacity: 1;
  transform: scale(2) rotate(0deg);
  filter: drop-shadow(0 0 30px #ff00ff)
          drop-shadow(0 0 60px #00ffff)
          drop-shadow(0 0 90px #ffff00);
}

@keyframes vortex-sheep-spin {
  0% {
    opacity: 1;
    transform: scale(2) rotate(0deg);
    filter: drop-shadow(0 0 30px #ff00ff)
            drop-shadow(0 0 60px #00ffff)
            drop-shadow(0 0 90px #ffff00)
            blur(0px);
  }
  33% {
    opacity: 1;
    transform: scale(2) rotate(0deg);
    filter: drop-shadow(0 0 40px #ff00ff)
            drop-shadow(0 0 70px #00ffff)
            drop-shadow(0 0 100px #ffff00)
            blur(0px);
  }
  50% {
    opacity: 1;
    transform: scale(1.5) rotate(-360deg);
    filter: drop-shadow(0 0 50px #ff00ff)
            drop-shadow(0 0 80px #00ffff)
            drop-shadow(0 0 110px #ffff00)
            blur(5px);
  }
  75% {
    opacity: 0.8;
    transform: scale(0.8) rotate(-1080deg);
    filter: drop-shadow(0 0 60px #ff00ff)
            drop-shadow(0 0 90px #00ffff)
            drop-shadow(0 0 120px #ffff00)
            blur(15px);
  }
  100% {
    opacity: 0;
    transform: scale(0) rotate(-1800deg);
    filter: drop-shadow(0 0 80px #ff00ff)
            drop-shadow(0 0 110px #00ffff)
            drop-shadow(0 0 140px #ffff00)
            blur(30px);
  }
}

/* Background pulse during vortex */
.ludicrous-vortex::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, #ff00ff, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: vortex-pulse 2s ease-out infinite;
}

@keyframes vortex-pulse {
  0% {
    width: 100px;
    height: 100px;
    opacity: 1;
  }
  100% {
    width: 2000px;
    height: 2000px;
    opacity: 0;
  }
}

/* Particle effects in vortex */
.vortex-spiral::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  box-shadow: 
    0 0 20px white,
    100px 50px 10px white,
    -150px -80px 15px #ff00ff,
    200px -100px 12px #00ffff,
    -100px 150px 8px #ffff00;
  animation: vortex-particles 3s linear infinite;
}

@keyframes vortex-particles {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) translateX(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) rotate(720deg) translateX(500px);
    opacity: 0;
  }
}

/* Distortion effect */
.ludicrous-vortex-active {
  animation: vortex-distort 0.5s ease-in-out;
}

@keyframes vortex-distort {
  0%, 100% {
    filter: blur(0px) hue-rotate(0deg);
  }
  50% {
    filter: blur(20px) hue-rotate(180deg);
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .vortex-sheep {
    width: 200px;
    height: 200px;
  }
}

/* Access Control - Locked Exam Styles */
.locked-exam {
  position: relative;
  cursor: not-allowed !important;
}

.locked-exam:hover {
  transform: none !important;
}

.lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(1px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  z-index: 5;
  gap: 8px;
}

.lock-content {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(217, 119, 87, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lock-content:hover {
  background: rgba(217, 119, 87, 0.1);
  border-color: rgba(217, 119, 87, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.lock-icon {
  font-size: 1rem;
  opacity: 0.8;
}

.lock-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.85rem;
  color: #5a6c7d;
  font-weight: 500;
  white-space: nowrap;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
