/*
 * Custom stylesheet for HilexZone
 *
 * Defines the dark neon look and feel of the site. A separate Tailwind
 * stylesheet could be used, but this file contains all bespoke styles
 * necessary for the provided pages.
 */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #01080f;
  color: #e0e0e0;
  overflow-x: hidden;
}

a {
  color: #00ff80;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Navbar */
nav {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
}

nav .logo img {
  height: 40px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}

nav li {
  margin: 0;
  padding: 0;
}

nav a {
  color: #e0e0e0;
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover {
  color: #00ff80;
}

/* Buttons */
.button {
  background-color: #00b36f;
  color: #01080f;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: box-shadow 0.3s, transform 0.3s;
}
.button:hover {
  box-shadow: 0 0 10px 2px #00ff80;
  transform: translateY(-2px);
}

/* Loader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #01080f;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
}
#loader img {
  width: 80px;
  margin-bottom: 1rem;
}
#loader p {
  color: #00ff80;
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  letter-spacing: 2px;
}

/* Starfield */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 6rem 1rem 4rem;
}
.hero h1 {
  font-size: 3rem;
  font-family: 'Courier New', monospace;
  color: #00ff80;
  margin-bottom: 1rem;
}
.hero p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #a0a0a0;
  line-height: 1.6;
}

.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto;
}
.search-bar select,
.search-bar input {
  padding: 0.5rem;
  border: 1px solid #003d29;
  border-radius: 4px;
  background-color: #010a13;
  color: #e0e0e0;
  flex: 1;
}
.search-bar input::placeholder {
  color: #607d8b;
}

.search-bar button {
  flex-shrink: 0;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  padding: 2rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
}
.category-card {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid #003d29;
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  color: #00ff80;
  font-weight: bold;
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 12px #00ff80;
  background-color: rgba(0, 0, 0, 0.7);
}

/* Footer */
.footer {
  padding: 2rem 1rem;
  background-color: rgba(0, 0, 0, 0.9);
  text-align: center;
  font-size: 0.875rem;
  color: #6f6f6f;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1100;
}
.modal.active {
  display: flex;
}
.modal-content {
  background-color: #021016;
  padding: 2rem;
  border-radius: 6px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 0 15px 2px #00ff80;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.modal-header h2 {
  margin: 0;
  color: #00ff80;
  font-family: 'Courier New', monospace;
}
.modal-close {
  cursor: pointer;
  font-size: 1.5rem;
  color: #00ff80;
}

.tab-nav {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.tab-nav button {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #003d29;
  background-color: #010a13;
  color: #00ff80;
  cursor: pointer;
  transition: background-color 0.2s;
}
.tab-nav button.active {
  background-color: #003d29;
}

.input-field {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #003d29;
  border-radius: 4px;
  background-color: #010a13;
  color: #e0e0e0;
}
.input-field:focus {
  outline: none;
  border-color: #00ff80;
}

.error-message {
  color: #ff5555;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Forms & tables for profile */
.tab-container {
  margin-top: 1rem;
}
.profile-tabs {
  display: flex;
  border-bottom: 1px solid #003d29;
}
.profile-tabs button {
  flex: 1;
  padding: 0.75rem;
  background-color: transparent;
  color: #00ff80;
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
.profile-tabs button.active {
  border-color: #00ff80;
}

.profile-panel {
  display: none;
  padding: 1rem 0;
}
.profile-panel.active {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
th, td {
  padding: 0.5rem;
  border-bottom: 1px solid #003d29;
}
th {
  color: #00ff80;
  text-align: left;
}

/* Responsive helpers */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }
  .search-bar {
    flex-direction: column;
  }
  .search-bar input,
  .search-bar select {
    flex: none;
    width: 100%;
  }
  nav ul {
    display: none;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.95);
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    text-align: center;
    padding: 1rem 0;
  }
  nav ul.mobile-active {
    display: flex;
  }
  .hamburger {
    display: block;
    cursor: pointer;
  }
}
@media (min-width: 641px) {
  .hamburger {
    display: none;
  }
}