:root {
  --bg-dark: #0b0f19;
  --panel-bg: rgba(17, 24, 39, 0.6);
  --border-color: rgba(99, 102, 241, 0.2);
  --primary: #6366f1; /* Indigo */
  --secondary: #a855f7; /* Violet/Purple */
  --accent-glow: rgba(99, 102, 241, 0.15);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --payment-blue: #635bff;
  --success: #10b981;
  --warning: #f59e0b;
}

* {
  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(80px);
  opacity: 0.4;
  pointer-events: none;
}
.orb-purple {
  background: radial-gradient(circle, var(--secondary) 0%, rgba(0,0,0,0) 70%);
  top: -100px;
  right: -100px;
}
.orb-blue {
  background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
  bottom: -150px;
  left: -150px;
}

/* Header styling */
.header {
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.7);
  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); }
}

/* Simulator Grid 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;
  }
}

/* Common Card Styling */
.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.2);
}

/* Left Panel: Checkout Form */
.checkout-panel {
  display: flex;
  flex-direction: column;
}

.checkout-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 {
  background-color: var(--payment-blue);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.invoice-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.invoice-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.invoice-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}

.checkout-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 {
  background: rgba(0, 0, 0, 0.2);
  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 {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* Card Details Mock */
.card-details-mock {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mock-card-row {
  display: flex;
  justify-content: space-between;
  font-family: 'Fira Code', monospace;
}

.mock-card-sub {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-pay {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.btn-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.btn-pay:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.5;
}

.btn-reset {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  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;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Right Panel: Pipeline & Tab Outputs */
.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.2);
  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: 10px;
  border-radius: 8px;
}

.node-icon {
  width: 50px;
  height: 50px;
  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.5rem;
  transition: all 0.5s ease;
}

.node-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.node-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: all 0.3s;
}

/* Active Pipeline Animations */
.node-wrapper.active .node-icon {
  background: rgba(99, 102, 241, 0.1);
  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; }
}

/* Tab Outputs Panel */
.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.3);
  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(--secondary);
  background: rgba(168, 85, 247, 0.05);
}

.tab-contents {
  flex: 1;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.1);
  min-height: 350px;
}

.tab-content {
  display: none;
  height: 100%;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Terminal View Output */
.terminal-view {
  background: #05070c;
  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: #111520;
  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: #ef4444; }
.term-dot.yellow { background-color: #f59e0b; }
.term-dot.green { background-color: #10b981; }

.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: 300px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-line {
  color: #a7f3d0; /* Soft mint green */
}
.log-line.system {
  color: #a5b4fc; /* Soft indigo */
}
.log-line.webhook {
  color: #f472b6; /* Soft pink */
}
.log-line.success {
  color: var(--success);
}
.log-line.error {
  color: #f87171;
}

/* Google Drive Mock Tab */
.drive-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drive-breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  padding: 8px 12px;
  border-radius: 6px;
}

.drive-folder-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drive-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  transition: all 0.3s;
}

.drive-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

.drive-item-icon {
  font-size: 1.25rem;
}

.drive-item-details {
  display: flex;
  flex-direction: column;
}

.drive-item-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.drive-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drive-item-link {
  margin-left: auto;
  color: var(--primary);
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
}
.drive-item-link:hover {
  text-decoration: underline;
}

.drive-item.empty-state, .trello-empty-state, .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.1);
  background: transparent;
}

/* Trello Mock Tab */
.trello-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trello-board-header {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.trello-lists-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .trello-lists-container {
    grid-template-columns: 1fr;
  }
}

.trello-list {
  background: #111520;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trello-list-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.trello-cards-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trello-card {
  background: #1c2333;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 10px 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.3s;
}
.trello-card:hover {
  border-color: var(--secondary);
}

.trello-card .card-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.trello-card .card-due {
  font-size: 0.75rem;
  color: var(--warning);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.checklist-title {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 4px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
}

/* Gmail View Tab */
.gmail-view {
  background: #ffffff;
  color: #1f2937;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.gmail-header-row {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem;
  background-color: #f9fafb;
  display: flex;
  gap: 8px;
}

.gmail-label {
  font-weight: 600;
  color: #4b5563;
  min-width: 60px;
}

.gmail-val {
  color: #111827;
}

.gmail-body-container {
  padding: 2rem 1.50rem;
  background-color: #ffffff;
  min-height: 250px;
  overflow-y: auto;
}

.gmail-body-container .drive-link-btn {
  display: inline-block;
  background-color: var(--primary);
  color: white !important;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 700;
  margin: 15px 0;
  font-size: 0.9rem;
  text-align: center;
}
.gmail-body-container .drive-link-btn:hover {
  background-color: #4f46e5;
}
