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

:root {
  --primary: #5b6ef5;
  --background: #0b0d12;
  --surface: #1a1d25;
  --surface-light: #252831;
  --text: #f5f5f7;
  --text-dim: #a0a8b8;
  --accent: #8fa3ff;
  --border: #2a2e3a;
  --success: #10b981;
  --warning: #f59e0b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--background);
  color: var(--text);
  padding: 2rem;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #5b6ef5 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  margin-top: 1rem;
}

nav button {
  margin: 0 0.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--surface-light);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

nav button:hover {
  border-color: var(--primary);
  background: var(--surface);
}

nav button.active {
  border-color: var(--primary);
  background: rgba(91, 110, 245, 0.2);
  color: var(--accent);
}

.config-section {
  display: none;
}

.config-section:not(.hidden) {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.8rem;
  color: white;
}

.copy-btn {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #5b6ef5 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(91, 110, 245, 0.4);
}

.dimension-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dimension-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: white;
}

.dimension-description {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.axis {
  margin-bottom: 2rem;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.slider-label input[type="text"] {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-align: center;
  min-width: 80px;
}

.slider-label input[type="text"]:hover {
  background: var(--surface-light);
  border-color: var(--border);
}

.slider-label input[type="text"]:focus {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--text);
}

.slider-track {
  position: relative;
  height: 60px;
  background: var(--surface-light);
  border-radius: 30px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.slider-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 30px;
}

.slider-wrapper {
  position: relative;
  height: 100%;
}

input[type="range"] {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  transform: translateY(-50%);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 4px solid var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 4px solid var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

input[type="text"] {
  background: var(--surface-light);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
}

.madlib-sentence {
  font-size: 1.1rem;
  line-height: 2;
  margin-bottom: 2rem;
  color: var(--text);
}

.madlib-sentence input[type="text"] {
  display: inline-block;
  min-width: 150px;
  margin: 0 0.25rem;
}

pre {
  background: #000;
  color: #0f0;
  padding: 1.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  border: 1px solid var(--border);
}

footer {
  text-align: center;
  margin-top: 4rem;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}

.hidden {
  display: none !important;
}

h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.2rem;
}
