:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --text-color: #ffffff;
  --text-secondary: #9ca3af;
  --bg-color: #111827;
  --card-bg: #1f2937;
  --header-bg: #000000;
  --border-color: #374151;
  --input-bg: #111827;
  --success-color: #059669;

  --shadow: 0 10px 30px rgba(0,0,0,0.25);
  --radius: 12px;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.background-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 70% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 50%),
              radial-gradient(circle at 10% 80%, rgba(5, 150, 105, 0.08) 0%, transparent 40%);
  z-index: -1;
}

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

.navbar {
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.25rem;
}

main {
  padding: 60px 0;
}

.designer-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* Steps Progress */
.steps-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 60px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
}

.step-item {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.step-item.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.step-item.completed {
  background: var(--success-color);
  border-color: var(--success-color);
  color: white;
}

.step-line {
  flex-grow: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 -10px;
  position: relative;
  z-index: 1;
}

/* Step Content */
.step-content {
  padding: 40px 60px;
}

.step-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.step-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 32px;
}

/* Inputs */
.input-group {
  margin-bottom: 24px;
}

.input-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-color);
}

input[type="text"], textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: transparent;
  color: var(--text-color);
}

input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  background: transparent;
  transition: all 0.2s;
}

.dropzone:hover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.dropzone svg {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
}

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

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--text-color);
}

.actions {
  display: flex;
  gap: 16px;
  margin-top: 40px;
}

/* Progress & Logs */
.progress-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-bar {
  height: 100%;
  background: var(--primary-color);
  width: 0%;
  transition: width 0.5s ease;
}

.terminal {
  background: rgba(0,0,0,0.25);
  color: var(--text-secondary);
  padding: 20px;
  border-radius: var(--radius);
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.8125rem;
  height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

/* Playground */
.result-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 40px;
}

.playground-section {
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
}

.test-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.loader-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.test-result {
  margin-top: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
}

.type-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
  margin-left: 8px;
  font-weight: 600;
}

 a {
   color: var(--primary-color);
   text-decoration: none;
 }

 a:hover {
   color: var(--primary-hover);
   text-decoration: underline;
 }

.field-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.italic { font-style: italic; }

.hidden {
  display: none;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-color);
}

code {
  font-family: 'Monaco', 'Consolas', monospace;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}

/* Deployment Success (Step 5) */
.success-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.28) 0%, rgba(37, 99, 235, 0.08) 100%);
  border: 1px solid rgba(5, 150, 105, 0.35);
  margin-bottom: 18px;
}

.check-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 150, 105, 0.18);
  border: 1px solid rgba(5, 150, 105, 0.35);
  color: #34d399;
  font-weight: 800;
  font-size: 18px;
  transform: translateY(0);
  animation: successPop 0.35s ease-out;
}

@keyframes successPop {
  from { transform: scale(0.92); opacity: 0.2; }
  to { transform: scale(1); opacity: 1; }
}

.result-box {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 14px 40px rgba(0,0,0,0.25);
  border-radius: var(--radius);
}

.result-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.result-box p strong {
  color: var(--text-secondary);
  font-weight: 700;
}

.playground-section {
  margin-top: 28px;
  background: rgba(0,0,0,0.14);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
}

.test-status {
  margin-top: 10px;
}

.test-result {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#playground-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.playground-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playground-field label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Worker Playground Inputs */
#playground-form input[type="text"],
#playground-form input[type="number"],
#playground-form textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(55, 65, 81, 0.95);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-color);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.06s;
}

#playground-form textarea {
  resize: vertical;
  min-height: 92px;
}

#playground-form input[type="text"]:focus,
#playground-form input[type="number"]:focus,
#playground-form textarea:focus {
  border-color: rgba(37, 99, 235, 0.95);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

#playground-form input[type="number"]::-webkit-outer-spin-button,
#playground-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#playground-form input[type="number"] {
  -moz-appearance: textfield;
}

#playground-form .type-badge {
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 700px) {
  .steps-progress {
    padding: 22px 24px;
  }
  .step-content {
    padding: 26px 22px;
  }
  .success-header {
    padding: 16px 18px;
  }
}
