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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #581c87 50%, #0f172a 100%);
  padding: 20px;
  color: #fff;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 24px;
}

.header-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.icon-box.blue {
  background: #3b82f6;
}

.icon-box.green {
  background: #22c55e;
}

.header h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

.header p {
  color: #94a3b8;
  font-size: 14px;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-zone:hover {
  border-color: #a855f7;
  background: rgba(255, 255, 255, 0.05);
}

.upload-zone.dragover {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.upload-zone h3 {
  margin-bottom: 4px;
}

.upload-zone p {
  color: #94a3b8;
  font-size: 12px;
}

#fileInput {
  display: none;
}

/* Error */
.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 12px;
  padding: 12px;
  color: #fca5a5;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

/* Settings */
.settings-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
}

.settings-section {
  margin-bottom: 16px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-label {
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn.active-purple {
  background: #a855f7;
  color: #fff;
}

.btn.active-green {
  background: rgba(16, 185, 129, 0.8);
  color: #fff;
}

/* Stats */
.stats {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.stat.green {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.3);
}

.stat.purple {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.3);
}

.stat.pink {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.3);
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
}

.stat-label {
  font-size: 11px;
  color: #94a3b8;
}

/* Result */
.result {
  display: none;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-download {
  background: #22c55e;
  color: #fff;
}

.btn-download:hover {
  background: #16a34a;
}

.preview {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  color: #cbd5e1;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Footer */
.footer {
  text-align: center;
  color: #64748b;
  font-size: 12px;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 600px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .btn-group {
    gap: 6px;
  }
  
  .btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .result-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .result-actions {
    width: 100%;
  }
  
  .btn-action {
    flex: 1;
    text-align: center;
  }
}
