:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 40px 0;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.95;
}

main {
  margin: 40px auto;
  min-height: 60vh;
}

.tabs {
  display: flex;
  gap: 8px;
  white-space: nowrap;
  margin-bottom: 32px;
  background: white;
  padding: 8px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

.tab-btn svg {
  width: 20px;
  height: 20px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

.tool-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.tool-card h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
  color: var(--text);
}

.description {
  color: var(--text-light);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.upload-zone {
  border: 3px dashed var(--border);
  border-radius: 12px;
  padding: 60px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 24px;
  background: var(--bg);
}

.upload-zone:hover {
  border-color: var(--primary);
  background: #f0f4ff;
}

.upload-zone svg {
  color: var(--primary);
  margin-bottom: 16px;
  opacity: 0.7;
}

.upload-zone p {
  color: var(--text-light);
  font-size: 1rem;
}

.upload-zone.dragover {
  border-color: var(--primary);
  background: #f0f4ff;
}

.file-list {
  margin-bottom: 20px;
}

.file-item {
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
}

.file-item .file-name {
  color: var(--text);
  font-weight: 500;
}

.file-item .file-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 8px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: var(--text-light);
  font-size: 0.85rem;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border 0.2s ease;
  background: white;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(99, 102, 241, 0.3);
}

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

.status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  display: none;
}

.status.show {
  display: block;
}

.status.info {
  background: #dbeafe;
  color: #1e40af;
}

.status.success {
  background: #dcfce7;
  color: #166534;
}

.status.error {
  background: #fee2e2;
  color: #991b1b;
}

.output-area {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  resize: vertical;
  margin-top: 20px;
  background: var(--bg);
}

.output-area:focus {
  outline: none;
  border-color: var(--primary);
}

footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  margin-top: 60px;
}

footer p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Shared footer styles across pages */
.site-footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 24px 0 32px;
  text-align: center;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.95rem;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  header h1 { font-size: 2rem; }
  .tool-card { padding: 24px; }
  .tabs { flex-wrap: nowrap; }
  .tab-btn { min-width: 100px; font-size: 0.9rem; }
  .settings-grid { grid-template-columns: 1fr; }
}
