@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=JetBrains+Mono:wght@700&display=swap');


:root {
  --primary-color: #6E48AA;
  --secondary-color: #9D50BB;
  --complement-color: #00FFA3;
  --bg-color: #0f0f1a;
  --text-color: #FFFFFF;
  --error-color: #FF4646;
  --accent-color: #00ffa3;
}

body,
html {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  height: 100%;
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
  transition: opacity 0.5s ease-in-out;
  /* Fade effect */
}

body.fade-out {
  opacity: 0;
  /* Fade out */
}

body {
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.1s ease-in-out;

}
body.loaded {
  opacity: 1;
}
a {
  text-decoration: none;
  color: #1d6ce9;
  cursor: pointer;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--accent-color);
  text-shadow: 0 0 15px rgba(0, 255, 163, 0.3);
  position: relative;
  overflow: hidden;
}

.logo::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-links a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a:hover {
  color: var(--accent-color);
  background: rgba(110, 72, 170, 0.1);
}

.mobile-menu {
  display: none;
  cursor: pointer;
}

.mobile-menu div {
  width: 25px;
  height: 2px;
  background-color: var(--text-color);
  margin: 5px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}


/***************** Profile section  ********************/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=JetBrains+Mono:wght@700&display=swap');

/* Profile Styles */
.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(110, 72, 170, 0.2);
  border: none;
  border-radius: 25px;
  color: var(--text-color);
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.3s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.profile-trigger:hover,
.profile-trigger:focus-visible {
  background: rgba(110, 72, 170, 0.4);
  outline: none;
}

.profile-trigger:focus-visible {
  box-shadow: 0 0 0 2px var(--complement-color);
}

.profile-pic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--complement-color);
  object-fit: cover;
  aspect-ratio: 1;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.profile-modal {
  background: var(--bg-color);
  border-radius: 15px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  position: relative;
  border: 1px solid rgba(0, 255, 163, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease;
}


@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Update toggle logic to include animation */
.profile-modal.closing {
  animation: modalFadeOut 0.3s ease;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover,
.close-btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.close-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--complement-color);
}

.profile-header {
  text-align: center;
  margin-bottom: 30px;
}

.profile-header img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--complement-color);
  margin-bottom: 15px;
  object-fit: cover;
  aspect-ratio: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.profile-stat-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.profile-stat-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.profile-stat-value {
  color: var(--complement-color);
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
  line-height: 1.2;
}

.profile-stat-label {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.4;
}

.menu-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: none;
  border: none;
  color: var(--text-color);
  width: 100%;
  text-align: left;
}

.menu-item:hover {
  background: var(--primary-color);
}

.menu-item:active {
  background-color: var(--primary-color);
}

.logout-btn {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 70, 70, 0.1);
  color: var(--error-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 70, 70, 0.2);
}

.show {
  display: flex !important;
}

body {
  background-color: var(--bg-color);
  min-height: 100vh;
}

@media (max-width: 480px) {
  .profile-modal {
    width: 95%;
    padding: 20px;
  }

  .profile-stats-grid {
    gap: 10px;
  }

  .profile-stat-value {
    font-size: 20px;
  }

  .profile-stat-label {
    font-size: 12px;
  }
}