/* Custom Styling for Apache Kafka Virtual Lab */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Roboto:wght@300;400;500;700;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --kafka-orange: #ff6600;
  --terminal-bg: #0d1117;
  --terminal-header: #161b22;
  --terminal-text: #c9d1d9;
  --terminal-prompt: #58a6ff;
  --terminal-cursor: #388bfd;
  --accent-green: #2ea043;
  --accent-red: #f85149;
  --accent-amber: #d29922;
}

body {
  font-family: 'Roboto', sans-serif;
  scroll-behavior: smooth;
}

.font-mono {
  font-family: 'Fira Code', monospace;
}

/* Material symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Card Glow Effect */
.glow-card {
  box-shadow: 0 0 25px rgba(79, 70, 229, 0.18);
  border: 1px solid rgba(79, 70, 229, 0.35);
  transition: all 0.3s ease;
}

.glow-card:hover {
  box-shadow: 0 0 35px rgba(79, 70, 229, 0.3);
}

.glow-orange {
  box-shadow: 0 0 25px rgba(255, 102, 0, 0.2);
  border: 1px solid rgba(255, 102, 0, 0.4);
}

/* Terminal Styling */
.terminal-window {
  background-color: var(--terminal-bg);
  color: var(--terminal-text);
  font-family: 'Fira Code', monospace;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid #30363d;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background-color: var(--terminal-header);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #30363d;
  user-select: none;
}

.terminal-controls {
  display: flex;
  gap: 0.4rem;
}

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

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-body {
  padding: 1rem;
  overflow-y: auto;
  font-size: 0.825rem;
  line-height: 1.5;
  flex: 1;
  max-height: 380px;
  min-height: 260px;
  scroll-behavior: smooth;
}

.terminal-body::-webkit-scrollbar {
  width: 6px;
}

.terminal-body::-webkit-scrollbar-track {
  background: var(--terminal-bg);
}

.terminal-body::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 3px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: #8b949e;
}

.term-line {
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.term-cmd {
  color: #58a6ff;
}

.term-success {
  color: #3fb950;
}

.term-error {
  color: #f85149;
}

.term-warning {
  color: #d29922;
}

.term-info {
  color: #8b949e;
}

.term-highlight {
  color: #ec6547;
  font-weight: 600;
}

.terminal-prompt-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.terminal-input {
  background: transparent;
  border: none;
  color: #f0f6fc;
  font-family: 'Fira Code', monospace;
  font-size: 0.825rem;
  outline: none;
  flex: 1;
  caret-color: #58a6ff;
}

/* Option Button Styling for Quiz */
.option-btn {
  transition: all 0.25s ease-in-out;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  color: #1e293b;
}

.dark .option-btn {
  border-color: #334155;
  background-color: #1e293b;
  color: #f1f5f9;
}

.option-btn:hover {
  transform: translateY(-2px);
  border-color: #4f46e5;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

.option-btn.selected {
  border-color: #4f46e5;
  background-color: #eef2ff;
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.35);
  font-weight: 600;
}

.dark .option-btn.selected {
  background-color: #312e81;
  border-color: #6366f1;
}

/* Animations */
@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

.animate-pulse-subtle {
  animation: pulse-subtle 3s infinite ease-in-out;
}

@keyframes flow-dash {
  to {
    stroke-dashoffset: -20;
  }
}

.network-wire-active {
  stroke-dasharray: 6;
  animation: flow-dash 1s linear infinite;
}

/* Log entry fade in */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.log-entry-row {
  animation: fadeInSlide 0.3s ease-out forwards;
}

/* Badge styles */
.badge-kraft {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
}

.badge-producer {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
}

.badge-consumer {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: white;
}
