/* Barry Harris Harmonic Universe - Main Styles */

:root {
  /* Color scheme for pitch classes */
  --c-color: #ff4444;
  --cs-color: #ff8844;
  --d-color: #ffcc44;
  --ds-color: #ccff44;
  --e-color: #88ff44;
  --f-color: #44ff44;
  --fs-color: #44ff88;
  --g-color: #44ffcc;
  --gs-color: #44ccff;
  --a-color: #4488ff;
  --as-color: #4444ff;
  --b-color: #8844ff;
  
  /* Theme colors */
  --bg-color: #0a0a1a;
  --bg-dark: #0a0a1a;
  --bg-medium: #1a1a3a;
  --bg-light: #2a2a4a;
  --secondary-bg: #1a1a3a;
  --card-bg: #2a2a4a;
  --text-color: #ffffff;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --accent-color: #ffd700;
  --accent: #ffd700;
  --accent-hover: #ffed4a;
  --border-color: #444466;
  --border: #444466;
  --primary-color: #ffd700;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s ease;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  display: grid;
  grid-template-areas: 
    "header"
    "main";
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* Header */
header {
  grid-area: header;
  background: var(--bg-medium);
  border-bottom: 2px solid var(--border);
  padding: var(--space-lg);
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  background: linear-gradient(45deg, var(--accent), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
}

header p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

/* Navigation */
#navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
}

.nav-btn {
  background: var(--bg-light);
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 25px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.nav-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.nav-btn.active {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
}

/* Enharmonic Toggle */
.enharmonic-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: var(--space-lg);
}

.toggle-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.toggle-slider {
  position: relative;
}

.toggle-input {
  display: none;
}

.toggle-track {
  display: flex;
  align-items: center;
  position: relative;
  width: 80px;
  height: 36px;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.toggle-track:hover {
  border-color: var(--accent);
}

.toggle-option {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: bold;
  z-index: 2;
  transition: all var(--transition-fast);
  user-select: none;
}

.toggle-option.sharp {
  left: 8px;
  color: var(--text-primary);
}

.toggle-option.flat {
  right: 8px;
  color: var(--text-secondary);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 30px;
  height: 30px;
  background: linear-gradient(45deg, var(--accent), #fff);
  border-radius: 50%;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Toggle states */
.toggle-input:checked + .toggle-track .toggle-thumb {
  transform: translateX(42px);
}

.toggle-input:checked + .toggle-track .toggle-option.sharp {
  color: var(--text-secondary);
}

.toggle-input:checked + .toggle-track .toggle-option.flat {
  color: var(--text-primary);
}

/* Main content */
main {
  grid-area: main;
  padding: var(--space-xl);
  overflow-y: auto;
}

.view {
  display: none;
  animation: fadeIn var(--transition-medium);
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  text-align: center;
  margin-bottom: var(--space-xxl);
}

.view-header h2 {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  color: var(--accent);
}

.view-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Keep explainer paragraphs visually narrower than the full-width nav on large screens */
.view-header {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.view-header p {
  max-width: 68ch; /* limit line length for readability */
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Visualizations */
.visualization {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

/* Chromatic Circle */
#chromatic-circle {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto;
  z-index: 10; /* ensure visualization sits above lower elements when possible */
}

.note-element {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-weight: bold;
  font-size: 1.1rem;
  color: #000;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

.note-element:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.note-element.selected {
  transform: scale(1.3);
  box-shadow: 0 0 25px var(--accent);
  border-color: var(--accent);
}

/* Whole Tone Display */
#whole-tone-display {
  display: flex;
  flex-direction: row;
  gap: var(--space-xxl);
  justify-content: center;
  align-items: flex-start;
}

.whole-tone-group {
  text-align: center;
}

.whole-tone-group h3 {
  margin-bottom: var(--space-lg);
  color: var(--accent);
}

.tone-circle {
  position: relative;
  width: 250px;
  height: 250px;
  border: 2px solid var(--border);
  border-radius: 50%;
  margin: 0 auto;
}

/* Diminished Display */
.diminished-selector {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.dim-btn {
  background: var(--bg-light);
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dim-btn:hover {
  border-color: var(--accent);
}

.dim-btn.active {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
}

.dim-visualization {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto var(--space-xl);
}

.derivatives-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  width: 100%;
  max-width: 600px;
}

/* Chord Display */
.dim-pair-selector {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.pair-options {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-lg);
}

.pair-btn {
  background: var(--bg-light);
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pair-btn:hover {
  border-color: var(--accent);
}

.pair-btn.active {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
}

.derivation-display {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  align-items: center;
}

.source-chords {
  display: flex;
  gap: var(--space-xl);
}

.chord-display {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: var(--space-lg);
  min-width: 200px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-medium);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chord-display:hover {
  border-color: var(--accent);
  background: var(--bg-medium);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.chord-sources-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.source-chords {
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-lg);
}

.source-chords h3 {
  color: var(--accent);
  margin-bottom: 1rem;
  text-align: center;
}

.chord-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.derived-chords {
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.derived-chords h3 {
  color: var(--accent);
  margin-bottom: 1rem;
  text-align: center;
}

.chord-type {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-fast);
}

.chord-type:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.chord-type h4 {
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.chord-type p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.chord-notes {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.chord-note {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  #app {
    grid-template-areas: 
      "header"
      "main";
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  #navigation {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  
  .nav-btn {
    padding: var(--space-sm);
    font-size: 0.9rem;
  }

  .enharmonic-toggle {
    margin-left: 0;
    margin-top: var(--space-sm);
    order: 10; /* Move to end */
  }

  .toggle-label {
    font-size: 0.8rem;
  }

  .toggle-track {
    width: 70px;
    height: 32px;
  }

  .toggle-thumb {
    width: 26px;
    height: 26px;
  }

  .toggle-input:checked + .toggle-track .toggle-thumb {
    transform: translateX(36px);
  }
  
  #whole-tone-display {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
  }
  
  .diminished-selector {
    flex-direction: column;
    align-items: center;
  }
  
  .derived-chords {
    grid-template-columns: 1fr;
  }
  
  .source-chords {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  main {
    padding: var(--space-md);
  }

  .enharmonic-toggle {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .toggle-label {
    font-size: 0.75rem;
  }

  .toggle-track {
    width: 60px;
    height: 28px;
  }

  .toggle-thumb {
    width: 22px;
    height: 22px;
  }

  .toggle-input:checked + .toggle-track .toggle-thumb {
    transform: translateX(30px);
  }

  .toggle-option {
    font-size: 1rem;
  }

  .toggle-option.sharp {
    left: 6px;
  }

  .toggle-option.flat {
    right: 6px;
  }
  
  /* Make chromatic circle responsive and ensure there's generous bottom spacing so the fixed footer
     doesn't overlap it when users scroll to the bottom on small devices. Using aspect-ratio keeps the
     element square while allowing the width to follow the viewport. */
    #chromatic-circle {
      width: min(90vw, 300px);
      aspect-ratio: 1 / 1;
      height: auto;
      margin-bottom: 140px; /* increased spacing so footer doesn't overlap */
    }
  
  .tone-circle {
    width: 200px;
    height: 200px;
  }
  
  .whole-tone-group {
    margin-bottom: var(--space-lg);
  }
  
  .whole-tone-group h3 {
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
  }
  
  .note-element {
    width: 45px;
    height: 45px;
    font-size: 0.9rem;
  }
  
  .tone-circle {
    width: 200px;
    height: 200px;
  }
  
  .dim-visualization {
    width: 250px;
    height: 250px;
  }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
  .tone-circle {
    width: 180px;
    height: 180px;
  }
  
  #chromatic-circle {
    width: 280px;
    height: 280px;
  }
  
  .note-element {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }
  
  .whole-tone-group h3 {
    font-size: 1rem;
  }
}

/* Notification and Tooltip Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-light);
  border: 2px solid var(--accent);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  max-width: 300px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  font-size: 0.9rem;
  line-height: 1.4;
}

.tooltip {
  position: absolute;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  font-size: 0.8rem;
  z-index: 1001;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Accessibility enhancements */
.note-element:focus,
.chord-display:focus,
.nav-btn:focus,
.audio-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Suggested next step visual hint */
.nav-btn.suggested-next {
  position: relative;
  overflow: visible;
}

.nav-btn.suggested-next::after {
  content: '→';
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-weight: bold;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.5; }
}

@keyframes playingPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* Loading states */
.loading {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error states */
.error {
  border-color: #ff4444 !important;
  background-color: rgba(255, 68, 68, 0.1) !important;
}

/* Barry Harris specific styles */
.family-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-dark);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.family-header h3 {
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.family-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.family-member {
  position: relative;
  transition: all var(--transition-medium);
}

.family-member.family-selected {
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--accent);
}

.family-member.family-related {
  border-color: rgba(255, 215, 0, 0.5);
  background-color: rgba(255, 215, 0, 0.1);
}

.family-member.resolution-playing {
  border-color: #4ade80;
  background-color: rgba(74, 222, 128, 0.1);
  animation: resolution-pulse 2.5s ease-in-out;
}

@keyframes resolution-pulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: none;
  }
  40% { 
    transform: scale(1.02); 
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  }
  60% { 
    transform: scale(1.05); 
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.8);
  }
}

.resolution-btn {
  margin-top: 8px;
  padding: 4px 8px;
  font-size: 0.75rem;
  background: linear-gradient(135deg, var(--accent-color), #f59e0b);
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.resolution-btn:hover {
  background: linear-gradient(135deg, #f59e0b, var(--accent-color));
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.resolution-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sibling-label {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--border);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: bold;
}

.transformation {
  color: var(--accent);
  font-weight: bold;
}

.barry-concept {
  color: var(--text-secondary);
  font-style: italic;
}

.barry-method {
  color: var(--accent);
  font-weight: bold;
  font-size: 0.8rem;
}

.barry-indicator {
  animation: barryHighlight 2s ease;
}

@keyframes barryHighlight {
  0% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

.family-demo-btn {
  background: linear-gradient(45deg, var(--accent), #ffaa00);
  border: none;
  color: var(--bg-dark);
  padding: var(--space-md) var(--space-lg);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: bold;
  font-size: 1rem;
  margin: var(--space-lg) auto 0;
  display: block;
}

.family-demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.family-demo-btn:active {
  transform: translateY(0);
}

/* Enhanced chord type containers */
.chord-type {
  position: relative;
  overflow: visible;
}

.chord-type p {
  line-height: 1.4;
}

.chord-type p strong {
  display: block;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.chord-type p em {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
}

/* Source balance indicators */
.source-balance {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: var(--space-xs);
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  text-align: center;
}

/* System Overview Styles */
.system-overview-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.overview-toggle {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.overview-toggle:hover {
  background: #00d4aa;
  transform: translateY(-2px);
}

.complete-system {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem;
}

.system-stats {
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.chord-type-breakdown {
  margin-bottom: 2rem;
}

.chord-type-section {
  margin-bottom: 1.5rem;
}

.chord-type-section h5 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.chord-item {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
}

.chord-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.chord-name {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.chord-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.chord-notes .note-pill {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

.chord-source {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-style: italic;
}

.voice-leading-explanation {
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.method-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 3px solid var(--accent-color);
}

.method-item strong {
  color: var(--accent-color);
  display: block;
  margin-bottom: 0.5rem;
}

.method-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Additional responsive adjustments for overview */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .chord-grid {
    grid-template-columns: 1fr;
  }
  
  .methods-grid {
    grid-template-columns: 1fr;
  }
  
  .complete-system {
    max-height: 60vh;
  }
}

/* Chord Generation Matrix Styles */
.overview-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.matrix-toggle {
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.matrix-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.chord-generation-matrix {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
  border-radius: 15px;
  padding: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.matrix-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.matrix-header h4 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.matrix-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-icon {
  font-weight: bold;
  color: var(--accent-color);
  font-size: 1.2rem;
}

.matrix-pair-section {
  margin-bottom: 3rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.matrix-pair-section:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.1);
}

.pair-header h5 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.pair-sources {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.dim-source {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dim-label {
  font-weight: bold;
  color: var(--text-secondary);
  min-width: 60px;
}

.matrix-note {
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
  margin: 0 0.2rem;
  transition: all 0.3s ease;
}

.matrix-note.dim-note {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.matrix-note.chord-note {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #000;
}

.transformation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.transformation-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.transformation-section:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.transformation-section.type-highlighted {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.transformation-section.step-active {
  animation: matrixPulse 1.5s ease-in-out;
  border-color: #ff6b6b;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

@keyframes matrixPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.transformation-header h6 {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transformation-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.transformation-header small {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
}

.generated-chords {
  margin-top: 1rem;
}

.matrix-chord {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.matrix-chord:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  transform: translateX(5px);
}

.chord-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.chord-header strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.animate-btn {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
  color: white;
  border: none;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.animate-btn:hover {
  background: linear-gradient(135deg, #44a08d, #4ecdc4);
  transform: scale(1.05);
}

.chord-notes-mini {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.transformation-details {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.transformation-details .unchanged {
  color: var(--text-primary);
  opacity: 0.7;
}

.transformation-details .transformed {
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  font-weight: bold;
}

.transformation-details .raised {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.transformation-details .lowered {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.step-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 107, 107, 0.9);
  color: white;
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  min-width: 150px;
}

.step-content {
  text-align: center;
}

.step-action {
  font-style: italic;
  margin-top: 0.3rem;
  opacity: 0.9;
}

.matrix-summary {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
  border-radius: 15px;
  border: 2px solid rgba(255, 215, 0, 0.2);
  text-align: center;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.summary-stats .stat {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-stats .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.summary-stats .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.matrix-insight {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 10px;
  border-left: 4px solid var(--accent-color);
  margin-top: 1rem;
  font-style: italic;
  text-align: left;
}

/* Responsive Matrix Adjustments */
@media (max-width: 1024px) {
  .transformation-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .matrix-legend {
    gap: 1rem;
  }
  
  .pair-sources {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .transformation-grid {
    grid-template-columns: 1fr;
  }
  
  .overview-controls {
    flex-direction: column;
  }
  
  .chord-generation-matrix {
    padding: 1rem;
  }
  
  .matrix-legend {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .summary-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Interactive Chord Derivation Styles */
.derivation-interface {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem;
}

.source-section {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--primary-color)15 100%);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid var(--accent-color);
}

.source-section h3 {
  color: var(--accent-color);
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.source-chord-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.source-chord {
  background: var(--secondary-bg);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.source-chord:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.source-chord.playing {
  animation: sourceChordPulse 1s ease-in-out;
}

@keyframes sourceChordPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.source-chord h4 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-size: 1.1rem;
}

.chord-notes-visual {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.source-note {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  border: 2px solid rgba(255,255,255,0.3);
}

.plus-symbol {
  font-size: 2rem;
  color: var(--accent-color);
  font-weight: bold;
}

.transformation-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid var(--border-color);
}

.transformation-section h3 {
  color: var(--accent-color);
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.transformation-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.transformation-btn {
  background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--card-bg) 100%);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.transformation-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.transformation-btn.active {
  border-color: var(--accent-color);
  background: linear-gradient(135deg, var(--accent-color)20 0%, var(--accent-color)10 100%);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.transformation-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  transition: all 0.3s ease;
}

.transform-action {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.transform-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.3rem;
}

.transform-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.results-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid var(--border-color);
}

.results-section.fade-in {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-section h3 {
  color: var(--accent-color);
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.chord-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.chord-result {
  background: var(--secondary-bg);
  border-radius: 10px;
  padding: 1rem;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.chord-result:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
}

.chord-result.playing {
  animation: chordResultPulse 1s ease-in-out;
}

@keyframes chordResultPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.chord-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chord-result-header h4 {
  color: var(--text-color);
  font-size: 1.1rem;
  margin: 0;
}

.animate-transformation-btn {
  background: var(--accent-color);
  color: var(--bg-color);
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: bold;
  transition: all 0.2s ease;
}

.animate-transformation-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.chord-result-notes {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.result-note {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  border: 2px solid rgba(255,255,255,0.3);
}

.transformation-details {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 1rem;
}

.transformation-animation h5 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.step-by-step {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.transform-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  background: var(--bg-color);
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.transform-step.active-step {
  border-color: var(--accent-color);
  background: var(--accent-color)15;
  animation: stepPulse 0.6s ease-in-out;
}

.transform-step.completed-step {
  border-color: #4CAF50;
  background: rgba(76, 175, 80, 0.15);
}

@keyframes stepPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-color);
  color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.step-content {
  flex: 1;
}

.step-action {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.3rem;
}

.step-notes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.from-note, .to-note {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.arrow {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent-color);
}

/* Responsive Design for Derivation Interface */
@media (max-width: 768px) {
  .derivation-interface {
    gap: 1rem;
    padding: 0.5rem;
  }
  
  .source-chord-pair {
    flex-direction: column;
    gap: 1rem;
  }
  
  .transformation-buttons {
    grid-template-columns: 1fr;
  }
  
  .chord-results-grid {
    grid-template-columns: 1fr;
  }
  
  .step-notes {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .chord-notes-visual {
    gap: 0.3rem;
  }
  
  .source-note {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }
  
  .transform-step {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* Transformation Animation Styles */
.transformation-visual {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--bg-color);
  border-radius: 12px;
  border: 2px solid var(--border-color);
  margin: 1rem 0;
}

.parent-chords {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.parent-chord {
  flex: 1;
  text-align: center;
  padding: 1rem;
  background: var(--secondary-bg);
  border-radius: 10px;
  border: 2px solid transparent;
  transition: all 0.5s ease;
  min-width: 120px;
}

.parent-chord.playing {
  border-color: var(--accent-color);
  background: var(--accent-color)15;
  transform: scale(1.05);
  animation: parentPulse 1.5s ease-in-out;
}

@keyframes parentPulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
  50% { 
    box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
  }
}

.parent-chord h6 {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.parent-notes {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.parent-note {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  border: 2px solid rgba(255,255,255,0.3);
}

.transformation-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  font-weight: bold;
}

.arrow-symbol {
  font-size: 1.2rem;
  background: var(--accent-color);
  color: var(--bg-color);
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  white-space: nowrap;
}

.arrow-line {
  font-size: 2rem;
  animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
}

.result-chord {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--card-bg) 100%);
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.5s ease;
}

.result-chord.playing {
  border-color: var(--accent-color);
  background: linear-gradient(135deg, var(--accent-color)20 0%, var(--accent-color)10 100%);
  transform: scale(1.02);
  animation: resultGlow 2s ease-in-out;
}

@keyframes resultGlow {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
  50% { 
    box-shadow: 0 0 0 20px rgba(255, 215, 0, 0);
  }
}

.result-chord h6 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.result-notes {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.result-note-anim {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}

.transformation-visual.transforming .result-note-anim {
  animation: noteAppear 0.8s ease-out;
}

@keyframes noteAppear {
  0% {
    transform: scale(0) rotate(180deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.1) rotate(-10deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.transformation-steps {
  text-align: center;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.transformation-steps p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.play-transformation-btn {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  color: var(--bg-color);
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.play-transformation-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.play-transformation-btn:active {
  transform: translateY(0);
}

/* Algorithm Demo Styles */
.chord-derivation-header {
  background: var(--bg-medium);
  padding: var(--space-lg);
  border-radius: 8px;
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border-color);
}

.algorithm-info {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-dark);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.algorithm-info p {
  margin: var(--space-xs) 0;
  font-size: 0.9rem;
}

.algorithm-info p:first-child {
  font-weight: bold;
  color: var(--accent);
}

.pair-selection {
  margin-bottom: var(--space-xl);
}

.pair-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.pair-btn {
  background: var(--bg-medium);
  border: 2px solid var(--border-color);
  color: var(--text-color);
  padding: var(--space-md);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex: 1;
  min-width: 200px;
}

.pair-btn:hover {
  border-color: var(--accent);
  background: var(--bg-light);
}

.pair-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-dark);
}

.pair-notes {
  font-size: 0.8rem;
  margin-top: var(--space-xs);
  opacity: 0.8;
}

.derivation-content {
  display: grid;
  gap: var(--space-xl);
}

.source-chords {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.diminished-chord {
  background: var(--bg-medium);
  padding: var(--space-lg);
  border-radius: 8px;
  border: 2px solid var(--border-color);
  text-align: center;
  flex: 1;
}

.chord-type-section {
  background: var(--card-bg);
  padding: var(--space-lg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.transformation-method {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: var(--space-md);
}

.chord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.derived-chord {
  background: var(--bg-medium);
  padding: var(--space-md);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  position: relative;
}

.derived-chord:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.derived-chord h5 {
  margin: 0 0 var(--space-sm) 0;
  color: var(--accent);
  font-size: 1rem;
}

.play-chord-btn {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--accent);
  color: var(--bg-dark);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.play-chord-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}

.algorithm-demo {
  background: var(--bg-medium);
  padding: var(--space-lg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-top: var(--space-xl);
}

.demo-btn {
  background: var(--accent);
  color: var(--bg-dark);
  border: none;
  padding: var(--space-md) var(--space-lg);
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all var(--transition-fast);
}

.demo-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.algorithm-steps {
  margin-top: var(--space-lg);
  display: grid;
  gap: var(--space-lg);
}

.demo-step {
  background: var(--bg-dark);
  padding: var(--space-lg);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.demo-step h5 {
  margin: 0 0 var(--space-md) 0;
  color: var(--accent);
}

.demo-notes {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
  flex-wrap: wrap;
}

.demo-note {
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--bg-dark);
  transition: all var(--transition-fast);
}

.demo-note.lowered {
  animation: noteChange 0.6s ease;
  border: 2px solid var(--accent);
}

.demo-note.root {
  border: 2px solid var(--accent);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.demo-example {
  margin: var(--space-md) 0;
}

.demo-example p {
  margin: var(--space-sm) 0;
}

@keyframes noteChange {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Responsive adjustments for transformation animation */
@media (max-width: 768px) {
  .parent-chords {
    flex-direction: column;
    gap: 1rem;
  }
  
  .transformation-arrow {
    transform: rotate(90deg);
  }
  
  .parent-chord {
    min-width: 200px;
  }
  
  .source-chords {
    flex-direction: column;
  }
  
  .pair-buttons {
    flex-direction: column;
  }
  
  .chord-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .transformation-visual {
    padding: 1rem;
  }
  
  .parent-notes, .result-notes {
    gap: 0.2rem;
  }
  
  .parent-note, .result-note-anim {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }
  
  .demo-notes {
    gap: var(--space-xs);
  }
  
  .demo-note {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
  }
}

/* Barry Harris Chord Family Styles - Enhanced */
.diminished-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.dim-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.dim-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.dim-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(255, 183, 77, 0.3);
}

.source-chord-container {
  display: flex;
  justify-content: center;
}

.source-chord {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.source-chord.playing {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(255, 183, 77, 0.4);
  animation: sourceChordPulse 1.5s ease-in-out;
}

.chord-circle {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.method-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.method-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.method-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.method-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.method-btn.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.method-icon {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.method-name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* Instrument Selector Footer */
#instrument-selector-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
  border-top: 2px solid var(--border);
  padding: var(--space-md);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

/* Footer auto-hide helper (used on small screens) */
#instrument-selector-footer {
  transition: transform 0.28s ease, opacity 0.28s ease;
  will-change: transform, opacity;
}

.footer-hidden {
  transform: translateY(110%);
  opacity: 0.0;
  pointer-events: none;
}

.instrument-selector-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  max-width: 600px;
  margin: 0 auto;
}

.instrument-selector-container label {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}

#instrument-selector {
  background: var(--bg-light);
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  min-width: 200px;
}

#instrument-selector:hover {
  border-color: var(--accent);
}

#instrument-selector:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* Volume Control Styles */
.volume-control {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.volume-control label {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}

.volume-slider {
  width: 120px;
  height: 6px;
  background: var(--bg-light);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.volume-display {
  color: var(--text-secondary);
  font-size: 0.8rem;
  min-width: 40px;
  text-align: center;
  font-weight: 500;
}

.loading-indicator {
  color: var(--accent);
  font-size: 0.8rem;
  font-style: italic;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Adjust main content to account for footer */
main {
  grid-area: main;
  padding: var(--space-xl);
  padding-bottom: calc(var(--space-xl) + 80px); /* Add space for footer */
  overflow-y: auto;
}

/* Responsive adjustments for instrument selector */
@media (max-width: 768px) {
  .instrument-selector-container {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  #instrument-selector {
    min-width: 180px;
  }
  
  .volume-control {
    justify-content: center;
  }
  
  .volume-slider {
    width: 100px;
  }
  
  /* Provide extra bottom padding so long visualizations (chromatic circle) can scroll above the fixed footer
     on tablets and larger phones. Increased from 120px to 260px to cover taller footers and different viewport heights. */
  main {
    padding-bottom: calc(var(--space-xl) + 260px);
  }
}

@media (max-width: 480px) {
  #instrument-selector-footer {
    padding: var(--space-sm);
  }
  
  #instrument-selector {
    min-width: 160px;
    font-size: 0.8rem;
  }
  
  /* Increase bottom padding significantly so any visualization (circle) can scroll above the fixed footer. */
  main {
    padding-bottom: calc(var(--space-xl) + 220px);
  }
}

.method-description {
  font-size: 0.9rem;
  opacity: 0.8;
}

.family-header {
  text-align: center;
  margin-bottom: 2rem;
}

.family-header h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary-color);
  font-size: 1.3rem;
}

.family-header p {
  margin: 0;
  opacity: 0.8;
}

.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.child-chord {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.child-chord:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.child-chord.demonstrating {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(255, 183, 77, 0.4);
  animation: barryHighlight 2s ease-in-out infinite;
}

.chord-header {
  text-align: center;
  margin-bottom: 1rem;
}

.chord-header h5 {
  margin: 0 0 0.5rem 0;
  color: white;
  font-size: 1.2rem;
}

.chord-type-label {
  font-size: 0.9rem;
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  display: inline-block;
}

.chord-notes-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.chord-note {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.transformation-info {
  margin-bottom: 1rem;
  text-align: center;
}

.method-badge {
  font-size: 0.8rem;
  background: rgba(255, 183, 77, 0.2);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.transformation-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

.transformation-steps {
  margin-bottom: 1rem;
}

.step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.step.active-step {
  background: rgba(255, 183, 77, 0.2);
  border: 1px solid var(--primary-color);
  transform: scale(1.02);
}

.step.keep {
  border-left: 3px solid #4CAF50;
}

.step.lower,
.step.raise {
  border-left: 3px solid #FF9800;
}

.step.raise-then-lower {
  border-left: 3px solid #9C27B0;
}

.step-action {
  font-weight: bold;
  color: var(--primary-color);
}

.step-change {
  font-family: monospace;
}

.chord-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.play-chord-btn,
.demo-transformation-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.play-chord-btn:hover,
.demo-transformation-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* Barry Harris Creation Laboratory Styles */
.creation-laboratory {
  padding: 2rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 20px;
  margin: 1rem;
  border: 2px solid rgba(255, 183, 77, 0.3);
}

.lab-header {
  text-align: center;
  margin-bottom: 2rem;
}

.lab-header h3 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.lab-header p {
  opacity: 0.8;
  font-size: 1.1rem;
}

/* Keep lab/chord explanations narrow like other view headers */
.lab-header, .transformation-header {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.lab-header p, .transformation-header p {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Ensure chord-title sections also don't stretch explanatory text */
.chord-title {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Parent Gallery */
.parent-selector h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.parent-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.parent-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 300px;
  gap: 1rem;
}

.parent-card:hover {
  border-color: rgba(255, 183, 77, 0.5);
  transform: translateY(-5px);
}

.parent-card.active {
  border-color: var(--primary-color);
  background: rgba(255, 183, 77, 0.1);
  box-shadow: 0 8px 25px rgba(255, 183, 77, 0.3);
}

.creation-laboratory .parent-constellation {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
}

.creation-laboratory .constellation-star {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  z-index: 10;
}

.creation-laboratory .constellation-star:hover {
  transform: translate(-50%, -50%) scale(1.1);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.creation-laboratory .constellation-star.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(255, 183, 77, 0.5);
  transform: translate(-50%, -50%) scale(1.15);
  border-width: 3px;
}

.parent-name {
  font-weight: bold;
  color: white;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
}

/* Note Workshop */
.workshop-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.workshop-section h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.workshop-section p {
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.note-circle {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.workshop-note {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
}

.workshop-note:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.workshop-note.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(255, 183, 77, 0.6);
  transform: scale(1.2);
}

.note-name {
  font-weight: bold;
  color: white;
  font-size: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.note-position {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Method Selector */
.method-section {
  margin-bottom: 2rem;
}

.method-section h4 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1.5rem;
}

.method-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.method-card {
  background: rgba(255, 255, 255, 0.05);
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.method-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.method-card.active {
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.method-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.method-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 0.5rem;
}

.method-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.method-description {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Creation Studio */
.studio-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.studio-section h4 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 0.5rem;
}

.studio-section p {
  text-align: center;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.transformation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.transformation-card {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.transformation-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.transformation-card.playing {
  animation: playing-glow 2s ease-out;
}

@keyframes playing-glow {
  0% { box-shadow: 0 0 10px rgba(255, 183, 77, 0.3); }
  50% { box-shadow: 0 0 25px rgba(255, 183, 77, 0.6); }
  100% { box-shadow: 0 0 10px rgba(255, 183, 77, 0.3); }
}

.card-header {
  color: white;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
}

.chord-icon {
  font-size: 1.3rem;
}

.chord-name {
  font-size: 1.1rem;
}

.transformation-preview {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.preview-notes {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.preview-note {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.preview-steps {
  font-size: 0.8rem;
  opacity: 0.8;
}

.step-preview {
  margin-bottom: 0.25rem;
}

/* Detailed Transformation Visualization */
.transformation-detail {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1rem;
}

.original-chord-header,
.final-chord-header {
  text-align: center;
  margin-bottom: 1rem;
}

.original-label,
.final-label {
  display: block;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.original-notes,
.final-notes {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.original-note,
.final-note {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.75rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.movement-steps {
  margin: 1.5rem 0;
  padding: 0 0.5rem;
}

.movement-step {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--primary-color);
}

.movement-step:last-child {
  margin-bottom: 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.step-number {
  background: var(--primary-color);
  color: black;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.step-description {
  font-size: 0.9rem;
  color: white;
  font-weight: 500;
}

.step-movements {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.note-movement {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  min-width: 80px;
}

.note-movement.keep {
  opacity: 0.7;
}

.note-movement.lower {
  border: 2px solid rgba(220, 53, 69, 0.3);
}

.note-movement.raise {
  border: 2px solid rgba(40, 167, 69, 0.3);
}

.from-note,
.to-note {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.movement-arrow {
  font-size: 1.2rem;
  font-weight: bold;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.movement-arrow.down {
  color: #dc3545;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.movement-arrow.up {
  color: #28a745;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.movement-arrow.stay {
  color: #6c757d;
  font-size: 1rem;
}

.action-label {
  font-size: 0.7rem;
  color: white;
  opacity: 0.8;
  text-align: center;
  margin-top: 0.25rem;
}

/* Animation for transformation steps */
.movement-step {
  animation: stepReveal 0.5s ease-out;
  animation-fill-mode: both;
}

.movement-step[data-step="1"] {
  animation-delay: 0.1s;
}

.movement-step[data-step="2"] {
  animation-delay: 0.3s;
}

@keyframes stepReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced transformation cards */
.transformation-preview {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  min-height: 200px;
}

/* New Circular Layout Styles */
.workshop-circle-container,
.diminished-circle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.diminished-circle-container:hover {
  transform: scale(1.05);
}

.diminished-circle-container.playing {
  animation: playingPulse 2s ease-out;
}

.workshop-circle,
.diminished-circle {
  position: relative;
  width: 200px;
  height: 200px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diminished-circle .note-element {
  width: 50px;
  height: 50px;
  font-size: 0.9rem;
}

.workshop-circle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.workshop-note,
.circle-note {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.workshop-note:hover,
.circle-note:hover {
  transform: translate(-50%, -50%) scale(1.1);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.workshop-note.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(255, 183, 77, 0.5);
  transform: translate(-50%, -50%) scale(1.15);
}

.circle-note.selected-anchor {
  border-color: var(--primary-color);
  box-shadow: 0 0 25px rgba(255, 183, 77, 0.6);
  transform: translate(-50%, -50%) scale(1.2);
  border-width: 3px;
}

.note-name {
  font-size: 0.9rem;
  line-height: 1;
}

.note-position {
  font-size: 0.6rem;
  opacity: 0.8;
  margin-top: 2px;
}

.transformation-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 10;
}

.transformation-arrow.down {
  color: #dc3545;
  top: 50px; /* Adjusted: closer to the note */
}

.transformation-arrow.up {
  color: #28a745;
  top: -30px; /* Above the note */
}

/* Text-based transformation steps */
.transformation-steps {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.chord-recipe {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

.chord-recipe > strong {
  display: block;
  margin-bottom: 0.75rem;
  color: white;
  font-size: 1rem;
}

.simple-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
  padding: 0;
  text-align: center;
}

.step-line {
  color: white;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0;
  margin: 0;
}

.step-line strong {
  color: var(--primary-color);
}

.result-chord {
  margin-top: 1.5rem;
  text-align: center;
  padding: 1rem;
  background: rgba(255, 183, 77, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 183, 77, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.result-chord:hover {
  background: rgba(255, 183, 77, 0.2);
  border-color: rgba(255, 183, 77, 0.5);
  transform: translateY(-2px);
}

.result-chord strong {
  display: block;
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.result-notes {
  color: white;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  cursor: pointer;
  transition: all 0.3s ease;
}

.result-notes:hover {
  transform: scale(1.1);
}

.result-notes.playing {
  animation: playingPulse 2s ease-out;
}

.result-note {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 50%;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  min-width: 1.5rem;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.result-note.transformed-root {
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  position: relative;
  border: 2px solid gold;
}

.no-steps {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem;
  font-style: italic;
}

@keyframes detailPulse {
  0%, 100% {
    background: rgba(0, 0, 0, 0.2);
  }
  50% {
    background: rgba(255, 183, 77, 0.1);
  }
}

.card-actions {
  padding: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.play-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.play-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Family Showcase */
.showcase-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
}

.showcase-section h4 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 0.5rem;
}

.showcase-section p {
  text-align: center;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.universe-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.universe-tab {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  color: white;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.universe-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.universe-tab.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: currentColor;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.universe-display {
  min-height: 200px;
}

.universe-placeholder {
  text-align: center;
  padding: 3rem;
  opacity: 0.6;
  font-size: 1.1rem;
  font-style: italic;
}

.universe-content {
  animation: fadeIn 0.5s ease-in;
}

.universe-header {
  text-align: center;
  margin-bottom: 2rem;
}

.universe-header h5 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.universe-header p {
  opacity: 0.8;
}

.universe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.universe-chord {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.universe-chord:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.universe-chord.playing {
  animation: universe-playing 1.5s ease-out;
}

@keyframes universe-playing {
  0%, 100% { background: rgba(255, 255, 255, 0.08); }
  50% { background: rgba(255, 183, 77, 0.2); }
}

.chord-badge {
  color: white;
  padding: 0.5rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-weight: bold;
  font-size: 0.9rem;
}

.chord-notes-mini {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.note-mini {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.7rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.chord-origin {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.75rem;
}

.universe-play-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: white;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.universe-play-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .creation-laboratory {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .parent-gallery {
    grid-template-columns: 1fr;
  }
  
  .method-cards {
    grid-template-columns: 1fr;
  }
  
  .transformation-grid {
    grid-template-columns: 1fr;
  }
  
  .universe-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .universe-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .constellation-star,
  .workshop-note {
    width: 45px;
    height: 45px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .lab-header h3 {
    font-size: 1.5rem;
  }
  
  .note-circle {
    gap: 0.5rem;
  }
  
  .workshop-note {
    width: 60px;
    height: 60px;
  }
  
  .constellation-star {
    width: 45px;
    height: 45px;
    font-size: 0.75rem;
  }
  
  .parent-constellation {
    width: 180px;
    height: 180px;
  }
}

/* Additional responsive styles for circular layouts */
@media (max-width: 1024px) {
  .workshop-circle,
  .diminished-circle {
    width: 160px;
    height: 160px;
  }
  
  .diminished-circle .note-element {
    width: 45px;
    height: 45px;
    font-size: 0.8rem;
  }
  
  .workshop-note,
  .circle-note {
    width: 50px;
    height: 50px;
  }
  
  .note-name {
    font-size: 0.8rem;
  }
  
  .note-position {
    font-size: 0.55rem;
  }
  
  .transformation-steps {
    padding: 0.75rem;
  }
  
  .step-line {
    font-size: 0.9rem;
  }
  
  .transformation-arrow.down {
    top: 45px; /* Adjusted for mobile */
  }
  
  .transformation-arrow.up {
    top: -25px;
  }
}

@media (max-width: 768px) {
  .workshop-circle,
  .diminished-circle {
    width: 140px;
    height: 140px;
  }
  
  .diminished-circle .note-element {
    width: 40px;
    height: 40px;
    font-size: 0.75rem;
  }
  
  .workshop-note,
  .circle-note {
    width: 45px;
    height: 45px;
    font-size: 0.75rem;
  }
  
  .chord-recipe {
    padding: 0.75rem;
  }
  
  .result-chord {
    padding: 0.75rem;
  }
  
  .result-chord strong {
    font-size: 1.1rem;
  }
  
  .step-line {
    font-size: 0.85rem;
  }
  
  .transformation-arrow.down {
    top: 40px; /* Adjusted for smaller screens */
    font-size: 1.3rem;
  }
  
  .transformation-arrow.up {
    top: -20px;
    font-size: 1.3rem;
  }
}

/* =================================
   CHORD GENEALOGY STYLES
   ================================= */

.genealogy-laboratory {
  padding: var(--space-lg);
  background: var(--bg-medium);
  border-radius: 12px;
  max-width: 100%;
}

.genealogy-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  justify-content: center;
}

.genealogy-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md);
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-medium);
  min-width: 160px;
  text-align: center;
}

.genealogy-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.genealogy-tab.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--card-bg), var(--bg-light));
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
}

.genealogy-tab .tab-icon {
  font-size: 2rem;
  margin-bottom: var(--space-xs);
}

.genealogy-tab .tab-name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: var(--space-xs);
}

.genealogy-tab .tab-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.genealogy-content {
  animation: fadeIn 0.5s ease;
}

.genealogy-display {
  width: 100%;
}

.genealogy-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.genealogy-header h3 {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  color: var(--accent);
}

.genealogy-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.genealogy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.genealogy-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: var(--space-md);
  border: 2px solid var(--border-color);
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.genealogy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.2);
  border-color: var(--accent);
}

.genealogy-card.playing {
  animation: playingPulse 1.5s ease;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.chord-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-radius: 12px;
  margin-bottom: var(--space-md);
  color: white;
  font-weight: bold;
}

.chord-title .chord-icon {
  font-size: 1.5rem;
}

.chord-title .chord-name {
  font-size: 1.3rem;
  flex-grow: 1;
  text-align: center;
}

.chord-play-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.2rem;
}

.chord-play-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.parentage-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  gap: var(--space-sm);
}

.parent-method {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.method-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.method-icon {
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
  color: var(--accent);
}

.method-name {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text-secondary);
}

.parent-relationship {
  background: var(--bg-dark);
  border-radius: 12px;
  padding: var(--space-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  min-height: 100px;
}

.parent-relationship:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.parent-relationship.playing {
  animation: playingPulse 1s ease;
  border-color: var(--accent);
}

.parent-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.parent-name {
  font-weight: bold;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.parent-constellation {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-xs);
}

.parent-note {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  color: white;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.parent-note.contributes {
  border-color: #4CAF50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.parent-note.transforms {
  border-color: #FF9800;
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
}

.highlight-ring {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 3px solid #4CAF50;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.8);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.transform-indicator {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent);
  color: var(--bg-dark);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.contribution-line {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.dna-helix {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 40px;
  flex-shrink: 0;
}

.helix-strand {
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 1px 0;
}

.helix-center {
  font-size: 1.5rem;
  color: var(--accent);
  animation: rotate360 4s linear infinite;
}

.result-notes-display {
  text-align: center;
}

.notes-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.chord-notes {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  flex-wrap: wrap;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: 8px;
  transition: var(--transition-fast);
}

.chord-notes:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.02);
}

.result-note {
  padding: var(--space-xs) var(--space-sm);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.no-parent {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: var(--space-lg);
}

/* Animations */
@keyframes playingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes rotate360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 1400px) {
  .genealogy-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .genealogy-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
  }
  
  .genealogy-card {
    padding: var(--space-sm);
  }
  
  .parentage-display {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .dna-helix {
    transform: rotate(90deg);
    min-width: 30px;
    min-width: auto;
    margin: var(--space-md) 0;
  }
  
  .helix-strand {
    width: 40px;
    height: 2px;
    margin: 0 2px;
  }
  
  .genealogy-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .genealogy-tab {
    width: 100%;
    max-width: 300px;
  }
}

/* Speaker Icon Styles */
.center-speaker-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  opacity: 0.4;
  z-index: 5;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-speaker-icon::before {
  content: '🔊';
}

.inline-speaker-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  opacity: 0.5;
  font-size: 14px;
}

.inline-speaker-icon::before {
  content: '🔊';
}

/* Add speaker icons to specific elements */
.resolution-btn::after,
.sibling-label::after,
.result-notes::after,
.chord-notes::after {
  content: '🔊';
  margin-left: 6px;
  opacity: 0.5;
  font-size: 12px;
}

@media (max-width: 480px) {
  .genealogy-grid {
    grid-template-columns: 1fr;
  }
  
  .genealogy-laboratory {
    padding: var(--space-md);
  }
  
  .chord-title {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
  
  .chord-title .chord-name {
    font-size: 1.1rem;
  }
  
  .center-speaker-icon {
    width: 35px;
    height: 35px;
    font-size: 28px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  }
  
  .creation-laboratory .center-speaker-icon {
    width: 40px;
    height: 40px;
    font-size: 32px;
  }
}
