:root {
  --primary-color: #ff9000;
  --bg-color: #0d0d0d;
  --card-bg-color: #1a1a1a;
  --text-color: #fff;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

header {
  background-color: #000;
  padding: 1rem;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin: 0;
}

nav {
  background-color: var(--card-bg-color);
  padding: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav li {
  margin: 0.3rem;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.5rem 0.8rem;
  border-radius: 1.25rem;
  transition: background-color 0.3s, color 0.3s;
}

nav a:hover, nav a.active {
  background-color: var(--primary-color);
  color: #000;
}

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

.category-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 2rem 0 1rem;
  color: var(--primary-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 0.6rem;
  text-transform: uppercase;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.link-card {
  background-color: var(--card-bg-color);
  border-radius: 5px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.link-card:hover {
  background-color: #2a2a2a;
  transform: translateY(-5px);
}

.link-card i {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.link-card h3 {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--text-color);
}

footer {
  background-color: #000;
  color: #ccc;
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
}

footer nav {
  margin-top: 0.6rem;
  background-color: transparent;
}

footer nav a {
  color: #ccc;
  margin: 0 0.6rem;
  font-size: 0.75rem;
}

#edit-form {
  background-color: var(--card-bg-color);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 5px;
}

#edit-form input, #edit-form select {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 3px;
}

#edit-form button {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  cursor: pointer;
}

#toggle-edit {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: #000;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .link-grid {
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  }
  
  nav {
    padding: 0.3rem;
  }
  
  nav a {
    padding: 0.4rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .link-grid {
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  }
  
  header h1 {
    font-size: 1.8rem;
  }
}
