/* ===== NAVBAR SHARED STYLES ===== */
/* Ported from index.html to unify navigation across the forum */

:root {
  --primary-bg: #0f1720;
  --secondary-bg: #0a1425;
  --accent-color: #00bfff;
  --accent-hover: #0088cc;
  --text-color: #d9f3ff;
  --text-secondary: #87b7d4;
  --border-color: rgba(0, 180, 255, 0.2);
  --button-bg: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(10, 20, 40, 0.95);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.4);
  --transition-base: 300ms ease;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;

  /* Role Colors */
  --owner-color: #ffd700;
  --admin-color: #ff6b81;
  --mod-color: #00ced1;
  --helper-color: #00ffea;
  --developer-color: #22d3ee;
  --staff-color: #a29bfe;
  --co-owner-color: #fd79a8;
  --manager-color: #fab1a0;
  --member-color: #3498db;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== NAVIGATION ===== */
.navbar {
  background: var(--secondary-bg);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  height: 50px;
  padding: var(--space-xs) 0;
  display: flex;
  align-items: center;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0088cc;
  text-shadow: 0px 0px 10px blue;
  margin: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1001;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
  align-items: center;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition-base);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a.active {
  background: var(--button-bg);
  color: var(--accent-color);
}

/* Navigation Color Variants */
.nav-links .home {
  color: var(--accent-color);
}

.nav-links .forum {
  color: var(--mod-color);
}

.nav-links .vote {
  color: #ffd700;
}

.nav-links .store {
  color: #ff6b81;
}

.nav-links .discord-nav {
  color: var(--discord-color);
}

.nav-links .staff {
  color: var(--admin-color);
}

/* ===== USER MENU ===== */
.user-menu {
  position: relative;
  list-style: none;
}

.user-btn {
  background: var(--button-bg);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all var(--transition-base);
}

.user-btn:hover,
.user-btn:focus {
  background: var(--accent-color);
  color: #003366;
  border-color: var(--accent-color);
}

.navbar-pfp {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-color);
  display: none;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  min-width: 220px;
  display: none;
  z-index: 1000;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.user-dropdown.active {
  display: block;
  animation: fadeIn var(--transition-base);
}

.user-info {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.user-name {
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-xs);
  word-break: break-word;
}

.user-role {
  font-size: 0.75rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 12px;
  color: white;
  font-weight: 800;
  display: inline-block;
  text-transform: uppercase;
}

