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

:root {
  --bg-primary: #030303;
  --bg-secondary: #09090b;
  --bg-card: rgba(15, 15, 22, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(168, 85, 247, 0.3);
  
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  
  --primary: #a855f7;
  --primary-glow: rgba(168, 85, 247, 0.15);
  --secondary: #06b6d4;
  --secondary-glow: rgba(6, 182, 212, 0.15);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.15);
  
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(168, 85, 247, 0.2);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(168, 85, 247, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.005) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.005) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 2rem;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.logo-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: white;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, #d8b4fe, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover, .nav-btn.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  border-bottom: 2px solid var(--primary);
  border-radius: 0.375rem 0.375rem 0 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.balance-badge {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #c084fc;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--success);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

/* Main Workspace */
main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 2.5rem 1rem 3.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero-tagline {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: 1rem;
  display: inline-block;
  background: rgba(168, 85, 247, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(168, 85, 247, 0.15);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 40%, #e9d5ff 70%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.stat-item {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 0.75rem;
  transition: var(--transition);
}

.stat-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-val {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(to right, #fff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Glass Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Tabs: Studio (Generator) */
.studio-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.studio-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

select, input[type="text"], input[type="number"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

select:focus, input[type="text"]:focus, input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.range-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
}

.range-val {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  min-width: 3rem;
  text-align: center;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.25rem;
}

.checkbox-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 1.85rem;
  margin-top: -0.5rem;
  display: block;
}

/* Custom Buttons */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.9rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
  background: linear-gradient(135deg, #b55fe6, #9066f7);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Studio Workspace (Console + Results) */
.studio-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Simulated Console Terminal */
.console-wrapper {
  background: #020205;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.console-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.console-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.console-dots {
  display: flex;
  gap: 0.35rem;
}

.console-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.console-body {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #10b981; /* terminal green */
  height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  line-height: 1.4;
}

.console-line {
  opacity: 0.9;
}

.console-line.info { color: var(--text-secondary); }
.console-line.success { color: var(--success); }
.console-line.warning { color: var(--warning); }
.console-line.error { color: var(--danger); }
.console-line.command { color: var(--secondary); }

/* Table Preview Section */
.preview-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.preview-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.preview-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  flex: 1;
  max-height: 380px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-align: left;
}

th {
  background: rgba(9, 9, 11, 0.9);
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  white-space: nowrap;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  color: var(--text-muted);
  padding: 4rem;
}

.preview-placeholder svg {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
  color: var(--primary);
}

.preview-placeholder p {
  max-width: 320px;
  font-size: 0.9rem;
}

/* Marketplace Tab */
.marketplace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.search-filter-container {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 600px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-input-wrapper input {
  padding-left: 2.5rem;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: var(--text-muted);
}

.category-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.category-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.category-tag:hover, .category-tag.active {
  background: rgba(168, 85, 247, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.dataset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.5rem;
}

.dataset-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.dataset-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.dataset-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--secondary);
  letter-spacing: 0.05em;
}

.quality-stamp {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dataset-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.dataset-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.dataset-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  margin-bottom: 1.25rem;
}

.meta-box {
  text-align: center;
}

.meta-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.meta-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.dataset-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-container {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.price-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.price-val span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* AI Trainer Lab Tab */
.trainer-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.trainer-card {
  padding: 1.5rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.metric-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
}

.metric-val {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--secondary);
  font-family: var(--font-mono);
  margin-bottom: 0.15rem;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.chart-simulation-box {
  height: 180px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0.5rem;
  margin-top: 1.5rem;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-title {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.chart-y-axis {
  position: absolute;
  top: 2rem;
  right: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: calc(100% - 20px);
  gap: 8px;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, var(--primary), var(--secondary));
  border-radius: 3px 3px 0 0;
  min-height: 5px;
  position: relative;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.chart-bar::after {
  content: attr(data-label);
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.trainer-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.code-wrapper {
  background: #020205;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.code-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.code-body {
  padding: 1.25rem;
  overflow-x: auto;
}

pre {
  margin: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.6;
}

/* Syntax Highlighting (for Python block) */
.code-keyword { color: #f472b6; }
.code-string { color: #34d399; }
.code-comment { color: #64748b; }
.code-number { color: #fb923c; }
.code-builtin { color: #38bdf8; }

/* Pipeline Visualizer Tab */
.pipeline-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 2rem;
  align-items: center;
}

.pipeline-intro {
  text-align: center;
  max-width: 600px;
}

.pipeline-intro h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.pipeline-intro p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  position: relative;
  padding: 2rem 0;
}

.pipeline-node {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  width: 200px;
  text-align: center;
  position: relative;
  transition: var(--transition);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.pipeline-node:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.pipeline-node.active {
  border-color: var(--primary);
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.node-icon-wrapper {
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: var(--primary);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.pipeline-node:hover .node-icon-wrapper {
  background: rgba(168, 85, 247, 0.15);
  color: var(--primary);
  border-color: rgba(168, 85, 247, 0.3);
}

.node-icon-wrapper svg {
  width: 1.5rem;
  height: 1.5rem;
}

.node-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.node-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pipeline-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 20px;
}

.connector-line {
  height: 2px;
  background: var(--border-color);
  width: 100%;
  position: absolute;
}

.pipeline-node.active + .pipeline-connector .connector-line {
  background: linear-gradient(to right, var(--primary), var(--secondary));
}

.connector-arrow {
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
  transform: rotate(45deg);
  position: absolute;
  right: 2px;
}

.pipeline-node.active + .pipeline-connector .connector-arrow {
  border-color: var(--secondary);
}

.pipeline-detail-card {
  max-width: 700px;
  width: 100%;
}

.detail-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-step-item {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
}

.step-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

.step-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.step-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Modal Dialgos */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  max-width: 600px;
  width: 90%;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
}

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

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px var(--success); }
  50% { transform: scale(1.2); opacity: 0.6; box-shadow: 0 0 16px var(--success); }
  100% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px var(--success); }
}

.pulse-anim {
  animation: pulse 2s infinite;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1100;
}

.toast {
  background: #0c0a0f;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  min-width: 280px;
  animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toast.success { border-left-color: var(--success); }
.toast.info { border-left-color: var(--secondary); }
.toast.warning { border-left-color: var(--warning); }
.toast.error { border-left-color: var(--danger); }

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustements */
@media (max-width: 1024px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .trainer-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .dataset-grid {
    grid-template-columns: 1fr;
  }
  .pipeline-flow {
    flex-direction: column;
  }
  .pipeline-connector {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }
}
