/* Reusable fixed header styling */
:root {
  --primary: #498cb3;
  --primary-dark: #2c6076;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--primary);
}

.logo i {
  color: var(--primary);
  font-size: 1.6rem;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.main-nav a:hover {
  background: rgba(73, 140, 179, 0.1);
  color: var(--primary-dark);
}

.nav-buttons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.btn {
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.btn-modern {
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
}

.btn-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-modern:hover::before {
  left: 100%;
}

.btn-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-login:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-signup {
  background: linear-gradient(135deg, var(--primary) 0%, #38a169 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-signup:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(73, 140, 179, 0.4);
  background: linear-gradient(135deg, #38a169 0%, var(--primary) 100%);
}

.btn-logout {
  background: linear-gradient(135deg, var(--primary) 0%, #2c6076 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-logout:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(73, 140, 179, 0.4);
  background: linear-gradient(135deg, #2c6076 0%, var(--primary) 100%);
}

.btn-modern i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.btn-modern:hover i {
  transform: scale(1.2) rotate(5deg);
}

.btn-modern span {
  position: relative;
  z-index: 1;
}

/* Legacy button styles for backward compatibility */
.btn-secondary {
  background: #fff;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.nav-user {
  color: var(--primary-dark);
  font-weight: 600;
  margin-right: 1rem;
  font-size: 0.9rem;
}

/* Add padding to body so content isn't hidden under fixed header */
body.with-fixed-header {
  padding-top: 80px; /* Slightly more than header height for breathing room */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .nav-wrapper {
    height: 60px;
    flex-wrap: wrap;
    padding: 0 15px;
  }
  
  .main-nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .main-nav a {
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
  }
  
  .logo {
    font-size: 1.2rem;
  }
  
  body.with-fixed-header {
    padding-top: 70px;
  }
}

@media (max-width: 600px) {
  .nav-wrapper {
    flex-direction: column;
    height: auto;
    padding: 0.8rem 15px;
  }
  
  .main-nav {
    width: 100%;
    justify-content: center;
    margin: 0.5rem 0;
  }
  
  .nav-buttons {
    gap: 0.6rem;
  }
  
  body.with-fixed-header {
    padding-top: 90px;
  }
}

/* Modern Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modern-modal {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 450px;
  width: 95vw;
  animation: slideUp 0.4s ease;
  position: relative;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modern-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #38a169, #667eea);
}

.modern-modal .modal-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.modern-modal .modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.modern-modal .modal-title i {
  font-size: 1.8rem;
  color: var(--primary);
}

.modern-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #a0aec0;
  transition: all 0.3s ease;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-close:hover {
  color: #e53e3e;
  background: rgba(229, 62, 62, 0.1);
  transform: rotate(90deg);
}

.modern-form {
  padding: 1.5rem 2rem 2rem;
}

.modern-form .form-group {
  margin-bottom: 1.5rem;
}

.modern-form .form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.modern-form .form-group label i {
  color: var(--primary);
  font-size: 1.1rem;
}

.modern-form input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
}

.modern-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(73, 140, 179, 0.1);
  background: #fff;
}

.modern-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, #38a169 100%);
  color: white;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.modern-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.modern-submit:hover::before {
  left: 100%;
}

.modern-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(73, 140, 179, 0.3);
  background: linear-gradient(135deg, #38a169 0%, var(--primary) 100%);
}

.modern-submit i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.modern-submit:hover i {
  transform: scale(1.1);
}

.modal-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.modal-footer p {
  color: #666;
  font-size: 0.9rem;
}

.modal-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.modal-footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Modern button mobile responsive */
@media (max-width: 600px) {
  .modern-modal {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
  }
  
  .modern-modal .modal-header,
  .modern-form {
    padding: 1.5rem;
  }
  
  .btn-modern {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .btn-modern span {
    display: none;
  }
}
