/* Shared Navigation Bar Styles */

/* Announcement Text Bar */
.announcement-bar {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-align: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 1001;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.announcement-bar a {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}

.announcement-bar a:hover {
  opacity: 0.8;
}

@keyframes slideUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

/* Header - Sticky Navigation */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--space);
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 12px var(--space);
  box-shadow: 0 6px 30px rgba(0,0,0,0.4);
}

/* Brand */
.brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Navigation Pills */
nav {
  display: flex;
  gap: var(--space);
  flex-wrap: wrap;
}

.pill {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  transition: all 0.2s ease;
}

.pill:hover {
  background: #0f1830;
}

.pill.active {
  background: linear-gradient(120deg, rgba(125, 178, 255, 0.15), rgba(124, 242, 230, 0.15));
  border-color: rgba(255, 255, 255, 0.08);
}

/* Custom PC Dropdown */
.custom-pc-nav {
  position: relative;
  display: inline-block;
}

.custom-pc-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  min-width: 280px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 8px;
  overflow: hidden;
}

.custom-pc-nav:hover .custom-pc-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
  cursor: pointer;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(125, 178, 255, 0.1);
}

.dropdown-item-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(125, 178, 255, 0.1);
  border-radius: 10px;
  flex-shrink: 0;
}

.dropdown-item-content {
  flex: 1;
}

.dropdown-item-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--ink);
}

.dropdown-item-desc {
  font-size: 12px;
  color: var(--muted);
}

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  max-width: 400px;
  margin: 0 20px;
}

.search-input {
  flex: 1;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px 0 0 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: rgba(125, 178, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.search-btn {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  border-radius: 0 999px 999px 0;
  background: rgba(125, 178, 255, 0.1);
  color: var(--accent1);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.search-btn:hover {
  background: rgba(125, 178, 255, 0.2);
}

/* Auth Section */
.auth-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.username-display {
  color: #e9eefc;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  background: rgba(125, 178, 255, 0.1);
  border-radius: 999px;
}

.btn-login,
.btn-signup,
.btn-logout {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-login {
  background: transparent;
  color: #e9eefc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-signup {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
}

.btn-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-logout {
  background: rgba(255, 68, 68, 0.1);
  color: #ff6b6b;
  border: 1px solid rgba(255, 68, 68, 0.2);
}

.btn-logout:hover {
  background: rgba(255, 68, 68, 0.2);
  border-color: rgba(255, 68, 68, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 16px;
    padding: 12px var(--space);
  }

  .search-bar {
    width: 100%;
    max-width: none;
    margin: 0;
    order: 2;
  }

  nav {
    width: 100%;
    justify-content: center;
    order: 3;
  }

  .pill {
    padding: 8px 12px;
    font-size: 14px;
  }

  .announcement-bar {
    font-size: 12px;
    padding: 10px 40px 10px 20px;
  }

  .custom-pc-dropdown {
    left: 0;
    transform: translateX(0) translateY(-10px);
    min-width: 250px;
  }

  .custom-pc-nav:hover .custom-pc-dropdown {
    transform: translateX(0) translateY(0);
  }

  .auth-section {
    width: 100%;
    justify-content: center;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
    margin-left: 0;
    padding-left: 0;
    order: 4;
  }

  .username-display {
    font-size: 12px;
    padding: 6px 10px;
  }

  .btn-login,
  .btn-signup,
  .btn-logout {
    padding: 6px 12px;
    font-size: 12px;
  }
}