:root {
  --bg-dark: #060408;
  --panel-bg: rgba(14, 10, 20, 0.65);
  --border-color: rgba(245, 158, 11, 0.2);
  --primary: #f59e0b; /* Gold/Amber */
  --secondary: #a855f7; /* Purple */
  --accent-glow: rgba(245, 158, 11, 0.12);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --success: #10b981;
  --error: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Background Glow Effects */
.glow-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(90px);
  opacity: 0.3;
  pointer-events: none;
}
.orb-gold {
  background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
  top: -100px;
  right: -100px;
}
.orb-purple {
  background: radial-gradient(circle, var(--secondary) 0%, rgba(0,0,0,0) 70%);
  bottom: -150px;
  left: -150px;
}

/* Header */
.header {
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: rgba(6, 4, 8, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 6px;
  transform: rotate(45deg);
}

.title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
}
.status-indicator.live {
  box-shadow: 0 0 8px var(--success);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Layout */
.simulator-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  max-width: 1400px;
  width: 90%;
  margin: 2rem auto;
  flex: 1;
}

@media (max-width: 1024px) {
  .simulator-layout {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.checkout-panel {
  display: flex;
  flex-direction: column;
}

.billing-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
}

.badge-payment {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.ledger-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input, .form-group select {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.btn-decline {
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  transition: all 0.3s ease;
  text-align: center;
}

.btn-decline:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-decline:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.4;
}

.btn-reset {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-reset:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

/* Right Panel: Webhook Execution */
.terminal-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Pipeline Node Section */
.pipeline-section {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(16px);
}

.pipeline-section h4 {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

.nodes-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all 0.3s;
  padding: 6px;
  border-radius: 8px;
}

.node-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: all 0.5s ease;
}

.node-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.node-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: all 0.3s;
}

/* Node Animations */
.node-wrapper.active .node-icon {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary);
  transform: scale(1.1);
}

.node-wrapper.active .node-name {
  color: white;
}

.node-wrapper.done .node-icon {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
  box-shadow: 0 0 15px var(--success);
}

.node-arrow.active {
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
  animation: arrow-glow 0.8s alternate infinite;
}

@keyframes arrow-glow {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Tabs */
.outputs-section {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.tab-headers {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 1rem 1.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: white;
  border-bottom-color: var(--primary);
  background: rgba(245, 158, 11, 0.05);
}

.tab-contents {
  flex: 1;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  min-height: 380px;
}

.tab-content {
  display: none;
  height: 100%;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Terminal View Output */
.terminal-view {
  background: #050406;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Fira Code', monospace;
}

.terminal-header {
  background: #110f14;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.term-dot.red { background-color: var(--error); }
.term-dot.yellow { background-color: var(--primary); }
.term-dot.green { background-color: var(--success); }

.term-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 1rem;
  overflow-y: auto;
  font-size: 0.85rem;
  flex: 1;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-line {
  color: #fef08a;
}
.log-line.system {
  color: #c084fc;
}
.log-line.webhook {
  color: #fed7aa;
}
.log-line.success {
  color: var(--success);
}
.log-line.error {
  color: var(--error);
}

/* Testimonial card dynamic graphic mockup */
.quote-card-mockup {
  width: 320px;
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #170f20 0%, #070508 100%);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.quote-card-mockup::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 8rem;
  color: rgba(245, 158, 11, 0.06);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
}

.quote-stars {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.quote-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
  font-style: italic;
  flex: 1;
  margin-bottom: 1rem;
  overflow-y: auto;
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 10px;
}

.quote-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
}

.quote-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
}

.quote-verified {
  font-size: 0.65rem;
  color: var(--success);
}

.gmail-empty-state {
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  border: 1px dashed rgba(255,255,255,0.08);
  background: transparent;
}

@keyframes pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
