/* 상단 네비게이션 바 */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(135deg, rgba(10, 10, 18, 0.95), rgba(19, 19, 36, 0.95));
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--cyber-blue);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  padding: 12px 20px;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1200px) {
  .nav-left {
    gap: 8px;
  }
  .nav-item {
    padding: 5px 10px;
    font-size: 0.7rem;
  }
  .nav-logo {
    font-size: 1rem;
    padding: 5px 10px;
  }
  .download-btn {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
}

@media (max-width: 900px) {
  .top-nav {
    padding: 10px 15px;
  }
  .nav-container {
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-left {
    flex-wrap: wrap;
    gap: 6px;
  }
  .nav-item {
    padding: 4px 8px;
    font-size: 0.65rem;
  }
  .nav-logo {
    font-size: 0.9rem;
    padding: 4px 8px;
  }
  .download-btn {
    font-size: 0.65rem;
    padding: 4px 8px;
  }
}

@media (max-width: 600px) {
  .top-nav {
    padding: 8px 10px;
  }
  
  .nav-container {
    gap: 6px;
  }
  
  .nav-logo {
    font-size: 0.8rem;
    padding: 4px 6px;
  }
  
  .nav-logo .shield-icon {
    font-size: 0.9rem;
  }
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

/* 로고 스타일 */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--cyber-blue);
  transition: all 0.3s ease;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid var(--cyber-blue);
}

.nav-logo:hover {
  color: var(--cyber-green);
  border-color: var(--cyber-green);
  background: rgba(0, 255, 156, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 156, 0.4);
  transform: translateY(-2px);
}

.nav-logo .shield-icon {
  font-size: 1.2rem;
  filter: drop-shadow(0 0 8px var(--cyber-blue));
}

.nav-logo:hover .shield-icon {
  filter: drop-shadow(0 0 12px var(--cyber-green));
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 앱 다운로드 버튼 (통합) - 무지개 테두리 */
.download-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(26, 26, 46, 0.8);
  border: 2px solid transparent;
  border-radius: 6px;
  color: var(--cyber-blue);
  text-decoration: none;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 0.75rem;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  background-clip: padding-box;
}

.download-btn::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 6px;
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7f00,
    #ffff00,
    #00ff00,
    #0000ff,
    #4b0082,
    #9400d3,
    #ff0000
  );
  background-size: 400% 400%;
  z-index: -1;
  animation: rainbow-border 3s ease infinite;
}

@keyframes rainbow-border {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.download-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  color: var(--cyber-green);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
              0 0 40px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.download-btn:hover::before {
  animation: rainbow-border 1.5s ease infinite;
}

.download-icon {
  font-size: 1rem;
  display: inline-block;
}

.nav-item {
  padding: 5px 12px;
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid var(--cyber-blue);
  border-radius: 6px;
  color: var(--cyber-blue);
  text-decoration: none;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 0.75rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--cyber-green);
  color: var(--cyber-green);
  box-shadow: 0 0 15px rgba(0, 255, 156, 0.4);
}

.nav-item.active {
  background: rgba(255, 45, 149, 0.2);
  border-color: var(--cyber-pink);
  color: var(--cyber-pink);
}

.nav-dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(19, 19, 36, 0.98), rgba(26, 26, 46, 0.98));
  border: 2px solid var(--cyber-pink);
  border-radius: 12px;
  padding: 12px;
  min-width: 480px;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
              0 0 30px rgba(255, 45, 149, 0.3);
  z-index: 100;
  animation: fadeInDown 0.3s ease;
}

.nav-dropdown.active .dropdown-content {
  display: grid;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--cyber-blue);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  text-decoration: none;
  color: #e0e0e0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 140px;
  min-height: 80px;
  justify-content: center;
}

.dropdown-item:hover {
  border-color: var(--cyber-green);
  box-shadow: 0 0 15px rgba(0, 255, 156, 0.3);
  transform: scale(1.05);
}

.dropdown-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.dropdown-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyber-blue);
  line-height: 1.4;
  word-break: keep-all;
  white-space: normal;
  max-width: 100%;
  text-align: center;
}

.dropdown-item:hover .dropdown-title {
  color: var(--cyber-green);
}

.dropdown-subtitle {
  font-size: 0.65rem;
  color: #9ca3af;
  line-height: 1.3;
  word-break: keep-all;
  white-space: normal;
  text-align: center;
}

.auth-buttons {
  display: flex;
  gap: 8px;
}

.btn-login, .btn-signup {
  padding: 8px 16px;
  border-radius: 6px;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid;
}

.btn-login {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--cyber-blue);
  color: var(--cyber-blue);
}

.btn-login:hover {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.btn-signup {
  background: rgba(255, 45, 149, 0.1);
  border-color: var(--cyber-pink);
  color: var(--cyber-pink);
}

.btn-signup:hover {
  background: rgba(255, 45, 149, 0.2);
  box-shadow: 0 0 15px rgba(255, 45, 149, 0.4);
}

.user-menu {
  display: none;
  align-items: center;
  gap: 10px;
}

.user-menu.active {
  display: flex;
}

.user-info {
  color: var(--cyber-green);
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 0.85rem;
}

/* 모바일 햄버거 메뉴 */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--cyber-blue);
  border-radius: 6px;
  color: var(--cyber-blue);
  font-size: 1.5rem;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  border-color: var(--cyber-green);
  color: var(--cyber-green);
  box-shadow: 0 0 15px rgba(0, 255, 156, 0.4);
}

