:root {
  --primary: #6366f1;
  --secondary: #818cf8;
  --accent: #c084fc;
  --bg: #0a0a1a;
  --surface: #13132b;
  --surface2: #1a1a35;
  --border: #1e1e3f;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
}

* { scrollbar-width: thin; scrollbar-color: #2a2a4a transparent; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a4a; border-radius: 3px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 12px 28px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  padding: 12px 28px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  cursor: pointer;
}

.btn-secondary:hover {
  background: #22224a;
  border-color: var(--primary);
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-icon:hover { background: #22224a; border-color: var(--primary); }
.btn-icon.danger:hover { background: #3b1010; border-color: #ef4444; color: #ef4444; }

.input-field {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  width: 100%;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-field::placeholder { color: var(--text-muted); }

.color-input {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 2px;
  background: transparent;
  transition: all 0.3s ease;
}

.color-input:hover { border-color: var(--primary); transform: scale(1.05); }
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border-radius: 10px; border: none; }

.slide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.slide-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.slide-card.active { border-color: var(--primary); box-shadow: 0 0 40px rgba(99, 102, 241, 0.1); }
.slide-card.dragging { opacity: 0.5; transform: scale(0.95); }

.preview-frame {
  border-radius: 20px;
  border: 2px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 24px;
  z-index: 200;
  animation: slideIn 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.1); }
  50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.2); }
}

.pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

.bg-grid {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.brand-select-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.brand-select-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.brand-select-card.active { border-color: var(--primary); background: rgba(99, 102, 241, 0.05); }

.layout-select {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.layout-option {
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  color: var(--text-muted);
}

.layout-option:hover { border-color: var(--primary); color: var(--text); }
.layout-option.active { border-color: var(--primary); background: rgba(99, 102, 241, 0.1); color: var(--text); }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 20px;
  padding: 48px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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