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

:root {
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --primary-color: #38bdf8;
  --secondary-color: #818cf8;
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.1);
  --glow-color: rgba(56, 189, 248, 0.2);

  /* Status colors */
  --status-klaar: #4ade80;
  /* Green */
  --status-beta: #38bdf8;
  /* Blue */
  --status-experimenteel: #fbbf24;
  /* Amber */
  --status-alfa: #c084fc;
  /* Purple */
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  background-image:
    radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(129, 140, 248, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.15) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(129, 140, 248, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  text-align: center;
  padding: 2.5rem 1rem 1.25rem;
  width: 100%;
  max-width: 1200px;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.2rem;
  color: #94a3b8;
  font-weight: 300;
}

.view-toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.disclaimer {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 1rem 2rem;
  margin: 0.5rem auto 2rem;
  max-width: 700px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.disclaimer strong {
  color: var(--primary-color);
}

/* === External links section (blog & cursussen) === */

.external-links {
  width: 100%;
  max-width: 1100px;
  padding: 0 2rem;
  margin: 0 auto 2.5rem;
}

.external-links-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--secondary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(129, 140, 248, 0.2);
  font-weight: 600;
  text-align: left;
}

.external-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.ext-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.ext-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  opacity: 0.6;
  transition: opacity 0.25s ease;
}

.ext-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 30px -10px var(--glow-color);
}

.ext-card:hover::before {
  opacity: 1;
}

.ext-card--blog::before {
  background: linear-gradient(180deg, #fbbf24, #f97316);
}

.ext-card--blog:hover {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 10px 30px -10px rgba(251, 191, 36, 0.25);
}

.ext-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.ext-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ext-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.15rem;
}

.ext-card-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.35;
}

.ext-card-url {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tools-section-heading-wrapper {
  width: 100%;
  max-width: 1100px;
  padding: 0 2rem;
  margin: 0 auto 1rem;
}

@media (max-width: 600px) {
  .tools-section-heading-wrapper {
    padding: 0 1rem;
  }
}

.toggle-btn {
  background: transparent;
  border: 1px dashed var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  opacity: 0.8;
}

.toggle-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 4px 12px var(--glow-color);
  opacity: 1;
}

.toggle-btn.active {
  background: var(--primary-color);
  color: #0f172a;
  border-style: solid;
  opacity: 1;
}

.filter-container {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1100px;
  width: 100%;
  padding: 0 2rem;
  margin-bottom: 1rem;
}

.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.filter-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--primary-color);
  box-shadow: 0 4px 12px var(--glow-color);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--primary-color);
  color: #0f172a;
  border-color: var(--primary-color);
  font-weight: 600;
  box-shadow: 0 4px 12px var(--glow-color);
}

main {
  width: 100%;
  max-width: 1100px;
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px var(--glow-color);
  border-color: rgba(56, 189, 248, 0.4);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #f1f5f9;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.status-klaar {
  background: rgba(74, 222, 128, 0.2);
  color: var(--status-klaar);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-beta {
  background: rgba(56, 189, 248, 0.2);
  color: var(--status-beta);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-experimenteel {
  background: rgba(251, 191, 36, 0.2);
  color: var(--status-experimenteel);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-alfa {
  background: rgba(192, 132, 252, 0.2);
  color: var(--status-alfa);
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: #64748b;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 50%;
}

.fav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fbbf24;
}

.fav-btn.active {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.fav-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.card-desc {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.card:hover .tag {
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
  border-color: rgba(56, 189, 248, 0.2);
}

/* === Grouped list layout === */

.category-section {
  width: 100%;
  margin-bottom: 1.75rem;
}

.category-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  font-weight: 600;
}

.tool-item {
  display: block;
  padding: 0.6rem 1rem 0.6rem 1.25rem;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.tool-item:last-child {
  border-bottom: none;
}

.tool-item:hover {
  border-left-color: var(--primary-color);
  background: rgba(56, 189, 248, 0.04);
  padding-left: 1.5rem;
}

.tool-item--alfa {
  border-left: 3px dashed var(--status-alfa);
  opacity: 0.55;
}

.tool-item--alfa:hover {
  border-left-color: var(--status-alfa);
  opacity: 0.9;
  background: rgba(192, 132, 252, 0.04);
}

.tool-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.tool-item-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.1rem;
  line-height: 1.4;
}

.tool-item-meta {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  margin-top: 0.2rem;
}

.tool-item-tag {
  font-size: 0.7rem;
  color: #475569;
  letter-spacing: 0.02em;
}

.tool-item-tag-sep {
  font-size: 0.55rem;
  color: #334155;
  margin: 0 0.2rem;
}

.alfa-badge {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--status-alfa);
  border: 1px dashed rgba(192, 132, 252, 0.4);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.tool-item .fav-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.tool-item .fav-btn svg {
  width: 16px;
  height: 16px;
}

.empty-msg {
  text-align: center;
  color: #64748b;
  padding: 2rem;
  width: 100%;
}

footer {
  margin-top: auto;
  padding: 3rem 2rem;
  color: #64748b;
  font-size: 0.9rem;
  text-align: center;
  border-top: 1px solid var(--card-border);
  width: 100%;
  max-width: 1100px;
}

.footer-disclaimer {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  font-size: 0.8rem;
  line-height: 1.6;
  opacity: 0.7;
  font-weight: 300;
  font-style: italic;
}

.tool-content-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.markdown-body {
  color: var(--text-color);
  line-height: 1.6;
  font-size: 1.05rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.markdown-body h1 {
  font-size: 2rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.5rem;
}

.markdown-body h2 {
  font-size: 1.5rem;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol {
  margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5rem;
}

.markdown-body li {
  margin-bottom: 0.25rem;
}

.markdown-body code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
  color: var(--secondary-color);
}

.markdown-body pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--card-border);
  margin-bottom: 1rem;
}

.markdown-body pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

.markdown-body a {
  color: var(--primary-color);
  text-decoration: none;
}

.markdown-body a:hover {
  text-decoration: underline;
}

.markdown-body blockquote {
  border-left: 4px solid var(--secondary-color);
  padding-left: 1rem;
  color: #cbd5e1;
  background: rgba(129, 140, 248, 0.1);
  margin: 0 0 1rem 0;
  padding: 0.5rem 1rem;
  border-radius: 0 8px 8px 0;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 600px) {
  h1 {
    font-size: 2.25rem;
  }

  main {
    padding: 0.75rem 1rem;
  }

  .tool-item {
    padding: 0.5rem 0.75rem 0.5rem 1rem;
  }

  .card {
    padding: 1.25rem 1.5rem;
  }

  .external-links {
    padding: 0 1rem;
  }

  .ext-card {
    padding: 0.85rem 1rem;
  }

  .ext-card-icon {
    font-size: 1.6rem;
  }
}