.mobile-menu {
  display: none;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 229, 255, 0.3);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu .nav-item,
.mobile-menu .nav-dropdown,
.mobile-menu .download-btn {
  width: 100%;
  margin-bottom: 8px;
  text-align: center;
  justify-content: center;
}

.mobile-menu .nav-dropdown {
  position: static;
}

.mobile-menu .dropdown-content {
  position: static;
  display: none;
  margin-top: 8px;
  margin-bottom: 8px;
  width: 100%;
  min-width: auto;
  grid-template-columns: 1fr;
}

.mobile-menu .nav-dropdown.active .dropdown-content {
  display: grid;
}

/* 좌측 슬라이드 메뉴 (모바일 전용) */
.sidebar-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: linear-gradient(135deg, rgba(10, 10, 18, 0.98), rgba(19, 19, 36, 0.98));
  backdrop-filter: blur(10px);
  border-right: 2px solid var(--cyber-blue);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  transition: left 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-menu.active {
  left: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.3);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1rem;
  color: var(--cyber-blue);
}

.sidebar-logo .shield-icon {
  font-size: 1.2rem;
  filter: drop-shadow(0 0 8px var(--cyber-blue));
}

.sidebar-close {
  background: none;
  border: 2px solid var(--cyber-blue);
  border-radius: 6px;
  color: var(--cyber-blue);
  font-size: 1.2rem;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-close:hover {
  border-color: var(--cyber-green);
  color: var(--cyber-green);
  box-shadow: 0 0 15px rgba(0, 255, 156, 0.4);
}

.sidebar-content {
  padding: 12px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--cyber-blue);
  text-decoration: none;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-item:hover {
  background: rgba(0, 229, 255, 0.1);
  border-left-color: var(--cyber-green);
  color: var(--cyber-green);
}

.sidebar-item.active {
  background: rgba(255, 45, 149, 0.2);
  border-left-color: var(--cyber-pink);
  color: var(--cyber-pink);
}

.sidebar-dropdown {
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

.sidebar-dropdown-content {
  display: none;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 0;
}

.sidebar-dropdown.active .sidebar-dropdown-content {
  display: block;
}

.sidebar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 40px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.sidebar-dropdown-item:hover {
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyber-green);
}

.sidebar-dropdown-item .dropdown-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.download-sidebar-item {
  border-top: 1px solid rgba(0, 229, 255, 0.3);
  margin-top: 8px;
  padding-top: 16px;
}

.sidebar-auth {
  padding: 16px;
  border-top: 1px solid rgba(0, 229, 255, 0.3);
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-btn-login,
.sidebar-btn-signup {
  padding: 10px 16px;
  border-radius: 6px;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid;
}

.sidebar-btn-login {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--cyber-blue);
  color: var(--cyber-blue);
}

.sidebar-btn-login:hover {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.sidebar-btn-signup {
  background: rgba(255, 45, 149, 0.1);
  border-color: var(--cyber-pink);
  color: var(--cyber-pink);
}

.sidebar-btn-signup:hover {
  background: rgba(255, 45, 149, 0.2);
  box-shadow: 0 0 15px rgba(255, 45, 149, 0.4);
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid rgba(0, 229, 255, 0.3);
  margin-top: 8px;
}

.sidebar-user-info {
  color: var(--cyber-green);
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 8px;
  background: rgba(0, 255, 156, 0.1);
  border-radius: 6px;
  border: 1px solid var(--cyber-green);
}

.sidebar-logout {
  background: rgba(255, 45, 149, 0.1);
  border-color: var(--cyber-pink);
  color: var(--cyber-pink);
  width: 100%;
  border: 1px solid var(--cyber-pink);
  border-radius: 6px;
  cursor: pointer;
}

.sidebar-logout:hover {
  background: rgba(255, 45, 149, 0.2);
  box-shadow: 0 0 15px rgba(255, 45, 149, 0.4);
}

/* 모바일 햄버거 버튼 (고정 위치) */
.mobile-hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10001;
  background: rgba(10, 10, 18, 0.95);
  border: 2px solid var(--cyber-blue);
  border-radius: 6px;
  color: var(--cyber-blue);
  font-size: 1.5rem;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  width: auto !important;
  min-width: auto !important;
  max-width: none !important;
  height: auto !important;
  flex-shrink: 0;
  box-sizing: border-box;
}

.mobile-hamburger:hover {
  border-color: var(--cyber-green);
  color: var(--cyber-green);
  box-shadow: 0 0 15px rgba(0, 255, 156, 0.4);
}

@media (max-width: 768px) {
  /* 모바일에서 상단 네비게이션 바 숨기기 */
  .top-nav {
    display: none !important;
  }
  
  nav.top-nav {
    display: none !important;
  }
  
  /* 모바일 햄버거 버튼 표시 */
  .mobile-hamburger {
    display: block !important;
  }
  
  /* 기존 모바일 메뉴 관련 스타일 제거 또는 숨김 */
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .mobile-menu {
    display: none !important;
  }
  
  /* nav-container도 숨기기 */
  .nav-container {
    display: none !important;
  }
}
