/* Global Styles */
:root {
  --vh: 1vh;
  --animation-duration: 1s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

/* Keyboard navigation accessibility */
.keyboard-nav *:focus {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
}

.skip-link:focus {
  top: 6px;
}

/* iOS Safari viewport fix */
@supports (-webkit-touch-callout: none) {
  .hero-section {
    min-height: calc(var(--vh, 1vh) * 100);
  }
}

/* Particles Background */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #7209b7 100%);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 10px 30px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  width: 95%;
}

.navbar:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.navbar-brand img {
  transition: all 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.nav-link {
  color: white !important;
  font-weight: 500;
  margin: 0 15px;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 16px !important;
  border-radius: 25px;
}

.nav-link:hover {
  color: #ffd700 !important;
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #ffd700;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 80%;
}

/* Custom Hamburger Menu Styles */
.navbar-toggler {
  border: none;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  width: 50px;
  height: 45px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.5);
  outline: none;
}

.navbar-toggler:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Custom hamburger icon */
.navbar-toggler-icon {
  display: none;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Hamburger animation */
.navbar-toggler.collapsed .hamburger-line:nth-child(1) {
  transform: rotate(0deg) translate(0, 0);
}

.navbar-toggler.collapsed .hamburger-line:nth-child(2) {
  opacity: 1;
}

.navbar-toggler.collapsed .hamburger-line:nth-child(3) {
  transform: rotate(0deg) translate(0, 0);
}

.navbar-toggler:not(.collapsed) .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggler:not(.collapsed) .hamburger-line:nth-child(2) {
  opacity: 0;
}

.navbar-toggler:not(.collapsed) .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile menu dropdown */
.navbar-collapse {
  position: relative;
  width: 100%;
  left: 0;
  right: 0;
}

.navbar-nav {
  gap: 10px;
}

/* Slide down animation for mobile menu */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ensure menu closes when clicking outside */
.navbar-collapse.show {
  display: block !important;
}

/* Mobile-specific navbar styles */
@media (max-width: 991px) {
  .navbar {
    top: 15px;
    padding: 12px 25px;
    border-radius: 25px;
    width: 95%;
    max-width: none;
    left: 50%;
    transform: translateX(-50%);
  }

  .navbar:hover {
    transform: translateX(-50%);
  }

  .navbar-collapse {
    margin-left: 0;
    margin-right: 0;
    transform: none;
    position: static;
  }

  .navbar-nav {
    width: 100%;
    text-align: center;
  }

  .container-fluid {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-link {
    margin: 0;
    padding: 12px 20px !important;
    text-align: center;
    border-radius: 15px;
    transition: all 0.3s ease;
  }

  .nav-link:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateX(10px);
  }

  .nav-link::after {
    display: none;
  }

  .navbar-collapse.show {
    animation: slideDown 0.3s ease;
  }

  .navbar-collapse.collapsing {
    transition: height 0.3s ease;
  }
}

@media (max-width: 768px) {
  .navbar {
    top: 10px;
    padding: 10px 20px;
    width: 98%;
    left: 50%;
    transform: translateX(-50%);
  }

  .navbar-brand img {
    height: 28px;
  }

  .nav-link {
    font-size: 1rem;
    padding: 15px 20px !important;
  }
}

@media (max-width: 576px) {
  .navbar {
    top: 5px;
    padding: 8px 15px;
    width: calc(100% - 10px);
    border-radius: 20px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }

  .navbar-brand img {
    height: 25px;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 12px 15px !important;
  }

  .hamburger-line {
    width: 22px;
    height: 2.5px;
  }

  .navbar-toggler {
    width: 45px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .navbar {
    border-radius: 15px;
  }

  .navbar-collapse {
    border-radius: 15px;
    padding: 15px;
    margin-top: 10px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .navbar-brand img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .nav-link:hover {
    transform: none;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* iOS Device Detection and Upload Button Hiding */
/* Hide upload buttons on iOS devices */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  /* WebKit-based browsers (Safari, Chrome on iOS) */
  @supports (-webkit-touch-callout: none) {
    /* iOS-specific CSS */
    .up-button {
      display: none !important;
      visibility: hidden !important;
      opacity: 0 !important;
      pointer-events: none !important;
      position: absolute !important;
      left: -9999px !important;
      width: 1px !important;
      height: 1px !important;
      overflow: hidden !important;
    }
  }
}

/* Additional iOS detection using user agent targeting */
@media screen and (max-width: 1024px) {
  /* Target iOS devices more specifically */
  .up-button {
    /* Hide by default on mobile devices */
    display: none !important;
  }
}

/* Show upload buttons on non-iOS devices */
@media screen and (min-width: 1025px) {
  .up-button {
    display: block !important;
  }
}

/* JavaScript-based iOS detection fallback */
.ios-device .up-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
} 