/* OrsonCraft Tool Page Styles */
.tool-page {
  padding-bottom: var(--sp-8);
}

.tool-page .tool-workspace {
  min-height: 200px;
}

/* Preview containers */
.preview-container {
  position: relative;
  background: var(--bg-0);
  border-radius: var(--radius);
  overflow: hidden;
  margin: var(--sp-2) 0;
}

.preview-container canvas,
.preview-container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Slider with value */
.slider-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.slider-group input[type="range"] { flex: 1; }

.slider-value {
  min-width: 48px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* File info */
.file-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-2);
  background: var(--bg-0);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: var(--sp-2) 0;
}

.file-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.file-info-item strong { color: var(--text); }

/* Result stats */
.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-2);
  margin: var(--sp-2) 0;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-2);
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Preset buttons */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-1);
  margin: var(--sp-2) 0;
}

.preset-btn {
  padding: var(--sp-1) var(--sp-2);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-align: left;
  font-family: var(--font-body);
}

.preset-btn:hover { border-color: var(--accent-blue); color: var(--text); }
.preset-btn.active {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.05);
  color: var(--accent-cyan);
}

.preset-name { font-weight: 600; display: block; }
.preset-size { font-size: var(--text-xs); opacity: 0.7; }

/* Color swatch */
.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform var(--duration) var(--ease);
}
.color-swatch:hover { transform: scale(1.1); }

.color-palette {
  display: flex;
  gap: var(--sp-1);
  flex-wrap: wrap;
  margin: var(--sp-2) 0;
}

/* Waveform */
.waveform-container {
  width: 100%;
  height: 120px;
  background: var(--bg-0);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: crosshair;
}

.waveform-container canvas {
  width: 100%;
  height: 100%;
}

/* BPM display */
.bpm-display {
  text-align: center;
  padding: var(--sp-6);
}

.bpm-value {
  font-family: var(--font-heading);
  font-size: 96px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.bpm-label {
  font-size: var(--text-xl);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

.tap-area {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--sp-4) auto;
  cursor: pointer;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: white;
  transition: transform 100ms var(--ease);
  user-select: none;
  -webkit-user-select: none;
}

.tap-area:active { transform: scale(0.93); }

/* Crop overlay */
.crop-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

/* Comparison slider */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

@media (max-width: 600px) {
  .comparison { grid-template-columns: 1fr; }
  .bpm-value { font-size: 64px; }
  .tap-area { width: 160px; height: 160px; }
}

/* QR output */
.qr-output {
  background: white;
  padding: var(--sp-3);
  border-radius: var(--radius);
  display: inline-block;
  margin: var(--sp-2) 0;
}

/* Textarea counter */
.textarea-counter {
  position: relative;
}

.char-count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.char-count.over { color: var(--danger); }

/* Checklist */
.check-item {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) 0;
  font-size: var(--text-sm);
}

.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.check-pass { background: rgba(46, 230, 166, 0.15); color: var(--success); }
.check-fail { background: rgba(255, 92, 122, 0.15); color: var(--danger); }
.check-warn { background: rgba(255, 179, 71, 0.15); color: var(--warning); }
