/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #3b0a45;
  color: #eee;
  overflow-x: hidden;
  position: relative;
}

/* Canvas fills whole background */
#background-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

/* Content layering */
header, main, footer {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  padding-top: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

header h1 {
  font-size: 2.8rem;
  letter-spacing: 3px;
  color: #dda0ff;
  margin-bottom: 10px;
  text-shadow: 0 0 10px #9b59b6;
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: #c9a3ff;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  cursor: pointer;
}

nav a:hover,
nav a:focus {
  color: #f0e6ff;
}

nav a.active {
  color: #f7e8ff;
  border-bottom: 2px solid #bb86fc;
  padding-bottom: 3px;
}

/* Sections */
.section {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.section.active {
  display: block;
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* Cheat Categories and Cheats Grid */
.cheat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Cheat category and cheat item style */
.cheat-category,
.cheat-item {
  background: rgba(80, 22, 94, 0.4);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(187, 134, 252, 0.3);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.cheat-category:hover,
.cheat-category:focus,
.cheat-item:hover {
  background: rgba(120, 50, 160, 0.6);
  box-shadow: 0 0 15px #bb86fc;
  outline: none;
}

.cheat-category img,
.cheat-item img {
  width: 100%;
  max-width: 140px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
  user-select: none;
  pointer-events: none;
}

.cheat-category p,
.cheat-item p {
  font-weight: 600;
  color: #e5d0ff;
  font-size: 1.05rem;
  user-select: none;
}

/* Back button */
#back-to-categories {
  background: #bb86fc;
  border: none;
  padding: 10px 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: #2e004f;
  cursor: pointer;
  box-shadow: 0 0 15px #bb86fc;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#back-to-categories:hover,
#back-to-categories:focus {
  background-color: #d1aaff;
  color: #3f005f;
  outline: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 15px 0 40px;
  font-size: 0.9rem;
  color: #aa9cff;
  text-shadow: 0 0 8px #7046a7;
}

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 100; /* Sit on top of everything else */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px); /* Optional: blur background behind modal */
}

.modal.active {
  display: flex; /* Show the modal when active */
}

.modal-content {
  background: #3b0a45; /* Dark background from your theme */
  margin: auto;
  padding: 30px;
  border: 2px solid #bb86fc; /* Border color from your theme */
  border-radius: 15px;
  width: 80%;
  max-width: 500px;
  text-align: center;
  position: relative;
  box-shadow: 0 5px 25px rgba(187, 134, 252, 0.6);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-content h2 {
  color: #dda0ff;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.modal-content p {
  color: #e5d0ff;
  margin-bottom: 25px;
  line-height: 1.5;
}

.discord-button {
  display: inline-block;
  background: #7289DA; /* Discord's brand color */
  color: #fff;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 15px rgba(114, 137, 218, 0.4);
}

.discord-button:hover,
.discord-button:focus {
  background-color: #6778bf;
  transform: translateY(-2px);
  outline: none;
}

.close-button {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
  color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    gap: 15px;
  }
}