.user-path-role {
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

/* Role Colors */
.role-owner {
  background: linear-gradient(45deg, var(--owner-color), #ff9900);
  color: #003366;
}

.role-admin {
  background: linear-gradient(45deg, #ff242b, var(--admin-color));
  color: white;
}

.role-mod {
  background: linear-gradient(45deg, #00AAAA, var(--mod-color));
  color: white;
}

.role-helper {
  background: linear-gradient(45deg, #55ffff, var(--helper-color));
  color: #005555;
}

.role-member {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.role-staff {
  background: linear-gradient(45deg, #6c5ce7, var(--staff-color));
  color: white !important;
}

.role-co-owner {
  background: linear-gradient(45deg, #e84393, var(--co-owner-color));
  color: white !important;
}

/* User Role Badges */
.user-role {
  font-size: 0.70rem;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  color: white;
  font-weight: 800;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.role-owner {
  background: linear-gradient(45deg, var(--owner-color), #ff9900);
  color: #003366 !important;
}

.role-admin {
  background: linear-gradient(45deg, #ff242b, var(--admin-color));
  color: white !important;
}

.role-moderator,
.role-mod {
  background: linear-gradient(45deg, #00AAAA, var(--mod-color));
  color: white !important;
}

.role-helper {
  background: linear-gradient(45deg, #55ffff, var(--helper-color));
  color: #005555 !important;
}

.role-developer {
  background: linear-gradient(45deg, #00d2d3, var(--developer-color));
  color: white !important;
}

/* Additional Ranks */
.role-donator {
  background: linear-gradient(45deg, #ff9f43, #ff6b6b);
  color: white !important;
}

.role-known {
  background: linear-gradient(45deg, #00d2d3, #54a0ff);
  color: white !important;
}

.role-vip {
  background: linear-gradient(45deg, #1dd1a1, #10ac84);
  color: white !important;
}

.role-royal {
  background: linear-gradient(45deg, #5f27cd, #341f97);
  color: white !important;
}

.role-manager {
  background: linear-gradient(45deg, #ee5253, #ff6b6b);
  color: white !important;
}

.user-dropdown a {
  display: block;
  padding: var(--space-md) var(--space-lg);
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.user-dropdown a:hover,
.user-dropdown a:focus {
  background: var(--accent-color);
  color: #003366;
  padding-left: calc(var(--space-lg) + 5px);
}

.user-dropdown a i {
  width: 20px;
  text-align: center;
}

/* ===== MORE MENU ===== */
.more-btn {
  position: relative;
}

.more-btn>a {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.more-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  min-width: 220px;
  z-index: 1000;
  box-shadow: var(--shadow-xl);
  list-style: none;
}

.more-menu.active {
  display: block;
  animation: fadeIn var(--transition-base);
}

.more-menu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-color);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  font-weight: 500;
}

.more-menu a:hover {
  background: var(--accent-color);
  color: #003366;
  padding-left: calc(var(--space-md) + 5px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1050px) {
  .nav-container {
    padding: 0 var(--space-md);
    height: 60px;
  }

  .mobile-menu-btn {
    display: block;
    font-size: 1.25rem;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--secondary-bg);
    flex-direction: column;
    padding: 2rem 0;
    box-shadow: var(--shadow-xl);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }

  .nav-links a {
    padding: 1.25rem;
    font-size: 1.1rem;
    border-radius: 0;
    justify-content: flex-start;
    padding-left: 2rem;
  }

  .user-menu {
    width: 100%;
  }

  .user-btn {
    width: calc(100% - 4rem);
    margin: 1rem 2rem;
    justify-content: center;
  }

  .user-dropdown {
    position: relative;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
    display: none;
  }

  .user-dropdown.active {
    display: block;
  }

  .more-btn {
    position: static; /* Change from relative to static on mobile */
  }

  .more-menu {
    position: fixed; /* Use fixed positioning on mobile */
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    min-width: auto;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: 2px solid var(--border-color);
    background: var(--secondary-bg);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .more-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    display: block;
  }

  .more-menu li {
    width: 100%;
    text-align: center;
  }

  .more-menu a {
    padding: var(--space-lg) var(--space-md);
    font-size: 1rem;
    justify-content: center;
    display: flex;
    align-items: center;
    border-radius: 0;
  }

  /* Make the more button full width on mobile */
  .more-btn > a {
    width: 100%;
    justify-content: center;
  }
}

/* ===== AUTHENTICATION MODAL ===== */
.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.auth-content {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  width: 90%;
  max-width: 400px;
  border: 2px solid var(--accent-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: fadeIn var(--transition-base);
}

.auth-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-close:hover {
  color: var(--accent-color);
}

.auth-tabs {
  display: flex;
  margin-bottom: var(--space-xl);
  border-bottom: 2px solid var(--border-color);
}

.auth-tab {
  flex: 1;
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  color: var(--text-color);
  font-weight: 700;
  border-bottom: 3px solid transparent;
  transition: all var(--transition-base);
}

.auth-tab.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn var(--transition-base);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  color: white;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: white;
  font-family: 'Barlow', sans-serif;
  transition: all var(--transition-base);
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.1);
}

.form-message {
  padding: 10px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
  display: none;
}

.form-message.error {
  background: rgba(231, 76, 60, 0.2);
  color: #ff4757;
  border: 1px solid rgba(231, 76, 60, 0.5);
}

.form-message.success {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.5);
}

/* Category Badges for News and Forums */
.badge-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.70rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    background: rgba(0, 51, 102, 0.8);
    border: 1px solid rgba(0, 191, 255, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.badge-news { border-color: rgba(0, 191, 255, 0.8); color: #00bfff; }
.badge-update { border-color: rgba(40, 167, 69, 0.8); color: #5cd85c; }
.badge-event { border-color: rgba(142, 45, 226, 0.8); color: #b768ff; }
.badge-announcement { border-color: rgba(255, 65, 108, 0.8); color: #ff6b81; }
.badge-pinned { border-color: rgba(242, 153, 74, 0.8); color: #f2c94c; }