@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Inter:wght@400;500;600;700&display=swap');

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #020617;
  color: white;
  min-height: 100vh;
  overflow-y: auto;
}

.hidden {
  display: none !important;
}

.main-panel {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.7s ease;
  background: #0f172a;
}

.main-panel.step-1 {
  background: #0f172a;
}

.main-panel.step-2 {
  background: #1e1b4b;
}

.main-panel.step-3 {
  background: #064e3b;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Stepper */
.stepper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 32px 20px 20px;
  flex-wrap: wrap;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.stepper-item.active {
  opacity: 1;
}

.stepper-circle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
}

.stepper-item.active .stepper-circle {
  background: #3b82f6;
}

.stepper-item.step-2-active .stepper-circle {
  background: #6366f1;
}

.stepper-item.step-3-active .stepper-circle {
  background: #10b981;
}

.stepper-label {
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 600px) {
  .stepper-label {
    display: none;
  }
  .stepper-line {
    width: 32px !important;
  }
}

.stepper-line {
  width: 64px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.stepper-line.active {
  background: rgba(255, 255, 255, 0.5);
}

/* Step Content */
.step-content {
  animation: slideUp 0.5s ease forwards;
}

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.title span {
  color: #60a5fa;
}

.subtitle {
  font-size: 18px;
  color: #94a3b8;
}

@media (max-width: 600px) {
  .title {
    font-size: 32px;
  }
  .subtitle {
    font-size: 16px;
  }
}

/* Editor */
.editor-container {
  margin-bottom: 24px;
}

.editor {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #1e293b;
  background: #020617;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.window-dot.red { background: #f87171; }
.window-dot.yellow { background: #fbbf24; }
.window-dot.green { background: #4ade80; }

.file-tab {
  font-size: 13px;
  color: #64748b;
  background: #1e293b;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}

textarea {
  width: 100%;
  min-height: 400px;
  padding: 24px;
  background: transparent;
  border: none;
  color: #34d399;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  line-height: 1.6;
  resize: none;
  outline: none;
}

textarea::placeholder {
  color: #475569;
}

/* Deploy Button */
.deploy-btn {
  width: 100%;
  padding: 18px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 40px -10px rgba(37, 99, 235, 0.5);
  transition: all 0.3s ease;
}

.deploy-btn:hover {
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 0 60px -15px rgba(37, 99, 235, 0.7);
}

/* Generating */
.generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  position: relative;
}

.spinner-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(99, 102, 241, 0.3);
}

.spinner-icon {
  font-size: 32px;
  color: #a5b4fc;
  animation: spin 1s linear infinite;
}

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

.generating h2 {
  font-size: 36px;
  margin-top: 32px;
  margin-bottom: 16px;
}

.loading-message {
  font-size: 18px;
  color: #a5b4fc;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.progress-bar {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: #1e1b4b;
  border-radius: 99px;
  margin-top: 24px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #818cf8;
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* Success */
.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.success-header {
  margin-bottom: 24px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 2px solid rgba(16, 185, 129, 0.3);
}

.success-icon i {
  font-size: 28px;
  color: #6ee7b7;
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.success h2 {
  font-size: 36px;
  font-weight: 700;
}

/* URL Container */
.url-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 500px;
  background: #064e3b;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-bottom: 20px;
}

.url-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 8px 12px;
  background: transparent;
}

.url-bar i {
  color: #34d399;
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ecfdf5;
  font-size: 14px;
  outline: none;
  font-weight: 500;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: #10b981;
}

.copy-btn.copied {
  background: #34d399;
  color: #064e3b;
}

/* Share Section */
.share-section {
  margin-bottom: 20px;
}

.share-label {
  font-size: 14px;
  color: #a7f3d0;
  margin-bottom: 12px;
}

.share-buttons {
  display: flex;
  gap: 12px;
}

.share-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: white;
}

.share-btn:hover {
  transform: translateY(-3px);
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.twitter:hover { background: #0d8bd9; }

.share-btn.facebook { background: #4267b2; }
.share-btn.facebook:hover { background: #365899; }

.share-btn.linkedin { background: #0077b5; }
.share-btn.linkedin:hover { background: #005885; }

.share-btn.whatsapp { background: #25d366; }
.share-btn.whatsapp:hover { background: #128c7e; }

.share-btn.telegram { background: #0088cc; }
.share-btn.telegram:hover { background: #006699; }

.share-btn.reddit { background: #ff4500; }
.share-btn.reddit:hover { background: #cc3700; }

/* Edit Button */
.edit-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.1);
  color: #d1fae5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.edit-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* Browser Mockup */
.browser-mockup {
  width: 100%;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.browser-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.browser-dots {
  position: absolute;
  left: 16px;
  display: flex;
  gap: 6px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.browser-dot.red { background: #f87171; border: 1px solid #ef4444; }
.browser-dot.yellow { background: #fbbf24; border: 1px solid #f59e0b; }
.browser-dot.green { background: #4ade80; border: 1px solid #22c55e; }

.browser-url-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  color: #64748b;
  border: 1px solid #e2e8f0;
  max-width: 400px;
  width: 100%;
  font-weight: 500;
}

.browser-url-bar i {
  color: #94a3b8;
}

.browser-frame {
  height: 400px;
  background: white;
}

.browser-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Error */
.error {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  display: none;
}

.error.show {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .content-wrapper {
    padding: 16px;
  }
  
  .title {
    font-size: 28px;
  }
  
  .subtitle {
    font-size: 15px;
  }
  
  textarea {
    min-height: 250px;
    padding: 16px;
    font-size: 13px;
  }
  
  .deploy-btn {
    padding: 14px;
    font-size: 15px;
  }
  
  .generating h2, .success h2 {
    font-size: 28px;
  }
  
  .browser-frame {
    height: 300px;
  }
  
  .share-buttons {
    gap: 8px;
  }
  
  .share-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 24px;
  }
  
  .stepper {
    padding: 20px 12px 12px;
  }
  
  .stepper-circle {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .stepper-line {
    width: 24px;
  }
  
  textarea {
    min-height: 200px;
  }
  
  .browser-mockup {
    border-radius: 8px;
  }
  
  .browser-header {
    padding: 10px 12px;
  }
  
  .browser-dot {
    width: 8px;
    height: 8px;
  }
  
  .browser-url-bar {
    padding: 4px 10px;
    font-size: 11px;
  }
  
  .browser-frame {
    height: 250px;
  }
}

/* Confetti */
.confetti {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 10px;
  animation: confetti-fall 3s ease-out forwards;
  z-index: 9999;
  pointer-events: none;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg);
  }
}
