@import url('https://fonts.cdnfonts.com/css/minecraftia');

body {
  margin: 0;
  font-family: 'Minecraftia', monospace, sans-serif;
  background: #000;
  color: white;
  text-align: center;
  position: relative;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

body.dark {
  background: linear-gradient(135deg, #0a0a0a, #121f14);
  color: #b8d8b8;
}

header,
footer {
  padding: 1rem 2rem;
  background: transparent;
  color: inherit;
  transition: color 0.4s ease;
}

.container,
header,
footer,
nav a {
  transition: color 0.4s ease, background-color 0.4s ease;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: -1;
  transition: opacity 0.4s ease;
}

body.dark .overlay {
  opacity: 0.1;
}

.container {
  padding: 2rem;
  max-width: 600px;
  margin: auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: bold;
  font-size: 1.5rem;
  user-select: none;
}

nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: white;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav a[aria-current="page"] {
  font-weight: bold;
  color: #2ecc71;
  text-decoration: underline;
}

.container ul {
  list-style: none;
  padding: 0;
}

.container ul li {
  margin: 1rem 0;
}

.container ul li a {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background-color: #2ecc71;
  color: #000;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  user-select: none;
}

.container ul li a:hover {
  background-color: #27ae60;
  color: #fff;
}

.mod-entry {
  margin: 2rem 0;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  text-align: left;
}

.label {
  color: #f1c40f;
  font-weight: bold;
}

.version-info {
  color: white;
}

.modpack-name a {
  font-size: 1.4rem;
  color: #2ecc71;
  text-decoration: none;
  font-weight: bold;
}

.modpack-name a:hover {
  text-decoration: underline;
}

.author-anakama {
  color: #2ecc71;
  text-decoration: none;
  font-weight: bold;
}

.author-xdf {
  color: #c084fc;
  text-decoration: none;
  font-weight: bold;
}

.author-anakama:hover,
.author-xdf:hover {
  text-decoration: underline;
}

.seriousfreezing {
  color: #FFA500;
  text-decoration: none;
  font-weight: bold;
}

.seriousfreezing:hover {
  text-decoration: underline;
}

#sortModsBtn {
  font-family: 'Minecraftia', monospace, sans-serif;
  background: none;
  border: none;
  color: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
  user-select: none;
}

#sortModsBtn:hover,
#sortModsBtn:focus {
  transform: translateY(-2px);
}

#sortModsBtn:active {
  transform: translateY(0);
}

#download-links .mod-entry {
  margin: 0.3em 0;
  font-size: 1.2rem;
}

#download-links .mod-entry a {
  color: #61dafb;
  text-decoration: none;
}

#download-links .mod-entry a:hover {
  color: #21a1f1;
  text-decoration: underline;
}

#downloads-anakama { color: #00FF00; }
#downloads-xdf_   { color: #FF0000; }

footer {
  padding: 2rem 1rem;
  font-size: 0.85rem;
  opacity: 0.6;
  text-align: bottom;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 0.5rem;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  nav a {
    min-width: 120px;
    padding: 0.6rem 1rem;
    text-align: center;
  }

  #theme-toggle {
    margin-top: 0.5rem;
  }
}

@media (max-width: 600px) {
  #theme-toggle {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
  }

  .card-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #111;
  border: 2px solid #444;
  padding: 20px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 0 20px #000;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.platform-section {
  margin-top: 15px;
}

.platform-section h3 {
  margin-bottom: 5px;
}
