/* Common styles shared across all pages */

:root {
  /* Dark mode colors */
  --bg-primary: #0a0e27;
  --bg-secondary: #1a1f3a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #a0a0a0;
  
  /* Accent colors */
  --accent-primary: #3b82f6;
  --accent-gradient-start: #3b82f6;
  --accent-gradient-end: #2563eb;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --shadow-color: rgba(59, 130, 246, 0.3);
  
  /* Component colors */
  --card-bg: #1e2230;
  --card-bg-gradient: linear-gradient(135deg, #1e2230 0%, #252939 100%);
  --input-bg: #252939;
  --input-border: #2d3142;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Navigation */
.main-nav {
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gradient-start) 0%, var(--accent-gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: transform 0.2s ease;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  border-radius: 2px;
  animation: brandUnderlineGlow 2s ease-in-out infinite;
}

@keyframes brandUnderlineGlow {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
  }
}

.nav-brand:hover {
  transform: scale(1.05);
}

.nav-brand-icon {
  font-size: 1.75rem;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
  -webkit-text-fill-color: currentColor;
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
  color: var(--text-primary);
  font-weight: 600;
}

.nav-link i {
  font-size: 1.1rem;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: var(--accent-primary);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .nav-container {
    height: 65px;
    padding: 0 1rem;
  }

  .nav-brand {
    font-size: 1.35rem;
  }

  .nav-brand-icon {
    font-size: 1.5rem;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .nav-link span {
    display: none;
  }

  .nav-link i {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .nav-brand {
    font-size: 1.2rem;
  }

  .nav-brand-icon {
    font-size: 1.35rem;
  }
}

/* Common container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 2rem 2rem;
}

/* Common button styles */
button {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

button[type="submit"] {
  background: linear-gradient(135deg, var(--accent-gradient-start) 0%, var(--accent-gradient-end) 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
  background: linear-gradient(135deg, #4a8fff 0%, #3b73eb 100%);
}

button[type="button"]:hover {
  background: var(--input-bg);
  border-color: var(--text-muted);
}

button:active {
  transform: scale(0.98);
}

/* Common card styles */
.card {
  background: var(--card-bg-gradient);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 4px 16px var(--shadow-color);
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 2px;
  background: var(--accent-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

*:focus {
  outline: 3px solid var(--accent-primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
