/* Analog Drum Machine Pattern Optimizer Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f8f9fa;
}
.container { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.site-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 100;
}
.nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}
.nav a:hover { background: rgba(255,255,255,0.1); }
.hero {
  text-align: center;
  padding: 2rem 0 1rem;
}
.hero h2 { font-size: 1.75rem; margin-bottom: 0.75rem; color: #1a1a2e; }
.hero p { color: #666; max-width: 600px; margin: 0 auto; }
.preset-selector {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.preset-selector label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.preset-selector select { padding: 0.5rem; border-radius: 4px; border: 1px solid #ddd; font-size: 1rem; }
.optimizer-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}
.input-panel, .output-panel {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.input-panel h3, .output-panel h3 { color: #1a1a2e; margin-bottom: 1rem; font-size: 1.25rem; }
.kick-controls, .hat-controls, .snare-controls, .velocity-controls {
  margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; }
.kick-controls:last-child, .hat-controls:last-child, .snare-controls:last-child, .velocity-controls:last-child { border-bottom: none; }
label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
input[type="range"] { width: 100%; }
.step-display { font-size: 0.875rem; color: #666; }
.primary-btn, .secondary-btn, .export-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}
.primary-btn { background: #4f46e5; color: #fff; }
.primary-btn:hover { background: #4338ca; }
.secondary-btn { background: #e5e7eb; color: #374151; }
.secondary-btn:hover { background: #d1d5db; }
.export-options { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.export-btn { flex: 1; min-width: 80px; background: #f3f4f6; }
.pattern-display {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 2px;
  margin-bottom: 1rem;
  height: 60px;
}
.pattern-cell { display: flex; align-items: center; justify-content: center; font-size: 0.75rem; background: #f3f4f6; }
.kick-cell { background: #ef4444; color: #fff; font-weight: bold; }
.snare-cell { background: #f59e0b; color: #fff; font-weight: bold; }
.hat-cell { background: #10b981; color: #fff; font-weight: bold; }
.pattern-info {
  display: grid;
  gap: 0.5rem;
}
.info-item { display: flex; justify-content: space-between; }
.info-item .value { font-family: monospace; font-size: 0.875rem; }
.help-section, .about-section { padding: 1.5rem; background: #fff; border-radius: 8px; margin: 2rem 0; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.help-section h3, .about-section h3 { color: #1a1a2e; margin-bottom: 1rem; font-size: 1.25rem; }
.help-section h4, .about-section h4 { color: #333; margin: 1rem 0 0.5rem; }
ul { padding-left: 1.5rem; line-height: 1.8; }
.site-footer {
  background: #1a1a2e;
  color: #94a3b8;
  padding: 1rem 0;
  margin-top: 3rem;
}
.site-footer a { color: #94a3b8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
@media (max-width: 768px) {
  .optimizer-section { grid-template-columns: 1fr; gap: 1.5rem; }
  .pattern-display { grid-template-columns: repeat(8, 1fr); height: 48px; }
  .pattern-cell { font-size: 0.65rem; }
  .export-options { flex-direction: column; }
  .nav { gap: 1rem; }
}
@media (max-width: 480px) {
  .container { padding: 0.75rem; }
  .hero h2 { font-size: 1.5rem; }
  .input-panel, .output-panel { padding: 1rem; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
