/* ===== GLOBAL THEME ===== */
body {
  background-color: #000000;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  color: #eaeaea;
  font-family: "Space Grotesk", "Poppins", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.3px;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  box-sizing: border-box;
}

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #0b1a2b;
  color: #00ffc6;
  font-size: 1.1rem;
  transition: opacity 0.6s ease;
  z-index: 9999;
}
#preloader img {
  width: 110px;
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ===== HEADER (Improved Alignment + Layout) ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 32px;
  background: rgba(15, 15, 20, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 45px;
  box-shadow: 0 4px 25px rgba(0, 255, 198, 0.1);
  max-width: 1150px;
  margin: 15px auto;
  transition: all 0.3s ease;
}

/* ===== LOGO ===== */
.header-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.header-logo:hover {
  transform: rotate(4deg) scale(1.05);
}

/* ===== NAVBAR (Centered) ===== */
.navbar {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: #ddd;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.3s, text-shadow 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #00ffc6;
  text-shadow: 0 0 8px #00ffc6;
}

/* ===== WALLET BUTTONS (Right Side) ===== */
.wallet-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn.connect {
  background: linear-gradient(90deg, #00ffc6, #2fff7f);
  border: none;
  color: #000;
  font-weight: 600;
  border-radius: 25px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn.connect:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00ffc6;
}

.btn.mock {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #00ffc6;
  color: #00ffc6;
  border-radius: 25px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn.mock:hover {
  background: rgba(0, 255, 198, 0.1);
  transform: scale(1.05);
}

/* ===== WALLET INFO BELOW BUTTONS ===== */
.wallet-info {
  text-align: right;
  font-size: 0.9rem;
  color: #00ffc6;
  margin-top: 4px;
}

.wallet-info p {
  margin: 0;
  padding: 0;
}

/* ===== HAMBURGER MENU ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #00ffc6;
  cursor: pointer;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

/* ===== MOBILE MENU ===== */
@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px 18px;
    border-radius: 25px;
  }

  .menu-toggle {
    display: block;
  }

  .navbar {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 20px;
    margin-top: 10px;
    padding: 10px 0;
    animation: fadeIn 0.3s ease-in-out;
  }

  .navbar.active {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    gap: 15px;
  }

  .btn.connect {
    margin-top: 12px;
  }

  .header-logo {
    width: 55px;
  }
  main {
    margin-top: 10rem !important;
  }
}

/* ===== VERY SMALL SCREENS ===== */
@media (max-width: 420px) {
  .header {
    padding: 10px;
  }

  .nav-links li a {
    font-size: 0.9rem;
  }

  .btn.connect {
    width: 100%;
    text-align: center;
  }
  main {
    margin-top: 10rem !important;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== MAIN ===== */
main {
  display: none;
  text-align: center;
  padding: 0 20px 20px 20px;
  margin-top: 8rem;
}

/* ===== INTRO ===== */
.intro h1 {
  background: linear-gradient(90deg, #00ffc6, #7bffcc);
  -webkit-background-clip: text;
  color: transparent;
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.intro p {
  color: #b8b8b8;
}
.highlight {
  color: #00ffc6;
}

/* ===== ACTION CARDS ===== */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 30px;
  padding: 0 20px;
}
.action-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 15px;
  text-align: center;
  transition: 0.3s;
}
.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0, 255, 198, 0.3);
}
.action-card input {
  width: 80%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  margin-bottom: 10px;
  text-align: center;
}
.btn {
  background: linear-gradient(90deg, #00ffc6, #29ffa3);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 255, 198, 0.5);
}
.btn.wide {
  width: 100%;
}

/* ===== GRAPHICAL DASHBOARD ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
  padding: 0 20px;
}
.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}
.stat-card h4 {
  color: #00ffc6;
  margin-bottom: 10px;
}
.progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  height: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.progress-fill {
  background: linear-gradient(90deg, #00ffc6, #29ffa3);
  width: 0%;
  height: 100%;
  transition: width 1s ease;
}
.progress-fill.alt {
  background: linear-gradient(90deg, #ff7efb, #8b5cff);
}

/* ===== FOOTER ===== */
footer {
  margin-top: 40px;
  font-size: 0.85rem;
  color: #777;
}

.status-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 255, 198, 0.15);
  border: 1px solid #00ffc6;
  padding: 10px 20px;
  border-radius: 10px;
  color: #00ffc6;
  font-weight: bold;
  transition: opacity 0.5s;
  z-index: 999;
}

.btn.mock {
  background: linear-gradient(90deg, #ff8a00, #ff3d00);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 25px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.3s;
  margin-right: 10px;
  white-space: nowrap;
}

.btn.mock:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px #ff8a00;
}

/* ===== AI CHATBOT STYLES ===== */
.chatbot-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 300px;
  max-height: 420px;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid #00ffc6;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 255, 198, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}

.chat-header {
  background: linear-gradient(90deg, #00ffc6, #2fff7f);
  color: #000;
  padding: 10px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-chat {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-input {
  display: flex;
  border-top: 1px solid #00ffc6;
}

.chat-input input {
  flex: 1;
  padding: 8px;
  border: none;
  background: #111;
  color: #fff;
}

.chat-input button {
  background: #00ffc6;
  border: none;
  padding: 0 12px;
  cursor: pointer;
  font-weight: bold;
}

.chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(90deg, #00ffc6, #2fff7f);
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 255, 198, 0.4);
  z-index: 1000;
}

.user-msg,
.bot-msg {
  padding: 8px 10px;
  border-radius: 10px;
  line-height: 1.4;
  max-width: 85%;
}

.user-msg {
  background: #00ffc6;
  color: #000;
  align-self: flex-end;
}

.bot-msg {
  background: #2a2a2a;
  color: #fff;
  align-self: flex-start;
}
/* ===== IMPACT METRICS ===== */
.impact-metrics {
  margin: 40px auto;
  text-align: center;
  max-width: 900px;
}

.impact-metrics h2 {
  color: #00ffc6;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.impact-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.impact-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  width: 260px;
  padding: 20px;
  box-shadow: 0 0 12px rgba(0, 255, 198, 0.2);
  transition: transform 0.3s ease;
}

.impact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 18px rgba(0, 255, 198, 0.4);
}

.impact-card h3 {
  font-size: 2rem;
  color: #2fff7f;
  margin-bottom: 8px;
}

.impact-card p {
  color: #ccc;
  font-weight: 500;
}
