/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  background-color: #111;
  color: #e0e0e0;
  overflow-x: hidden;
  perspective: 1000px;
  transition: background-color 0.3s ease;
  background-image:
    linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
    linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
    linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
  background-size: 60px 60px;
  background-position: 0 0, 0 30px, 30px -30px, -30px 0;
  padding-bottom: 60px; /* For fixed footer clearance */
}

/* Animated floating effect */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(0, 255, 170, 0.1), transparent 70%),
              radial-gradient(circle at bottom right, rgba(255, 100, 200, 0.08), transparent 80%);
  z-index: -1;
  transform: translateZ(-200px) scale(1.1);
  animation: float 10s linear infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateZ(-200px); }
  50% { transform: translateY(-30px) translateZ(-200px); }
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(20, 20, 20, 0.9);
  border-bottom: 1px solid #333;
  z-index: 10;
}

.home-link {
  color: #0ff;
  text-decoration: none;
  font-size: 1.8rem;
}

.home-link:hover {
  color: #0fa;
}

.header .actions,
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions button {
  width: 36px;
  height: 36px;
  background-color: #222;
  border-radius: 50%;
  font-size: 1.2rem;
  color: #00ffaa;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.header-actions button:hover {
  background-color: #333;
  transform: scale(1.1);
}

.points-counter {
  background-color: #0ff;
  color: #111;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

#search-input {
  background-color: #333;
  color: #00ffaa;
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 1rem;
  width: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#search-input.expanded {
  width: 200px;
  opacity: 1;
  visibility: visible;
  margin-left: 8px;
}

/* Navigation */
.hamburger {
  font-size: 28px;
  color: #0ff;
  cursor: pointer;
  background: none;
  border: none;
  display: none;
  user-select: none;
  transition: color 0.3s;
}

.hamburger:hover {
  color: #ff0;
}

.menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-toggle {
  display: none;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .menu {
    position: absolute;
    top: 100%;
    right: 24px;
    flex-direction: column;
    background: rgba(20, 20, 20, 0.95);
    padding: 16px;
    border-radius: 10px;
    width: 250px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  .menu.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .actions input[type="text"] {
    width: 100%;
  }
}

/* Main Content */
main {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Toolbox Grid */
.suite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 800px;
}

.suite-button {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  padding: 1.5rem;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  transition: background-color 0.3s;
}

.suite-button:hover {
  background-color: #0056b3;
}

/* Categories */
.category {
  background-color: rgba(18, 18, 18, 0.85);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s, box-shadow 0.6s;
}

.category:hover {
  transform: rotateX(3deg) rotateY(-3deg) translateZ(10px);
  box-shadow: 0 8px 20px rgba(0, 255, 170, 0.4);
}

.category h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #ff00cc;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Tool Cards */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
}

.tool-card {
  display: block;
  text-align: center;
  padding: 20px;
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid #444;
  font-size: 1.1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  transition: background 0.3s, transform 0.3s;
}

.tool-card:hover {
  background: linear-gradient(135deg, #00ffaa, #ff00cc);
  color: #0d0d0d;
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 255, 170, 0.4);
}

/* Fixed Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #111;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #333;
  z-index: 1000;
}

.bottom-nav .nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 1.4rem;
  height: 100%;
  transition: color 0.3s ease;
}

.bottom-nav .nav-link:hover {
  color: #00ffaa;
}

.bottom-nav .nav-link span {
  font-size: 0.7rem;
  margin-top: 2px;
}

/* Floating Chatbot */
#chatbot-toggle {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: #0ff;
  color: #000;
  padding: 0.8rem 1rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 15px #0ff;
  z-index: 100;
}

/* Utility */
.clip-hexagon {
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Forum Section */
.futuristic-panel {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 16px;
  background: radial-gradient(circle at top left, #0ff2, #000);
  box-shadow: 0 0 30px #0ff8;
  color: #0ff;
}

.extra-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  justify-content: space-between;
}

.live-chat {
  flex: 1;
  min-width: 280px;
  background: #111;
  padding: 1rem;
  border: 1px solid #0ff5;
  border-radius: 10px;
  height: 300px;
  display: flex;
  flex-direction: column;
}

#chat-window {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0.5rem;
  border-bottom: 1px solid #0ff4;
  margin-bottom: 0.5rem;
}

#chat-input {
  padding: 0.5rem;
  background: #000;
  border: 1px solid #0ff6;
  border-radius: 6px;
  color: #0ff;
}

.forum-link {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.forum-button {
  padding: 1rem 2rem;
  background-color: #0ff;
  color: #000;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 0 15px #0ff8;
  transition: all 0.3s ease-in-out;
}

.forum-button:hover {
  background-color: #0fa;
  box-shadow: 0 0 25px #0fa;
}
