/* Header styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  background: transparent;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(20, 20, 20, 0.01);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
}

.logo:hover {
  color: #bf40bf;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: #ffffff;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #bf40bf;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #bf40bf;
  transition: width 0.3s ease;
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-links li a.active {
  color: #bf40bf;
}

.nav-links li a.active::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #ffffff;
  color: #000000;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.dashboard-button:hover {
  transform: scale(1.05);
}

.login-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: transparent;
  color: #ffffff;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.login-button:hover {
  transform: scale(1.05);
}

/* Hamburger menu icon */
.menu-icon {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
}

.menu-icon span {
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  nav {
    padding: 0.8rem 1rem;
    justify-content: space-between;
    display: flex;
    align-items: center;
    position: relative;
  }
  
  .menu-icon {
    display: flex;
    order: 1;
    margin-left: 0;
    margin-right: 0;
  }
  
  .logo {
    order: 2;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: auto;
    text-align: center;
    width: auto;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 4rem 0;
    transition: left 0.3s ease;
    z-index: 1000;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links li a {
    font-size: 1.2rem;
  }
  
  .nav-right {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    order: 3;
  }
  
  .dashboard-button, .login-button {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
  
  /* Make dashboard button ALWAYS visible when logged in (on mobile) */
  body.logged-in .dashboard-button {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    order: 3;
  }
  
  /* HIDE all user avatar/profile elements when logged in (on mobile) */
  body.logged-in .nav-right .user-dropdown-container,
  body.logged-in .nav-right .avatar-button,
  body.logged-in .nav-right .discord-avatar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
  }
  
  /* Only show dashboard button when logged in */
  body:not(.logged-in) .dashboard-button {
    display: none !important;
  }
  
  /* Only show login button when not logged in */
  body.logged-in .login-button {
    display: none !important;
  }
  
  /* When menu is active, change hamburger to X */
  .menu-icon.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .menu-icon.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-icon.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  /* Add overlay when menu is active */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  
  .menu-overlay.active {
    display: block;
  }
  
  /* More extreme override for mobile view */
  body.logged-in nav .nav-right .user-dropdown-container,
  body.logged-in nav .nav-right .avatar-button,
  body.logged-in nav .nav-right .discord-avatar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
  }
  
  body.logged-in nav .nav-right .dashboard-button {
    display: flex !important;
    visibility: visible !important;
    position: static !important;
    opacity: 1 !important;
  }
}

@media (max-width: 576px) {
  .nav-links {
    width: 80%;
  }
  
  .dashboard-button {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .dashboard-button .dashboard-text {
    display: none;
  }
  
  .dashboard-button svg {
    margin-right: 0;
  }
  
  /* On very small screens, ensure the dashboard icon remains visible */
  body.logged-in .dashboard-button {
    min-width: unset;
    width: auto;
  }
  
  .login-button {
    padding: 0.5rem;
  }
  
  .login-button span {
    display: none;
  }
  
  /* Ensure nav items are properly aligned */
  nav {
    position: relative;
    padding: 0.8rem 1rem !important;
  }

  /* Make sure the logo stays centered */
  .logo {
    font-size: 1.3rem;
  }
  
  /* Ensure buttons take minimal space */
  .nav-right {
    min-width: unset;
  }

  /* Ensure text doesn't overflow on small screens */
  .footer-section h4 {
    font-size: 1rem;
  }
  
  .footer-links li a, 
  .social-link {
    font-size: 0.85rem;
  }
  
  /* Ensure the layout remains side by side on very small screens */
  .policies-socials-wrapper {
    gap: 0.5rem;
  }
}

/* User dropdown styles for header */
.user-dropdown-container {
  position: relative;
  display: inline-block;
}

.avatar-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.avatar-button:hover {
  transform: scale(1.1);
}

.discord-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #0f0f0f;
  min-width: 250px;
  border-radius: 0.5rem;
  padding: 1rem;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 0.5rem;
  animation: fadeIn 0.2s ease;
}

.user-dropdown-content::before {
  display: none;
}

.user-dropdown-content.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  gap: 0.75rem;
  color: #ffffff;
}

.dropdown-item svg {
  color: #ffffff;
}

.user-name {
  font-weight: 600;
}

.user-email {
  color: #ffffff;
  font-size: 0.9rem;
  cursor: default;
}

.user-email:hover {
  cursor: text;
}

.user-email:hover .email-hidden {
  display: none;
}

.user-email:hover .email-visible {
  display: inline;
}

.email-visible {
  display: none;
}

.dropdown-roles-container {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.roles-header {
  margin-top: 0.5rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  width: 100%;
}

.user-role {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  background: transparent;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid;
  margin-right: 0;
  margin-bottom: 0;
}

.role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
}

#logout-btn {
  margin-top: 0.5rem;
  background-color: rgba(255, 85, 85, 0.2);
  color: #ff5555;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 0.3rem;
  padding: 0.5rem;
}

#logout-btn:hover {
  background-color: rgba(255, 85, 85, 0.3);
}

#logout-btn svg {
  color: #ff5555;
}

/* Fix user dropdown on mobile */
@media (max-width: 576px) {
  .user-dropdown-content {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    margin: 0;
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
  }
  
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* Animation keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Remove the auth-loading spinner styles */
#auth-placeholder {
  min-width: 100px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Keep the role spinner style */
.role-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(114, 137, 218, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  margin: 8px auto;
  animation: role-spin 0.8s linear infinite;
}

@keyframes role-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer styles */
footer {
  padding: 3rem 2rem;
  background: #0a0a0b;
  color: #ccc;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

.footer-logo {
  flex: 1;
  min-width: 200px;
}

.footer-logo h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.footer-section h4::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 2px;
  background: #bf40bf;
  bottom: -5px;
  left: 0;
}

.footer-links, .footer-social {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: #ccc;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #bf40bf;
}

.footer-social li {
  margin-bottom: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #ccc;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: #bf40bf;
}

.social-link svg {
  flex-shrink: 0;
}

/* Policies and socials wrapper (always present but only active in mobile) */
.policies-socials-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

@media (max-width: 768px) {
  footer {
    padding: 2rem 1rem;
  }
  
  .footer-container {
    flex-direction: column;
    gap: 2rem;
  }
  
  .footer-logo, .footer-section:not([data-section="policies"]):not([data-section="socials"]) {
    text-align: center;
    min-width: 100%;
  }
  
  /* Style the policies-socials-wrapper for mobile */
  .policies-socials-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
  }
  
  /* Make the policies and socials sections side by side */
  .footer-section[data-section="policies"],
  .footer-section[data-section="socials"] {
    flex: 1;
    min-width: 0; /* Allow flex items to shrink below content size */
    text-align: center;
  }
  
  /* Make sure they have enough space */
  .footer-section[data-section="policies"] ul,
  .footer-section[data-section="socials"] ul {
    padding: 0;
  }
  
  .footer-section h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-links li, .footer-social li {
    margin-bottom: 1rem;
  }
  
  .social-link {
    justify-content: center;
  }
}

/* Main content styles */
main {
  padding-top: 120px !important; /* Add padding to account for the fixed header */
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

/* Better mobile responsiveness for all components */
@media (max-width: 576px) {
  main {
    padding-top: 100px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .header-container {
    padding: 0 !important;
  }
  
  h1, h2, h3 {
    word-break: break-word;
  }
  
  button, .button, .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* Fix for iOS fixed position blur issue */
@supports (-webkit-touch-callout: none) {
  nav {
    background: rgba(20, 20, 20, 0.9) !important;
  }
  
  .nav-links.active {
    background: rgba(15, 15, 15, 0.95) !important;
  }
} 