/* === NAVIGATION === */
nav {
  position: relative;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background-color: transparent;
  transition: background 0.3s, transform 0.3s;
}

nav ul li a:hover {
  background-color: #292929;
  transform: scale(1.05);
}

a {
  color: #facc15;
  text-decoration: none;
}

a:hover {
  color: #ef4444;
}

/* === HEADER === */
header {
  background-color: #1a1a1a;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  color: #facc15;
  font-size: 2rem;
  text-shadow: 1px 1px 4px #000;
}

/* === MOBILE MENU TOGGLE === */
.menu-toggle {
  display: none;
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  z-index: 1000;
}

.menu-toggle span {
  position: absolute;
  height: 4px;
  width: 100%;
  background-color: #facc15;
  border-radius: 3px;
  transition: all 0.4s ease;
}

.menu-toggle span:nth-child(1) {
  top: 0;
}

.menu-toggle span:nth-child(2) {
  top: 9px;
}

.menu-toggle span:nth-child(3) {
  top: 18px;
}

/* === TOGGLE ANIMATION TO "X" === */
.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 9px;
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg);
  top: 9px;
}

/* === MOBILE STYLES === */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    flex-direction: column;
    background-color: rgba(26, 26, 26, 0.95);
    position: fixed;
    top: 116px;
    right: 12px;
    width: 350px; /* Increased width for full link display */
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    border-left: 2px solid #facc15;
    border-right: 2px solid #facc15;
    border-bottom: 2px solid #facc15;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 0;
    transition: all 0.4s ease;
    z-index: 99;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
  }

  nav ul.show {
    max-height: 100vh;
    opacity: 1;
    pointer-events: auto;
    padding: 1rem;
    overflow: hidden;
  }

  nav ul li {
    margin-bottom: 1rem;
    text-align: center;
  }

  nav ul li a {
    display: block;
    width: 315px;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(to right, #111, #111);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center; /* Ensures text isn't right-clipped */
    white-space: nowrap; /* Prevents line break */
  }

  nav ul li a:hover {
    background-color: #292929;
    transform: translateX(-5px) scale(1.05);
    color: #facc15;
  }
}
