/* MADUROFICATION - Clean Human Design */

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

:root {
  --bg: #1a1a1a;
  --card: #242424;
  --border: #333;
  --text: #fff;
  --text-dim: #888;
  --yellow: #ffd000;
  --red: #e63946;
  --blue: #457b9d;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.app {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* No fancy backgrounds */
.bg-pattern,
.bg-glow {
  display: none;
}

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

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

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.logo h1 {
  font-family: 'Anton', sans-serif;
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--yellow);
}

.tagline {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.highlight {
  color: var(--yellow);
  font-weight: 600;
}

/* Contract Address */
.contract-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 100%;
  overflow: hidden;
}

.contract-label {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.contract-address {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--yellow);
  background: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-btn:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

.copy-btn.copied {
  color: #4ade80;
  border-color: #4ade80;
}

/* Main */
.main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

/* Upload Zone */
.upload-container {
  margin-bottom: 20px;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  background: var(--card);
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover {
  border-color: var(--yellow);
  background: #2a2a2a;
}

.upload-zone.dragover {
  border-color: var(--yellow);
  background: #2a2a2a;
}

.upload-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: var(--yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
}

.upload-icon svg {
  width: 28px;
  height: 28px;
}

.upload-zone h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.upload-zone p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.upload-hint {
  display: inline-block;
  background: var(--bg);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Preview */
.preview-container {
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 2px solid var(--border);
}

.preview-container[hidden] {
  display: none;
}

#preview-image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
}

.preview-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  position: absolute;
  inset: 0;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.preview-container {
  position: relative;
}

.preview-container:hover .preview-overlay {
  opacity: 1;
}

/* Maduro Card */
.maduro-preview {
  display: flex;
  justify-content: center;
}

.maduro-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.maduro-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--yellow);
}

.maduro-info {
  display: flex;
  flex-direction: column;
}

.maduro-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--yellow);
}

.maduro-name {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--yellow);
  color: #000;
}

.btn-primary:hover {
  background: #ffe033;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #333;
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-large {
  padding: 14px 32px;
  font-size: 1rem;
}

/* Processing */
.processing-container {
  text-align: center;
  padding: 60px 20px;
}

.processing-animation {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
}

.processing-ring {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: 50%;
}

.processing-ring:nth-child(1) {
  border-top-color: var(--yellow);
  animation: spin 1s linear infinite;
}

.processing-ring:nth-child(2) {
  inset: 12px;
  border-right-color: var(--red);
  animation: spin 0.8s linear infinite reverse;
}

.processing-ring:nth-child(3) {
  inset: 24px;
  border-bottom-color: var(--blue);
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.processing-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 4px;
  overflow: hidden;
}

.processing-icon svg {
  width: 100%;
  height: 100%;
}

.processing-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.processing-subtitle {
  color: var(--text-dim);
  margin-bottom: 24px;
}

.progress-bar {
  width: 100%;
  max-width: 300px;
  height: 6px;
  background: var(--card);
  border-radius: 3px;
  margin: 0 auto 24px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 3px;
  transition: width 0.3s;
}

.processing-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.step.active {
  color: var(--yellow);
}

.step.complete {
  color: #4ade80;
}

/* Result */
.result-container {
  text-align: center;
}

.result-header {
  margin-bottom: 20px;
}

.result-header h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.result-time {
  color: var(--text-dim);
}

.result-time span {
  color: var(--yellow);
  font-weight: 600;
}

.result-image-container {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 2px solid var(--yellow);
}

#result-image {
  max-width: 100%;
  max-height: 400px;
  display: block;
}

.result-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 12px;
  background: var(--yellow);
  color: #000;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 1px;
  border-radius: 4px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Error */
.error-container {
  text-align: center;
  padding: 50px 20px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--red);
}

.error-icon {
  margin-bottom: 16px;
  color: var(--red);
}

.error-icon svg {
  stroke: var(--red);
}

.error-container h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

#error-message {
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px 20px;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.footer p {
  margin-bottom: 4px;
}

.disclaimer {
  opacity: 0.6;
  font-size: 0.7rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 500;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.toast.success {
  border-color: #4ade80;
}

.toast.error {
  border-color: var(--red);
}

/* Responsive */
@media (max-width: 500px) {
  .logo h1 {
    font-size: 1.8rem;
  }

  .upload-zone {
    padding: 40px 20px;
  }

  .btn {
    width: 100%;
  }

  .result-actions {
    flex-direction: column;
  }
}