:root {
  --bg: #0a0a0f;
  --card: #12121a;
  --card-hover: #1a1a28;
  --border: #1e1e30;
  --text: #e0e0f0;
  --text-muted: #8888aa;
  --accent: #6366f1;
  --accent-glow: rgba(99,102,241,0.3);
  --success: #22d06a;
  --danger: #ef4444;
  --sr-color: #3b82f6;
  --hs-color: #22c55e;
  --wn-color: #ef4444;
  --bl-color: #eab308;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(34,208,106,0.03) 0%, transparent 50%);
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header h1 {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s;
}
.header a:hover { color: var(--text); }

/* ===== LANDING PAGE ===== */
.landing {
  max-width: 800px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}
.landing h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}
.landing p {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 15px;
  line-height: 1.6;
}
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 500px;
  margin: 0 auto;
}
.vendor-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  cursor: pointer;
  transition: all .25s ease;
  text-decoration: none;
  color: var(--text);
}
.vendor-card:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
}
.vendor-card .icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.vendor-card .name {
  font-size: 16px;
  font-weight: 600;
}
.vendor-card .brand {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.vendor-card.sr { border-left: 3px solid var(--sr-color); }
.vendor-card.hs { border-left: 3px solid var(--hs-color); }
.vendor-card.wn { border-left: 3px solid var(--wn-color); }
.vendor-card.bl { border-left: 3px solid var(--bl-color); }

/* ===== EDITOR PAGE ===== */
.editor-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - 57px);
}
.editor-sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.editor-sidebar h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.editor-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
#mockup-canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btn:hover { background: var(--card-hover); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 12px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 20px var(--accent-glow); }

.btn-success {
  background: linear-gradient(135deg, var(--success), #16a34a);
  border-color: transparent;
  color: #fff;
}
.btn-wa {
  background: #25d366;
  border-color: transparent;
  color: #fff;
}
.btn-wa:hover { background: #20bd5a; }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-full { width: 100%; }

/* Upload area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.upload-area:hover {
  border-color: var(--accent);
  background: rgba(99,102,241,0.05);
}
.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-area .icon { font-size: 28px; margin-bottom: 6px; }
.upload-area p { font-size: 12px; color: var(--text-muted); }

/* Color picker */
.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.2); }
.color-swatch input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* View toggle */
.view-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.view-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
}
.view-btn.active {
  background: var(--accent);
  color: #fff;
}
.view-btn:not(:last-child) { border-right: 1px solid var(--border); }

/* Stats */
.stat-row {
  display: flex;
  gap: 8px;
}
.stat-item {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
}
.stat-item .label { font-size: 10px; color: var(--text-muted); }
.stat-item .value { font-size: 13px; font-weight: 600; margin-top: 2px; }

/* Action buttons row */
.action-row {
  display: flex;
  gap: 8px;
}
.action-row .btn { flex: 1; }

/* Responsive */
@media (max-width: 768px) {
  .editor-layout { flex-direction: column; height: auto; }
  .editor-sidebar { width: 100%; min-width: 100%; max-height: none; border-right: none; border-bottom: 1px solid var(--border); }
  .editor-main { min-height: 400px; }
  .vendor-grid { grid-template-columns: 1fr; }
}
