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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --radius: 12px;
}

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

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

/* Sticky header wrapper */
.sticky-header { position: sticky; top: 0; z-index: 100; }

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  padding: 40px 0 32px;
  text-align: center;
}
.header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.header p { opacity: .9; font-size: 1.05rem; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.card h2 { font-size: 1.2rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* Spec table */
.spec-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.spec-table th { font-weight: 600; color: var(--text-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }

/* Steps */
.step { display: flex; gap: 16px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.step:last-child { border: none; margin: 0; padding: 0; }
.step-num { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.step-body h3 { font-size: 1rem; margin-bottom: 4px; }
.step-body p { color: var(--text-muted); font-size: .9rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px; font-size: 1rem; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none; transition: all .2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-google { background: white; color: #333; border: 1px solid var(--border); }
.btn-google:hover { border-color: #999; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: #eff6ff; }
.upload-zone.has-file { border-color: var(--success); border-style: solid; background: #f0fdf4; }
.upload-zone-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-zone p { color: var(--text-muted); margin-bottom: 4px; }
.upload-zone .hint { font-size: .85rem; color: #94a3b8; }

/* Preview */
.preview-area { display: none; margin-top: 20px; text-align: center; }
.preview-area.visible { display: block; }
.preview-area img { max-width: 240px; max-height: 280px; border-radius: 8px; border: 2px solid var(--border); }

/* Status */
.status { display: none; padding: 16px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; }
.status.error { display: block; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.status.success { display: block; background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.status.info { display: block; background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe; }

/* Auth section */
.auth-section { text-align: center; padding: 20px; }
.auth-section .avatar { width: 48px; height: 48px; border-radius: 50%; margin-bottom: 8px; }
.auth-section .email { color: var(--text-muted); font-size: .9rem; }

/* Nav tabs */
.nav { display: flex; gap: 4px; justify-content: center; background: var(--card); border-bottom: 1px solid var(--border); padding: 0 20px; }
.nav a { padding: 12px 20px; text-decoration: none; color: var(--text-muted); font-size: .9rem; font-weight: 500; border-bottom: 2px solid transparent; transition: all .2s; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Colab section */
.colab-box { background: #1e293b; color: #e2e8f0; border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.colab-box a { color: #60a5fa; }

/* Responsive */
@media (max-width: 640px) {
  .header h1 { font-size: 1.5rem; }
  .container { padding: 0 16px; }
  .card { padding: 16px; }
  .step { gap: 12px; }
  .spec-table { font-size: .85rem; }
  .spec-table th, .spec-table td { padding: 8px; }
}
