/* 헤더 */
.header {
  position: sticky;
  top: 0;
  background-color: rgba(12, 12, 22, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 100;
  padding: 15px 0;
  border-bottom: 1px solid rgba(156, 39, 176, 0.2);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.logo img {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(156, 39, 176, 0.7));
  animation: logoGlow 3s infinite alternate;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #9c27b0, #673ab7, #9c27b0);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShine 4s linear infinite, textPulse 3s infinite alternate;
  text-shadow: 0 0 10px rgba(156, 39, 176, 0.5);
  position: relative;
}

/* 로고 주변에 우주 먼지 효과 추가 */
.logo::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -20px;
  right: -20px;
  bottom: -10px;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(156, 39, 176, 0.1),
    transparent 70%
  );
  border-radius: 50%;
  z-index: -1;
  animation: cosmicGlow 8s infinite alternate;
  pointer-events: none;
}

/* 로고 텍스트 뒤의 별 효과 */
.logo h1::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(1px 1px at 10% 20%, white, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 20% 50%, white, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 30% 30%, white, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 40% 70%, white, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 65% 10%, white, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 70% 90%, white, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 90% 40%, white, rgba(0, 0, 0, 0));
  opacity: 0;
  z-index: -1;
  animation: starTwinkle 5s infinite;
  pointer-events: none;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  font-weight: 500;
  position: relative;
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #9c27b0, transparent);
  transition: width 0.3s ease;
}

.nav a:not(.btn):hover::after {
  width: 100%;
}

.nav a:hover {
  color: #9c27b0;
}

@keyframes textShine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes textPulse {
  0% {
    text-shadow: 0 0 10px rgba(156, 39, 176, 0.5);
  }
  50% {
    text-shadow: 0 0 15px rgba(156, 39, 176, 0.7),
      0 0 30px rgba(156, 39, 176, 0.4);
  }
  100% {
    text-shadow: 0 0 10px rgba(156, 39, 176, 0.5);
  }
}

@keyframes logoGlow {
  0% {
    filter: drop-shadow(0 0 8px rgba(156, 39, 176, 0.7));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(156, 39, 176, 1)) brightness(1.1);
  }
  100% {
    filter: drop-shadow(0 0 8px rgba(156, 39, 176, 0.7));
  }
}

@keyframes cosmicGlow {
  0% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
}

/* 로고에 호버 효과 추가 */
.logo:hover img {
  animation: logoHoverGlow 1.5s infinite alternate;
}

.logo:hover h1 {
  animation: textHoverShine 2s linear infinite,
    textHoverPulse 1.5s infinite alternate;
}

@keyframes logoHoverGlow {
  0% {
    filter: drop-shadow(0 0 10px rgba(156, 39, 176, 0.8));
  }
  100% {
    filter: drop-shadow(0 0 15px rgba(156, 39, 176, 1)) brightness(1.2);
  }
}

@keyframes textHoverShine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes textHoverPulse {
  0% {
    text-shadow: 0 0 15px rgba(156, 39, 176, 0.6);
  }
  100% {
    text-shadow: 0 0 20px rgba(156, 39, 176, 0.9),
      0 0 40px rgba(156, 39, 176, 0.5);
  }
}

/* 태블릿과 모바일 반응형 */
@media (max-width: 768px) {
  .logo {
    gap: 8px;
  }

  .logo img {
    height: 32px;
  }

  .logo h1 {
    font-size: 1.5rem;
  }
}
