.back-link {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-right: 1rem;
  text-decoration: none;
}
.back-link:hover { color: var(--accent-light); }

.cert-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  overflow-x: auto;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cert-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.cert-tab .pct {
  color: var(--accent-light);
  font-weight: 600;
  margin-left: 0.3rem;
}

.cert-tab:hover,
.cert-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.cert-tab.active .pct { color: white; }

/* Board */
.certs-board {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.domain-section {
  margin-bottom: 2.5rem;
}

.domain-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.questions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* Question card */
.q-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.q-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.q-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.q-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.q-tag {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-weight: 500;
}

.q-card-body {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.q-card.expanded .q-card-body {
  max-height: 2000px;
}

.q-card-body h1,
.q-card-body h2,
.q-card-body h3 {
  font-size: 0.85rem;
  color: var(--warning);
  margin-top: 0.7rem;
  margin-bottom: 0.3rem;
}

.q-card-body p {
  margin-bottom: 0.4rem;
}

.q-card-body code {
  background: rgba(0,0,0,0.3);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

.q-card-body strong { color: var(--text-primary); }

.q-card-toggle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: block;
}

/* Add question textarea */
#questionContent {
  width: 100%;
  min-height: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 1rem;
  font-size: 0.85rem;
  font-family: 'Fira Code', monospace, inherit;
  resize: vertical;
}

#questionContent:focus {
  outline: none;
  border-color: var(--accent);
}

/* Import button */
.header-import-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.header-import-btn:hover {
  border-color: var(--info);
  color: var(--info);
}

#importContent {
  width: 100%;
  min-height: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 1rem;
  font-size: 0.8rem;
  font-family: 'Fira Code', monospace, inherit;
  resize: vertical;
}

#importContent:focus {
  outline: none;
  border-color: var(--accent);
}

/* Import result */
.import-result-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.import-result-item:last-child { border-bottom: none; }

.import-result-item .domain-name { color: var(--text-primary); }
.import-result-item .domain-count { color: var(--accent-light); font-weight: 600; }

.import-result-total {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--border);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-light);
  text-align: right;
}

/* Stats cards */
.stats-cards {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 2rem;
  overflow-x: auto;
  flex-shrink: 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1.2rem;
  min-width: 140px;
  text-align: center;
  flex-shrink: 0;
}

.stat-card.total {
  border-color: var(--accent);
  background: rgba(15, 157, 88, 0.08);
}

.stat-card-count {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-card.total .stat-card-count {
  color: var(--accent-light);
}

.stat-card-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Export button */
.header-export-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.header-export-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}
