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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;
  --border-color: #2a2a3a;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #ab8cc6;
  --accent-hover: #a78bfa;
  --terminal-bg: #0d0d12;
  --terminal-btn-close: #ff5f57;
  --terminal-btn-minimize: #febc2e;
  --terminal-btn-maximize: #28c840;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.header {
  text-align: center;
  padding: 2rem 0;
}

.title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--terminal-btn-close), var(--terminal-btn-minimize), #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 1rem;
  padding: 2rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-secondary);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.05);
}

.drop-zone.drag-over {
  transform: scale(1.01);
}

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

.drop-icon {
  width: 3rem;
  height: 3rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.drop-zone:hover .drop-icon {
  color: var(--accent);
}

.drop-text {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.drop-link {
  color: var(--accent);
  font-weight: 500;
}

.drop-link:hover {
  color: var(--accent-hover);
}

.drop-hint {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Controls */
.controls {
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.slider-label {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
}

.slider-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.slider-text span {
  color: var(--accent);
  font-weight: 600;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* Terminal */
.terminal-wrapper {
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.terminal {
  background: var(--terminal-bg);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.3),
    0 10px 10px -5px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  min-width: 700px;
  max-width: 100%;
  transition: width 0.3s ease;
}

.terminal-toolbar {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
  display: flex;
  gap: 0.5rem;
}

.terminal-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-btn.close { background: var(--terminal-btn-close); }
.terminal-btn.minimize { background: var(--terminal-btn-minimize); }
.terminal-btn.maximize { background: var(--terminal-btn-maximize); }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

.terminal-spacer {
  width: 52px;
}

.terminal-body {
  padding: 1rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  font-size: 14px;
  line-height: 1;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: pre;
  min-height: 100px;
}

.ansi-line {
  display: block;
  height: 1em;
  line-height: 1;
  white-space: pre;
}

.terminal-placeholder {
  color: var(--text-muted);
}

.prompt {
  color: var(--accent);
  margin-right: 0.5rem;
}

.ansi-output {
  display: block;
}

.ansi-line span {
  display: inline-block;
  width: 0.6em;
  text-align: center;
}

/* Command Section */
.command-section {
  background: var(--bg-secondary);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: none;
}

.command-section.visible {
  display: block;
}

.command-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.command-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.copy-btn.copied {
  background: #10b981;
}

.copy-icon {
  width: 16px;
  height: 16px;
}

.command-preview {
  padding: 1rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow: hidden;
  max-height: 4.5em;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .title {
    font-size: 1.75rem;
  }
  
  .drop-zone {
    padding: 2rem 1rem;
  }
  
  .terminal {
    min-width: 100%;
  }
  
  .terminal-body {
    font-size: 10px;
  }
}

/* Loading state */
.loading .drop-zone-content::after {
  content: 'Converting...';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.9);
  color: var(--accent);
  font-size: 1.125rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.command-section.visible {
  animation: fadeIn 0.3s ease;
}
