/* Shared Header & Footer Styles */
:root {
  --primary-color: #00d4ff;
  --primary-hover: #00b8e6;
  --bg-dark: #1a202c;
  --bg-card: rgba(40, 44, 52, 0.95);
  --border-color: #4a5568;
  --text-primary: #e2e8f0;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
}

/* Header Styles */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--primary-hover);
}

.logo-icon {
  width: 32px;
  height: 32px;
  margin-right: 10px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 6px;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
  background: rgba(0, 212, 255, 0.1);
}

.nav-links a.active {
  color: var(--primary-color);
  background: rgba(0, 212, 255, 0.15);
}

.auth-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-outline {
  padding: 8px 16px;
  border: 1px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.btn-primary {
  padding: 8px 16px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #007399);
  transform: translateY(-1px);
}

.user-menu {
  position: relative;
  display: none; /* Shown when user is logged in */
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.user-avatar:hover {
  transform: scale(1.05);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: block;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(74, 85, 104, 0.3);
}

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

.user-dropdown a:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.mobile-nav.show {
  display: block;
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 20px;
}

.mobile-nav-links li {
  margin-bottom: 10px;
}

.mobile-nav-links a {
  display: block;
  padding: 12px 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(74, 85, 104, 0.3);
  transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
  color: var(--primary-color);
}

.mobile-auth-buttons {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Footer Styles */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  padding: 40px 0 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-section p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }

  .main-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom-links {
    flex-direction: column;
    gap: 10px;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-container {
    height: 60px;
  }

  .logo {
    font-size: 1.3rem;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
  }
}
