:root {
  /* Light mode (default) */
  --primary-color: #6200ee;
  --primary-light: #9c4dff;
  --primary-dark: #0400ba;
  --secondary-color: #03dac6;
  --text-on-primary: #ffffff;
  --text-primary: rgba(0, 0, 0, 0.87);
  --text-secondary: rgba(0, 0, 0, 0.6);
  --background: #f5f5f5;
  --card-background: #ffffff;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --divider: rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark mode */
    --primary-color: #bb86fc;
    --primary-light: #efdcff;
    --primary-dark: #8858c8;
    --secondary-color: #03dac6;
    --text-on-primary: #000000;
    --text-primary: rgba(255, 255, 255, 0.87);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --background: #121212;
    --card-background: #1e1e1e;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --divider: rgba(255, 255, 255, 0.12);
  }
}

/* Dark class for manual theme toggle */
body.dark-theme {
  --primary-color: #bb86fc;
  --primary-light: #efdcff;
  --primary-dark: #8858c8;
  --secondary-color: #03dac6;
  --text-on-primary: #000000;
  --text-primary: rgba(255, 255, 255, 0.87);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --background: #121212;
  --card-background: #1e1e1e;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --divider: rgba(255, 255, 255, 0.12);
}

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

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header Styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--divider);
}

h1 {
  color: var(--primary-color);
  font-weight: 500;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Dit is de originele animal-selector die we nu gaan verbergen */
.animal-selector-horizontal {
  display: none; /* Verbergen op alle schermformaten */
  background: var(--card-background);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

/* Mobile menu wordt overal gebruikt */
.mobile-menu-toggle {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 24px;
  cursor: pointer;
  display: block;
}

.mobile-menu-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.menu-text {
  font-weight: 500;
  color: var(--primary-color);
  cursor: pointer;
}

.animal-selector {
  display: none;
  position: absolute;
  flex-direction: column;
  background: var(--card-background);
  top: 80px;
  right: 10px;
  width: 250px;
  z-index: 1000;
  box-shadow: var(--card-shadow);
  border-radius: 8px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.animal-selector.show {
  display: flex;
  max-height: 500px;
}

.animal-selector button {
  background: none;
  border: none;
  padding: 0.8rem 1rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-primary);
  transition: background-color 0.3s;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--divider);
}

.animal-selector button:last-child {
  border-bottom: none;
}

.animal-selector button.active {
  background-color: var(--primary-color);
  color: white;
}

#theme-toggle {
  background-color: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 24px;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

#theme-toggle:hover {
  background-color: rgba(128, 128, 128, 0.1);
}

/* Card Styles */
.fact-card, .cat-fact {
  margin-bottom: 2rem;
}

/* Verwijder onderlijning van alle links in de site */
a {
  text-decoration: none;
}

/* Specifieke stijl voor kaart-links */
.card-link, 
.card-link:hover, 
.card-link:visited, 
.card-link:active, 
.card-link:focus {
  text-decoration: none !important;
  display: block;
  color: inherit;
  cursor: pointer;
  border-bottom: none;
  outline: none;
}

.card {
  background-color: var(--card-background);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 1.5rem;
}

.card h2 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.card p {
  color: var(--text-secondary);
}

/* Footer Styles */
footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--divider);
  color: var(--text-secondary);
}

footer .material-icons {
  color: #f44336;
  font-size: 16px;
  vertical-align: middle;
}

/* Responsive Design */
@media (min-width: 768px) {
  main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  main {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile menu styles */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  h1 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
  }
  
  .header-controls {
    width: 100%;
    justify-content: space-between;
  }
  
  .fact-card {
    margin-bottom: 1.5rem;
  }
  
  .card img {
    height: 200px;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .card h2 {
    font-size: 1.2rem;
  }
  
  /* Ensure proper spacing in detail pages */
  .detail-content {
    padding: 1.5rem;
  }
  
  .fact-section h2 {
    font-size: 1.5rem;
  }
}
