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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e4e4e7;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

.back {
  display: inline-block;
  color: #818cf8;
  text-decoration: none;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.back:hover {
  text-decoration: underline;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.subtitle {
  color: #a1a1aa;
  font-size: 1rem;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
  border-radius: 10px;
}

.tab {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  color: #a1a1aa;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab:hover {
  color: #fff;
}

.tab.active {
  background: rgba(129, 140, 248, 0.2);
  color: #818cf8;
}

.panel {
  display: none;
}

.panel.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #d4d4d8;
}

textarea {
  width: 100%;
  padding: 1rem;
  font-size: 0.9rem;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

textarea[readonly] {
  background: rgba(0, 0, 0, 0.4);
}

.primary-btn, .secondary-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.primary-btn {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: #fff;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.button-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.button-row .secondary-btn {
  flex: 1;
  margin-top: 0;
}

.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: #a1a1aa;
  transition: border-color 0.15s, background 0.15s;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #818cf8;
  background: rgba(129, 140, 248, 0.1);
}

.drop-zone input[type="file"] {
  display: none;
}

.file-label {
  color: #818cf8;
  cursor: pointer;
  text-decoration: underline;
}

.file-preview {
  margin-top: 1rem;
  text-align: center;
}

.file-preview.hidden {
  display: none;
}

.file-preview img {
  max-width: 200px;
  max-height: 150px;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.file-preview p {
  color: #a1a1aa;
  font-size: 0.85rem;
}

.status {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

.status.hidden {
  display: none;
}

.status.success {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #71717a;
  font-size: 0.875rem;
}

footer a {
  color: #818cf8;
  text-decoration: none;
}

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