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

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-card: rgba(22, 30, 49, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --accent-color: #6366f1; /* Indigo */
  --accent-glow: rgba(99, 102, 241, 0.15);
  --success-color: #10b981; /* Emerald */
  --warning-color: #f59e0b; /* Amber */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(19, 27, 46, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) var(--bg-secondary);
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

header {
  border-bottom: var(--glass-border);
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header h1 span {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(99, 102, 241, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.main-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1200px) {
  .main-container {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.25);
}

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

.card-title svg {
  color: var(--accent-color);
}

/* Topology Viewer Style */
.topology-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.topology-wrapper {
  background: rgba(7, 10, 18, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  min-height: 400px;
}

/* Interactive SVG Styling */
.topo-svg {
  width: 100%;
  height: auto;
  max-height: 500px;
}

.topo-node {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.topo-node:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 8px var(--accent-color));
}

.topo-link {
  stroke-dasharray: 4, 4;
  animation: linkPulse 20s linear infinite;
  transition: stroke 0.3s, stroke-width 0.3s;
}

.topo-link:hover {
  stroke-width: 3px !important;
  stroke: var(--accent-color) !important;
  cursor: pointer;
}

.topo-label {
  font-size: 10px;
  font-family: var(--font-sans);
  fill: var(--text-secondary);
  pointer-events: none;
  font-weight: 500;
}

.node-active {
  filter: drop-shadow(0 0 12px var(--accent-color));
}

@keyframes linkPulse {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* Steps and tabs styling */
.tab-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.3);
}

.tab-btn.active {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.guide-step-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.guide-step-content.active {
  display: block;
}

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

/* CLI block / Config generator */
.cli-selector-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.select-dropdown {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  outline: none;
  flex: 1;
}

.cli-container {
  background: #050811;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

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

.cli-dot-group {
  display: flex;
  gap: 0.4rem;
}

.cli-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.cli-dot.red { background: #ef4444; }
.cli-dot.yellow { background: #eab308; }
.cli-dot.green { background: #22c55e; }

.cli-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cli-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
}

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

.cli-body {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e2e8f0;
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.5;
}

.cli-body code {
  white-space: pre-wrap;
  word-break: break-all;
}

.cli-comment {
  color: #64748b;
  font-style: italic;
}

.cli-command {
  color: #38bdf8;
  font-weight: 500;
}

.cli-prompt {
  color: #f43f5e;
  user-select: none;
}

/* Info banner alert */
.banner {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #c7d2fe;
  font-size: 0.9rem;
}

.banner svg {
  flex-shrink: 0;
  color: var(--accent-color);
  margin-top: 0.15rem;
}

/* Verification list */
.verify-list {
  list-style: none;
  margin-top: 1rem;
}

.verify-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.verify-item input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--success-color);
  cursor: pointer;
}

.verify-text {
  font-size: 0.9rem;
}

.verify-text strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.15rem;
}

.verify-text span {
  color: var(--text-secondary);
}

/* Quiz Styling */
.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.quiz-question {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  text-align: left;
  color: var(--text-secondary);
}

.quiz-option:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--text-primary);
}

.quiz-option.selected {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
}

.quiz-option.correct {
  border-color: var(--success-color) !important;
  background: rgba(16, 185, 129, 0.1) !important;
  color: #a7f3d0 !important;
}

.quiz-option.incorrect {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  color: #fca5a5 !important;
}

.quiz-feedback {
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: none;
}

.quiz-feedback.show {
  display: block;
}

.quiz-feedback.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

.quiz-feedback.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.quiz-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.quiz-btn {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.quiz-btn:hover {
  opacity: 0.9;
}

.quiz-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.quiz-progress {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Device Info Panel */
.device-detail-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  display: none;
}

.device-detail-panel.active {
  display: block;
}

.device-detail-header {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.device-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.device-detail-table th, .device-detail-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.device-detail-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.device-detail-table td {
  color: var(--text-secondary);
}

.device-detail-table td strong {
  color: var(--text-primary);
}

/* IP Addressing Verification Tool */
.verifier-tool {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.verifier-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.verifier-input-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.verifier-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem;
  border-radius: 8px;
  outline: none;
  font-family: var(--font-sans);
}

.verifier-textbox {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem;
  border-radius: 8px;
  outline: none;
  font-family: var(--font-mono);
}

.verifier-textbox:focus {
  border-color: var(--accent-color);
}

.verifier-results {
  background: rgba(7, 10, 18, 0.5);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.85rem;
  min-height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
