/* Color theme variables are now defined in themes.css */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gradient-background);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Navigation uses theme variables from themes.css */
.navbar {
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.navbar a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  margin-right: 1rem;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: var(--primary);
}

/* Hero Section for Viewer */
.hero-section-viewer {
  position: relative;
  min-height: 50vh;
  background: var(--gradient-primary);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-inverse);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(1px);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 0 2rem;
  animation: heroFadeIn 1.5s ease-out;
}

.hero-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: pulse 2s ease-in-out infinite;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  opacity: 0.95;
  letter-spacing: 0.5px;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

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

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

@keyframes borderGlow {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* Main Container - matches other pages */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .container {
  background: linear-gradient(180deg, #022c22 0%, #064e3b 100%);
}

/* Main sections layout from styles.css will be used */
.main-sections {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin: -3rem auto 2rem;
  position: relative;
  z-index: 2;
}

/* Override themes.css for processing-section to maintain glassmorphism styling */
.processing-section {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 
    0 20px 60px rgba(5, 150, 105, 0.1),
    0 8px 32px rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Dark mode override for processing-section */
[data-theme="dark"] .processing-section {
  background: rgba(6, 78, 59, 0.9) !important;
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

.processing-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #059669, #047857);
  animation: borderGlow 3s ease-in-out infinite alternate;
}

.processing-section:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 25px 70px rgba(5, 150, 105, 0.12),
    0 10px 35px rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

@keyframes borderGlow {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* Typography */
h1 {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 3rem;
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h3 {
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Controls section */
.controls {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 
    0 20px 60px rgba(5, 150, 105, 0.1),
    0 8px 32px rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.controls::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #059669, #047857);
  animation: borderGlow 3s ease-in-out infinite alternate;
}

[data-theme="dark"] .controls {
  background: rgba(6, 78, 59, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

/* File input */
input[type="file"] {
  flex: 1;
  min-width: 200px;
  padding: 1rem;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: inherit;
}

input[type="file"]:hover {
  border-color: var(--primary);
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

/* Enhanced Controls - removed as they're not needed */

/* Enhanced Buttons - Clean Design */
.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(5, 150, 105, 0.12);
  min-height: 40px;
  min-width: 130px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.12);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-icon {
  font-size: 1.1rem;
  animation: buttonIconPulse 2s ease-in-out infinite;
}

.btn-text {
  font-weight: 600;
}

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

/* Status Indicator - Simplified */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  transition: all 0.3s ease;
  font-size: 0.9rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: #059669;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.08);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s ease;
  animation: statusPulse 2s ease-in-out infinite;
}

.status-indicator.recording .status-dot {
  background: var(--danger);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.status-indicator.processing .status-dot {
  background: var(--warning);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.status-indicator.active .status-dot {
  background: var(--success);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.status-text {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Symbol XR Mode status text visibility fix */
.symbol-vr-overlay .symbol-vr-status .status-text {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  font-weight: 700;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Card descriptions */
.card-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-align: center;
}

/* Upload Section */
.upload-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.file-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 20px;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.file-drop-zone:hover {
  border-color: var(--primary);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.file-drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
  transform: scale(1.02);
}

.drop-zone-content {
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.drop-zone-icon {
  font-size: 3rem;
  color: var(--primary);
  animation: float 3s ease-in-out infinite;
}

.drop-zone-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
}

.upload-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Button outline styles come from styles.css */

/* Button styles come from styles.css - no overrides needed for viewer page */

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  min-width: auto;
}

/* Session Results Styling */
.session-results, .upload-results {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.session-summary {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border);
  text-align: center;
}

.session-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.result-section {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.result-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.result-section h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transcript-content {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.5rem;
  font-family: 'Courier New', monospace;
  line-height: 1.6;
  color: var(--text-primary);
}

.transcript-chunk {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  align-items: flex-start;
}

.chunk-number {
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 80px;
}

.transcript-text {
  flex: 1;
  color: var(--text-primary);
}

.image-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.gallery-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.error-message {
  text-align: center;
  padding: 2rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.error-message h3 {
  margin-bottom: 1rem;
  color: var(--danger);
}

.error-message button {
  margin-top: 1rem;
  background: var(--danger);
  border: none;
}

.error-message button:hover {
  background: #dc2626;
}

/* Recording Section */
.recording-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.recording-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.recording-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  min-width: 300px;
}

.recording-timer {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-primary);
  min-width: 60px;
  text-align: center;
}

/* Audio Visualization */
.audio-visualization {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

#audioCanvas {
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

/* Legacy Button Styles for Compatibility */
button {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(5, 150, 105, 0.4);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Real-time buttons */
button[id*="Realtime"] {
  background: var(--gradient-accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Theme toggle */
.theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(180deg);
}

/* Audio list */
.audio-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.audio-card {
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.audio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}

.audio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), var(--shadow-secondary);
}

.audio-card strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.audio-card audio {
  width: 100%;
  margin-top: 0.75rem;
  border-radius: 8px;
}


#melCanvas {
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: #000;
  max-width: 100%;
  transition: transform 0.3s ease;
}

#melCanvas:hover {
  transform: scale(1.01);
}

/* Visuals container */
.visuals-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.visual-box {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.visual-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.visual-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), var(--shadow-primary);
}

.visual-box h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.visual-box img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  background: var(--bg-secondary);
}

.visual-box img:hover {
  transform: scale(1.02);
}

/* Loading state */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Dark mode styles are handled by themes.css data-theme system */

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-primary);
  border-radius: 15px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.notification-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notification-message {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.notification-error {
  border-left: 4px solid var(--danger);
}

.notification-success {
  border-left: 4px solid var(--success);
}

.notification-info {
  border-left: 4px solid var(--accent);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

  animation: fadeInUp 0.5s ease-out;
}

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

/* Responsive design */
@media (max-width: 1024px) {
  .visuals-container {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 1rem;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .hero-section-viewer {
    min-height: 40vh;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  .controls {
    flex-direction: column;
    padding: 1.5rem;
  }
  
  .navbar {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .audio-list {
    grid-template-columns: 1fr;
  }
  
  .visual-box {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  
  .visual-box,
  .audio-card,
  .controls {
    padding: 1rem;
  }
  
  .container {
    padding: 0.5rem;
  }
  
  /* Enhanced mobile button touch targets */
  button, .btn-primary, .btn-secondary, .btn-outline, .btn-large {
    min-height: 48px !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
  }
  
  /* Small buttons still need adequate touch targets */
  .btn-small {
    min-height: 44px !important;
    padding: 0.75rem 1.25rem !important;
  }
  
  /* Input field touch targets */
  input[type="text"], 
  input[type="email"], 
  input[type="file"], 
  input[type="number"],
  select, 
  textarea {
    min-height: 48px !important;
    padding: 0.875rem !important;
    font-size: 1rem !important;
  }
  
  /* Interactive elements spacing */
  .voice-controls button {
    margin-bottom: 0.75rem;
  }
  
  /* Enhanced mobile image responsiveness */
  img, video, canvas {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .hero-image, .feature-image {
    width: 100% !important;
    max-width: 300px !important;
    height: auto !important;
    object-fit: cover !important;
  }
  
  /* Logo optimizations for mobile */
  .navbar-logo, .footer-logo, .home-logo {
    max-height: 50px !important;
    width: auto !important;
  }
  
  /* Result content images */
  .result-content img, 
  .result-content video {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
  }
}

/* ========== Enhanced AudioViewer Components ========== */


.audio-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.audio-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
}

.audio-duration {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Courier New', monospace;
}

.audio-visualizer {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.mini-waveform {
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
}

/* Enhanced Drop Zone */
.enhanced-drop-zone {
  position: relative;
  transition: all 0.3s ease;
  border: 2px dashed var(--border);
  border-radius: 16px;
}

.enhanced-drop-zone:hover,
.enhanced-drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(5, 150, 105, 0.05);
  transform: scale(1.02);
}

.drop-zone-subtext {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.8;
}


/* Audio Level Meter */
.audio-controls-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-controls-section h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audio-level-meter {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.level-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.level-bar {
  height: 100%;
  background: linear-gradient(90deg, #27AE60, #F39C12, #E74C3C);
  border-radius: 4px;
  transition: width 0.1s ease, background-color 0.2s ease;
  min-width: 2px;
}

.level-text {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 40px;
  text-align: right;
}

/* Visualization Controls */
.visualization-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 8px;
}

/* Canvas Section */
.canvas-section {
  margin: 1.5rem 0;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.canvas-section h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Frequency Visualization */
.frequency-visualization {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.frequency-visualization h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Playback Controls */
.playback-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Button animations come from styles.css */

/* Loading Animation for Canvas */
@keyframes canvasGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(5, 150, 105, 0.3); }
  50% { box-shadow: 0 0 30px rgba(5, 150, 105, 0.6); }
}

.canvas-section canvas:hover {
  animation: canvasGlow 2s ease-in-out infinite;
}


/* AudioViewer Styles */
.audioviewer-section {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 
    0 20px 60px rgba(5, 150, 105, 0.1),
    0 8px 32px rgba(16, 185, 129, 0.05);
  position: relative;
  overflow: hidden;
}

.audioviewer-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #059669, #047857);
  animation: borderGlow 3s ease-in-out infinite alternate;
}

/* Dark mode for audioviewer section */
[data-theme="dark"] .audioviewer-section {
  background: rgba(6, 78, 59, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

.audioviewer-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.06);
  flex-wrap: wrap;
  justify-content: center;
}

/* Dark mode for audioviewer controls */
[data-theme="dark"] .audioviewer-controls {
  background: rgba(6, 78, 59, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.audioviewer-controls input[type="file"] {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.audioviewer-controls input[type="file"]:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.3);
}

.audioviewer-results {
  margin-top: 1.5rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.result-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.result-item h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.generated-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.generated-image:hover {
  transform: scale(1.02);
}

.processing-message {
  text-align: center;
  padding: 1rem;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.3);
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 500;
}

.error-message {
  padding: 1rem;
  background: rgba(220, 38, 127, 0.1);
  border: 1px solid rgba(220, 38, 127, 0.3);
  border-radius: 8px;
  color: #ff6b6b;
  font-weight: 500;
  text-align: center;
}

/* ========== AudioViewer Header Layout - Clean ========== */

.viewer-header {
  margin-bottom: 2rem;
}

.viewer-title-section {
  text-align: center;
  margin-bottom: 2rem;
}

.viewer-title-section h2,
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, #059669, #047857, #065f46);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: none;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-description {
  text-align: center;
  font-size: 1.2rem;
  color: #6b7280;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .section-description {
  color: #9ca3af;
}

/* Remove viewer-controls-section as we're using processing-controls from styles.css */


/* ========== Real-time AudioViewer Display ========== */

.audioviewer-display {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 
    0 20px 60px rgba(5, 150, 105, 0.1),
    0 8px 32px rgba(16, 185, 129, 0.05);
  margin-top: 2rem;
}

/* Dark mode for audioviewer-display */
[data-theme="dark"] .audioviewer-display {
  background: rgba(6, 78, 59, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Top Row Grid - 3 Columns Side by Side */
.top-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Bottom Row - Full Width */
.bottom-row {
  width: 100%;
}

.viewer-item {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 
    0 8px 25px rgba(5, 150, 105, 0.08),
    0 4px 12px rgba(16, 185, 129, 0.05);
}

/* Dark mode for viewer-item */
[data-theme="dark"] .viewer-item {
  background: rgba(6, 78, 59, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dark mode text colors for viewer items */
[data-theme="dark"] .viewer-item h4,
[data-theme="dark"] .audioviewer-display h4,
[data-theme="dark"] .audioviewer-display span,
[data-theme="dark"] .audioviewer-display div {
  color: #ffffff;
}

[data-theme="dark"] .viewer-item .face-info span,
[data-theme="dark"] .viewer-item .level-info span,
[data-theme="dark"] .viewer-item .spectrum-info span,
[data-theme="dark"] .viewer-item .mel-info span {
  color: #a7f3d0;
}

.viewer-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.viewer-item h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

/* ========== Canvas Styles ========== */

/* Digit Canvas */
.face-canvas {
  border: 2px solid var(--primary);
  border-radius: 12px;
  background: var(--bg-primary);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  max-width: 100%;
  height: auto;
}

.face-canvas.updating {
  border-color: var(--accent);
  box-shadow: var(--shadow-primary);
}

/* Audio Level Canvas */
.level-canvas {
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: var(--bg-primary);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  max-width: 100%;
  height: auto;
}

.level-canvas.updating {
  border-color: var(--primary);
  box-shadow: var(--shadow-secondary);
}

/* Frequency Spectrum Canvas */
.spectrum-canvas {
  border: 2px solid var(--warning);
  border-radius: 12px;
  background: var(--bg-primary);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  max-width: 100%;
  height: auto;
}

.spectrum-canvas.updating {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Full-width Mel Spectrogram Canvas */
.mel-canvas, .mel-canvas-full {
  border: 2px solid var(--success);
  border-radius: 12px;
  background: var(--bg-primary);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.mel-canvas.updating, .mel-canvas-full.updating {
  border-color: var(--accent);
  box-shadow: var(--shadow-secondary);
}

/* ========== Info Display Styles - Clean ========== */

.face-info, .mel-info, .level-info, .spectrum-info {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.audio-level-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.model-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.model-status .status-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.model-status.ready .status-text {
  color: #4ade80;
}

.model-status.error .status-text {
  color: #ef4444;
}

/* ========== AudioViewer Responsive Design ========== */

@media (max-width: 1200px) {
  .container {
    max-width: 1000px;
    padding: 2rem 1.5rem;
  }
  
  .top-row-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  
  .viewer-item.frequency-spectrum {
    grid-column: 1 / -1;
  }
  
  .processing-section {
    padding: 2rem 1.5rem;
  }
  
  .audio-list {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }
  
  .viewer-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .viewer-controls-section {
    align-items: stretch;
  }
  
  .enhanced-controls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .audioviewer-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .audioviewer-controls input[type="file"] {
    width: 100%;
    min-height: 44px;
    padding: 0.75rem;
  }
  
  .top-row-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .audioviewer-display {
    padding: 1.5rem;
  }
  
  .face-canvas, .level-canvas, .spectrum-canvas {
    width: 100%;
    max-width: 300px;
    height: auto;
  }
  
  .mel-canvas, .mel-canvas-full {
    width: 100%;
    height: auto;
    max-height: 250px;
  }
  
  .btn-large {
    width: 100%;
    min-height: 44px;
    margin-bottom: 0.5rem;
  }
  
  .audio-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .processing-section {
    padding: 2rem 1.5rem;
  }
  
  .viewer-title-section h2, .section-title {
    font-size: 2.25rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  
  .audioviewer-display {
    padding: 1rem;
  }
  
  .viewer-item {
    padding: 1rem;
    min-height: auto;
  }
  
  .processing-section {
    padding: 1.5rem 1rem;
  }
  
  .face-canvas, .level-canvas, .spectrum-canvas {
    max-width: 250px;
  }
  
  .face-info, .mel-info, .level-info, .spectrum-info {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }
  
  .viewer-title-section h2, .section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .section-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .audio-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .visuals-container .viewer-item {
    margin-bottom: 1rem;
  }
  
  .canvas-section {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .btn-large {
    width: 100%;
    margin-bottom: 1rem;
    min-height: 48px;
    font-size: 1rem;
  }
  
  .audio-controls {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .audio-controls button {
    min-width: 100px;
    min-height: 44px;
    flex: 1;
  }
  
  .result-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}