/* ==================== NAVBAR ==================== */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--bg-card); /* modern, globally consistent */
  backdrop-filter: blur(12px);
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
}

.logo img {
  width: 100px;
  height: 70px;
  object-fit: contain;
}

.logo span {
  font-size: 30px;
  color: var(--text-main);
}

/* Nav Menu */
.nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.nav ul li {
  cursor: pointer;
  color: var(--text-main);
  font-weight: 500;
  transition: color 0.25s ease;
}

footer span:hover {
  color: var(--secondary);
}

.nav ul li:hover {
  color: var(--accent);
}

/* Menu Button (Mobile) */
.menu-btn {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-main);
}

/* ==================== AUTH NAV BUTTONS ==================== */
.nav .auth-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav .auth-btn:not(.primary) {
  color: var(--text-main);
  background: transparent;
  border: 2px solid var(--primary);
}

.nav .auth-btn:not(.primary):hover {
  background: var(--primary);
  color: #0b1020;
  box-shadow: 0 8px 20px rgba(124, 124, 255, 0.25);
  transform: translateY(-2px);
}

.nav .auth-btn.primary {
  color: #0b1020;
  background: linear-gradient(120deg, var(--primary), var(--accent));
}

.nav .auth-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(124, 124, 255, 0.35);
}

/* Hide close button by default (desktop) */
.mobile-menu-close {
  display: none;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {

  .menu-btn {
    display: block;
  }

  /* Close button container */
  .mobile-menu-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    color: var(--text-main) !important;
    font-size: 40px;
  }


  .nav ul {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 85%;
  max-width: 320px;

  background: var(--bg-card);
  flex-direction: column;
  padding: 1.25rem 1.25rem;
  gap: 0.4rem;

  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  display: none; /* hide completely */
  transition: transform 0.35s ease, opacity 0.3s ease;
  z-index: 9999;
}

.nav ul.active {
 display: flex; /* show menu */
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.nav ul li {
  padding: 0.45rem 0;
  width: 100%;
}


  /* Profile / Auth Mobile Overrides */
  .nav-profile-wrapper {
    display: none !important;
  }

  .auth-btn {
    margin-top: 1rem;
  }
}



/* Hide logout button everywhere */
.logout-btn {
  display: none !important;
}

/* Show ONLY on mobile */
@media (max-width: 768px) {
  .logout-btn {
    display: inline-flex !important;
  }
}


/* ==================== NAV PROFILE (Optional) ==================== */
.nav-profile-wrapper {
  position: relative;
  display: inline-block;
}

.nav-profile {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-profile-wrapper:hover .nav-profile {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(124,124,255,0.3);
}

.online-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  background-color: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff;
  pointer-events: none;
}

/* ==================== PROFILE DROPDOWN (DESKTOP) ==================== */
@media (min-width: 769px) {
  .profile-dropdown {
    min-width: 220px; /* slightly wider for desktop */
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }

  .profile-dropdown .pd-item {
    padding: 16px 20px;  /* more comfortable padding on desktop */
    font-size: 1rem;     /* slightly larger text for readability */
    cursor: pointer;
  }
}


/* ==================== STYLED INPUTS ==================== */
input,
textarea {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid #2b3263;
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
  caret-color: var(--accent);
  cursor: text;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
textarea:focus {
  border: 2px solid var(--accent);
  box-shadow: 0 0 8px rgba(255, 139, 213, 0.4);
  background: #161b3a;
}

input:disabled,
textarea:disabled {
  background: #0f1325;
  color: #6b6f8c;
  cursor: not-allowed;
}

/* ==================== SELECT & OPTION ==================== */
select {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid #2b3263;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

select:focus {
  border: 2px solid var(--accent);
  box-shadow: 0 0 8px rgba(255, 139, 213, 0.4);
  background: #161b3a;
}

select:disabled {
  background: #0f1325;
  color: #6b6f8c;
  cursor: not-allowed;
}

option {
  background: var(--bg-card);
  color: var(--text-main);
  padding: 0.5rem 1rem;
}

select.custom-arrow {
  position: relative;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-main) 50%),
    linear-gradient(135deg, var(--text-main) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 15px) calc(50% - 3px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

/* ==================== SEARCH ==================== */
.search-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

#search {
  width: 100%;
  padding-right: 30px;
  box-sizing: border-box;
}

#clearSearch {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #fff;
  font-weight: bold;
  display: none;
  user-select: none;
  font-size: 16px;
}

#clearSearch:hover {
  color: #ff8bd5;
}

a,
.ticket,
button,
.primary-btn,
.event-card button,
.load-more-wrapper button {
  cursor: pointer;
}

/* ==================== AUTH SWITCH ==================== */
.auth-switch span {
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

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

/* ==================== EVENT IMAGE ==================== */
.event-image {
  width: 100%;          /* full width of container */
  height: 300px;        /* fixed height you want */
  object-fit: cover;    /* cover container, maintain aspect ratio */
  object-position: center; /* center image in container */
  border-radius: var(--radius);
  display: block;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

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