/* style.css */
:root {
  --bg-color: #111827;
  --card-bg: #1f2937;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --accent-color: #8b5cf6;
  --border-color: #374151;
  --success-color: #10b981;
  --error-color: #ef4444;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.app-container {
  width: 100%;
  max-width: 800px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.app-header {
  text-align: center;
}

.app-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.app-header p {
  color: var(--text-muted);
}

.app-main {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--primary-color);
  border-radius: var(--radius-md);
  padding: 3rem 1rem;
  text-align: center;
  cursor: pointer;
  background-color: rgba(59, 130, 246, 0.05);
  transition: var(--transition);
}

.dropzone:hover,
.dropzone.dragover {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: var(--primary-hover);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-icon {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.dropzone .primary-text {
  font-weight: 600;
  font-size: 1.125rem;
}

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

/* Settings */
.settings-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.setting-group label {
  font-weight: 500;
  font-size: 0.875rem;
}

select {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input[type="range"] {
  width: 100%;
  margin-top: 0.5rem;
}

/* Actions */
.action-panel {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
  flex-grow: 1;
}

.primary-btn:hover:not(:disabled) {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.secondary-btn {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  flex-grow: 1;
}

.secondary-btn:hover:not(:disabled) {
  background-color: var(--bg-color);
}

/* Results */
.results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-grow: 1;
}

.file-name {
  font-weight: 500;
  word-break: break-all;
}

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

.status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pending {
  background: rgba(217, 119, 6, 0.2);
  color: #fcd34d;
}

.status-converting {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

.status-done {
  background: rgba(5, 150, 105, 0.2);
  color: #6ee7b7;
}

.status-error {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
}

.item-actions button {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  color: var(--text-main);
}

.item-actions button:hover {
  background: var(--bg-color);
}

.item-actions a {
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--primary-color);
  color: white;
}

.item-actions a:hover {
  background: var(--primary-hover);
}

.app-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: auto;
}

@media (max-width: 640px) {
  .settings-panel {
    grid-template-columns: 1fr;
  }

  .app-container {
    padding: 1rem;
  }
}