/* Enhanced App Styles - Extracted from public/app/index.html */

/* Base Theme & Body */
body {
  background: linear-gradient(135deg, #111827 0%, #0f1419 50%, #111827 100%);
  color: #e5e7eb;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.app-container {
  min-height: calc(100vh - 4rem);
}

/* Enhanced Navigation */
.nav-dark {
  background: rgba(31, 41, 55, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: none !important;
  box-shadow: 0 1px 0 rgba(96, 165, 250, 0.1) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(31, 41, 55, 0.7);
  backdrop-filter: blur(20px);
  border: none !important;
  box-shadow: none !important;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: none !important;
}

/* Enhanced Sections */
section>div {
  background: rgba(31, 41, 55, 0.8) !important;
  backdrop-filter: blur(20px);
  border: none !important;
  box-shadow: none !important;
  transition: all 0.3s ease;
}

/* Audio recorder styling */
.recorder-container {
  background: rgba(31, 41, 55, 0.8) !important;
  backdrop-filter: blur(20px);
  border: none !important;
  box-shadow: none !important;
  border-radius: 1rem !important;
  transition: all 0.3s ease;
}

.record-button {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: white;
  height: 60px;
  width: 60px;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.record-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.record-button.recording {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  animation: pulse 1.5s infinite;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

/* Continue recording button styling */
.continue-record-button {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white;
  height: 60px;
  width: 60px;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.continue-record-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.continue-record-button.recording {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  animation: pulse 1.5s infinite;
}

/* Type directly button styling */
.type-directly-button {
  background: linear-gradient(135deg, #4f46e5, #3730a3) !important;
  color: white;
  height: 60px;
  width: 60px;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.type-directly-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

/* Button container styling */
.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.button-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  text-align: center;
  color: #d1d5db;
  width: 7rem;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Visualizer */
.visualizer-container {
  background: rgba(17, 24, 39, 0.8) !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px);
  border-radius: 0.75rem !important;
  transition: all 0.3s ease;
  height: 40px !important;
  /* Make visualizer smaller */
  opacity: 0.8;
  /* Make it slightly subtle */
}

/* Format selector */
.format-selector {
  background: rgba(31, 41, 55, 0.8) !important;
  backdrop-filter: blur(15px);
  border: none !important;
  box-shadow: none !important;
  border-radius: 1rem !important;
  transition: all 0.3s ease;
}

.format-selector:hover {
  transform: translateY(-2px);
  box-shadow: none !important;
}

/* Transcription area */
.transcription-area {
  background: rgba(31, 41, 55, 0.8) !important;
  backdrop-filter: blur(15px);
  border: none !important;
  box-shadow: none !important;
  border-radius: 1rem !important;
  transition: all 0.3s ease;
}

/* Report area */
.report-container {
  background: rgba(31, 41, 55, 0.8) !important;
  backdrop-filter: blur(20px);
  border: none !important;
  box-shadow: none !important;
  border-radius: 1rem !important;
}

/* Modern Loading Animations */
.loading-animation {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  width: 60px;
}

/* Dot Pulse Animation */
.dot-pulse {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: #3b82f6;
  animation: dotPulse 1.5s infinite ease-in-out;
}

.dot-pulse__dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #3b82f6;
  animation: dotPulseDot 1.5s infinite ease-in-out;
}

.dot-pulse:before,
.dot-pulse:after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: #3b82f6;
  opacity: 0.7;
}

.dot-pulse:before {
  left: -20px;
  animation: dotPulseBefore 1.5s infinite ease-in-out;
}

.dot-pulse:after {
  right: -20px;
  animation: dotPulseAfter 1.5s infinite ease-in-out;
}

@keyframes dotPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes dotPulseBefore {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
  }
}

@keyframes dotPulseDot {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.8);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes dotPulseAfter {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
  }
}

/* Text Fade Animation */
@keyframes textFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Report editor */
.editor-container {
  background: rgba(31, 41, 55, 0.8) !important;
  backdrop-filter: blur(20px);
  border: none !important;
  box-shadow: none !important;
  border-radius: 1rem !important;
}

/* Enhanced Buttons */
button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border-radius: 0.75rem !important;
  font-weight: 600;
  letter-spacing: 0.025em;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Enhanced Form Elements */
select,
input[type="text"],
input[type="email"],
textarea {
  background: rgba(55, 65, 81, 0.8) !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease !important;
  border-radius: 0.75rem !important;
}

select:focus,
input:focus,
textarea:focus {
  box-shadow: none !important;
  outline: none !important;
  background: rgba(55, 65, 81, 0.9) !important;
}

/* Enhanced Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h1,
h2 {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Loading Enhancement */
.spinner {
  border-color: rgba(96, 165, 250, 0.2) !important;
  border-top-color: #60a5fa !important;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
}

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

::-webkit-scrollbar-track {
  background: rgba(31, 41, 55, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(96, 165, 250, 0.7);
}

/* Scroll Animations */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ripple Effect */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Moderately compact report cards */
.prose-sm {
  font-size: 0.85rem;
  line-height: 1.4rem;
}

.prose-sm p {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.prose-sm li {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Report card animations */
@keyframes flyIn {
  0% {
    opacity: 0;
    transform: translate(-50px, -50px) scale(0.8);
  }

  70% {
    transform: translate(5px, 5px) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

.animate-fly-in {
  animation: none;
  /* Don't run animation by default */
  opacity: 1;
  /* Start visible */
}

/* Class to trigger the animation */
.run-animation .animate-fly-in {
  animation: flyIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  will-change: transform, opacity;
}

/* Global border override to remove ANY borders or outlines */
.bg-gray-800,
.bg-gray-700,
.bg-gray-900,
section,
div[class*="bg-gray"],
.border,
.border-gray-600,
.border-gray-700,
[class*="border"],
button,
input,
select,
textarea,
.glass-card,
section>div,
.recorder-container,
.visualizer-container,
.format-selector,
.transcription-area,
.report-container,
.editor-container {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Completely borderless - no shadows, no outlines anywhere */
* {
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

/* Only preserve essential record button styling */
.record-button,
.continue-record-button {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3) !important;
}

.record-button:hover,
.continue-record-button:hover {
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4) !important;
}

.record-button.recording {
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3) !important;
}

/* Force dropdown to be on top of everything */
#format-dropdown {
  position: absolute !important;
  z-index: 9999 !important;
  background: #374151 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Ensure the format selector container creates proper stacking context */
#format-selector-container {
  position: relative !important;
  z-index: 9999 !important;
}

/* =========================================
   LIGHT MODE OVERRIDES
   ========================================= */

body.light-mode {
  background: linear-gradient(135deg, #F9F5EB 0%, #F5EFE6 100%) !important;
  color: #2D3748 !important;
  /* Softer Charcoal for Beige theme */
}

/* Navigation - Light Mode */
body.light-mode .nav-dark {
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .nav-dark a,
body.light-mode .nav-dark button:not(.bg-blue-600) {
  color: #374151 !important;
}

body.light-mode .nav-dark a:hover,
body.light-mode .nav-dark button:hover:not(.bg-blue-600) {
  color: #2563eb !important;
}

/* Headings - Light Mode */
body.light-mode h1,
body.light-mode h2 {
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: #111827 !important;
}

body.light-mode h3,
body.light-mode h4,
body.light-mode strong {
  color: #1f2937 !important;
}

body.light-mode p.text-gray-400 {
  color: #6b7280 !important;
}

/* Cards & Containers - Light Mode */
body.light-mode .bg-gray-800,
body.light-mode .glass-card,
body.light-mode section>div,
body.light-mode .recorder-container,
body.light-mode .transcription-area,
body.light-mode .format-selector,
body.light-mode .format-preview-panel,
body.light-mode .report-results-panel,
body.light-mode .report-container,
body.light-mode .editor-container,
body.light-mode #reports-section,
body.light-mode #format-dropdown {
  background: #FFFDF5 !important;
  /* Warm Cream for cards to blend with beige */
  box-shadow: 0 4px 6px -1px rgba(60, 40, 0, 0.05), 0 2px 4px -1px rgba(60, 40, 0, 0.03) !important;
  /* Warmer shadow */
  border: 1px solid #E2E8F0 !important;
  /* Subtle border for definition */
}

/* Remove border from My Reports section to fix margin issue */
body.light-mode #reports-section {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Remove the header line/border below "My Reports" text and ensure blending */
body.light-mode #reports-section>div:first-child {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Specific fix for Report Cards in the Grid */
body.light-mode #reports-list .bg-gray-800 {
  background: #FFFDF5 !important;
  /* Warm Cream */
  color: #2D3748 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #e5e7eb !important;
  /* Subtle border only for cards */
}

/* Force text colors inside report cards to be dark */
body.light-mode #reports-list .text-white,
body.light-mode #reports-list .text-gray-200,
body.light-mode #reports-list .text-gray-300,
body.light-mode #reports-list .text-gray-400 {
  color: #374151 !important;
}

/* Fix title colors in reports */
body.light-mode #reports-list h3 {
  color: #111827 !important;
}

body.light-mode #format-dropdown {
  background: #ffffff !important;
}

/* Inputs - Light Mode */
body.light-mode input,
body.light-mode textarea,
body.light-mode select {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
}

body.light-mode input:focus,
body.light-mode textarea:focus,
body.light-mode select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
  background: #ffffff !important;
}

/* Text Colors in Containers */
body.light-mode .text-gray-300,
body.light-mode .text-gray-400 {
  color: #4b5563 !important;
  /* darkened for readability on white */
}

body.light-mode .text-white {
  color: #111827 !important;
}

body.light-mode .text-gray-200 {
  color: #374151 !important;
}

/* Global fix for ALL bg-gray-800 elements in light mode */
body.light-mode .bg-gray-800,
body.light-mode .bg-gray-900,
body.light-mode [class*="bg-gray-"] {
  background-color: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

/* Remove border from specific layout containers if needed to avoid double borders */
body.light-mode .app-container {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Ensure text contrasts globally in these containers */
body.light-mode .bg-gray-800 *,
body.light-mode [class*="bg-gray-"] * {
  color: inherit;
}

/* Re-apply specific text colors for readability */
body.light-mode .text-gray-400 {
  color: #6b7280 !important;
}

body.light-mode .text-gray-300 {
  color: #4b5563 !important;
}

body.light-mode .text-blue-400 {
  color: #2563eb !important; /* Keep bright blue for DOCX */
}

/* Export Button Accent Colors - Preserve in Light Mode */
body.light-mode .text-green-400,
body.light-mode .text-green-300 {
  color: #16a34a !important; /* Green for Copy */
}

body.light-mode .text-red-400,
body.light-mode .text-red-300 {
  color: #dc2626 !important; /* Red for PDF */
}

body.light-mode .text-purple-400,
body.light-mode .text-purple-300 {
  color: #9333ea !important; /* Purple for Template */
}

/* Format Preview Highlights - Green Accent */
body.light-mode .format-preview-panel .section-highlight {
  border-left-color: #319795 !important;
  background-color: rgba(49, 151, 149, 0.1) !important;
}

/* Buttons - Light Mode Enhancements */
body.light-mode button.text-gray-300:hover {
  background-color: #f3f4f6 !important;
}

/* Softer Button Colors for Light Mode */
/* Softer Button Colors for Light Mode - BEIGE THEME UPDATE */
body.light-mode .record-button {
  background: linear-gradient(135deg, #319795, #2C7A7B) !important;
  /* Teal / Green */
  box-shadow: 0 4px 16px rgba(49, 151, 149, 0.25) !important;
}

body.light-mode .record-button:hover {
  box-shadow: 0 8px 24px rgba(197, 48, 48, 0.35) !important;
}

body.light-mode .record-button:hover {
  box-shadow: 0 8px 24px rgba(49, 151, 149, 0.35) !important;
}

body.light-mode .continue-record-button {
  background: linear-gradient(135deg, #68D391, #48BB78) !important;
  /* Sage Green */
  box-shadow: 0 4px 16px rgba(72, 187, 120, 0.25) !important;
}

body.light-mode .type-directly-button {
  background: linear-gradient(135deg, #319795, #2C7A7B) !important;
  /* Teal / Match Dictate */
  box-shadow: 0 4px 16px rgba(49, 151, 149, 0.25) !important;
}

/* Generic Blue Keys - Muted Teal override */
body.light-mode .bg-blue-600 {
  background-color: #319795 !important;
}

body.light-mode .bg-blue-600:hover {
  background-color: #2C7A7B !important;
}

/* "New Report" button specifics */
/* "New Report" button specifics - Keep Teal */
body.light-mode button:has(.fa-plus) {
  background-color: #319795 !important;
}

/* Neutral "Create Format" Button - outline only */
body.light-mode #create-format-btn,
/* Explicit ID Target */
body.light-mode button:has(.fa-plus-circle),
/* Assuming icon class */
body.light-mode button[onclick*="showFormatModal"] {
  /* Fallback selector */
  background: transparent !important;
  border: 1px solid #CBD5E0 !important;
  color: #4A5568 !important;
  box-shadow: none !important;
}

body.light-mode button:has(.fa-plus-circle):hover {
  background: #EDF2F7 !important;
}

/* Quick Generate Button - Green Theme Match */
body.light-mode #generate-quick-button {
  background: linear-gradient(135deg, #319795, #2C7A7B) !important;
  color: white !important;
  box-shadow: 0 4px 6px rgba(49, 151, 149, 0.25) !important;
  border: 1px solid rgba(49, 151, 149, 0.2) !important;
}

body.light-mode #generate-quick-button:hover {
  background: linear-gradient(135deg, #2C7A7B, #285E61) !important;
  box-shadow: 0 6px 12px rgba(49, 151, 149, 0.35) !important;
  transform: translateY(-1px);
}

/* Dictate Button - Teal/Green Update */
body.light-mode .record-button {
  background: linear-gradient(135deg, #319795, #2C7A7B) !important;
  /* Teal / Green */
  box-shadow: 0 4px 16px rgba(49, 151, 149, 0.25) !important;
}

body.light-mode .record-button:hover {
  box-shadow: 0 8px 24px rgba(49, 151, 149, 0.35) !important;
}

/* Neutral "Create Format" Button - outline only */
body.light-mode button:has(.fa-plus-circle),
/* Assuming icon class */
body.light-mode button[onclick*="showFormatModal"] {
  /* Fallback selector */
  background: transparent !important;
  border: 1px solid #CBD5E0 !important;
  color: #4A5568 !important;
  box-shadow: none !important;
}

body.light-mode button:has(.fa-plus-circle):hover {
  background: #EDF2F7 !important;
}

/* Visualizer Container */
/* Visualizer Container */
body.light-mode .visualizer-container {
  background: transparent !important;
  /* Seamless blend */
  border: none !important;
  box-shadow: none !important;
}

/* Code/Pre blocks */
body.light-mode pre {
  color: #1f2937 !important;
}

/* Selection */
body.light-mode ::selection {
  background-color: rgba(59, 130, 246, 0.3) !important;
  color: #111827 !important;
}

/* Reports specific */
body.light-mode #no-reports-message {
  color: #6b7280 !important;
}

/* Light Mode - Loading Overlay Refinement */
body.light-mode .panel-loading {
  background: rgba(255, 253, 245, 0.95) !important;
  /* Warm Cream transparent */
  backdrop-filter: blur(8px) !important;
  border: 1px solid #E2E8F0 !important;
  /* Subtle border for definition */
}

body.light-mode .panel-loading .loading-message {
  color: #2D3748 !important;
  /* Dark Gray text */
  font-weight: 600 !important;
}

/* Progress Bar Background (the empty track) */
body.light-mode .panel-loading .bg-gray-700 {
  background-color: #E2E8F0 !important;
  /* Light Gray */
}

/* SVG Circle Background (the gray track) */
body.light-mode .panel-loading circle[opacity="0.3"] {
  stroke: #CBD5E0 !important;
  /* Light Gray border */
  opacity: 1 !important;
}

/* Optional: Make the progress bar percentage text distinct if needed */
body.light-mode .panel-loading .progress-percentage {
  color: #319795 !important;
  /* Match Muted Teal theme */
}

/* --- Theme Toggle Switch --- */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  margin-right: 8px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151;
  /* Dark Gray default */
  transition: .4s;
  border-radius: 34px;
  border: 1px solid #4B5563;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  overflow: hidden;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Checked State (Light Mode) */
input:checked+.slider {
  background-color: #319795;
  /* Green Accent */
  border-color: #319795;
}

input:checked+.slider:before {
  transform: translateX(24px);
}

/* Icons inside the track */
.slider .fa-moon {
  color: #fbbf24;
  /* Amber Moon */
  font-size: 14px;
  transition: .4s;
  opacity: 1;
  transform: translateX(2px);
}

.slider .fa-sun {
  color: #fff;
  /* White Sun */
  font-size: 14px;
  transition: .4s;
  opacity: 0.5;
  transform: translateX(-2px);
}

/* When checked (Light Mode) */
input:checked+.slider .fa-moon {
  opacity: 0;
  transform: translateX(-20px);
}

input:checked+.slider .fa-sun {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile Performance Updates - Disable backdrop-filter to prevent crashes */
@media (max-width: 768px) {

  section>div,
  .recorder-container,
  .glass-card,
  .format-selector,
  .transcription-area,
  .report-container,
  .editor-container,
  .visualizer-container,
  .nav-dark,
  .report-results-panel,
  .format-preview-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(31, 41, 55, 0.98) !important;
    /* Higher opacity fallback */
  }

  /* Disable all fly-in animations on mobile to prevent GPU crashes */
  .run-animation .animate-fly-in,
  .animate-fly-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
  }

  /* Disable other expensive animations on mobile */
  * {
    will-change: auto !important;
  }

  /* Ensure light mode also gets the opaque treatment */
  body.light-mode section>div,
  body.light-mode .recorder-container,
  body.light-mode .glass-card,
  body.light-mode .format-selector,
  body.light-mode .transcription-area,
  body.light-mode .report-container,
  body.light-mode .editor-container,
  body.light-mode .report-results-panel,
  body.light-mode .format-preview-panel {
    background: #FFFDF5 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}