/* Custom styles for AutomataLab */

:root {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --border-color: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Glassmorphism cards */
.glass-panel {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.canvas-container {
  position: relative;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
}

/* Control buttons */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
  background: #334155;
  color: #f8fafc;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: 1px solid #475569;
}
.btn-secondary:hover {
  background: #475569;
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-success:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.tab-btn {
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #94a3b8;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}
.tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}
.tab-btn:hover:not(.active) {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
}

/* Badge styling */
.badge-accept {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-reject {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-state {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-family: monospace;
  font-weight: 600;
}

/* String char ticker */
.char-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.1rem;
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  transition: all 0.2s ease;
}
.char-pill.active {
  background: #f59e0b;
  color: #0f172a;
  border-color: #fef08a;
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}
.char-pill.passed {
  background: #334155;
  color: #cbd5e1;
}

/* Minimization table */
.partition-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}
.partition-table th, .partition-table td {
  padding: 0.6rem 0.8rem;
  border: 1px solid #334155;
  text-align: left;
  font-size: 0.88rem;
}
.partition-table th {
  background: #1e293b;
  color: #38bdf8;
  font-weight: 600;
}
.partition-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}
