/* CSS Custom Properties (Variables) */
:root {
  /* Colors */
  --primary-color: #ff4081;
  --primary-hover-color: #e91e63;
  --background-dark: #000000;
  --background-light: #ffffff;
  --text-primary: #000000;
  --text-secondary: #ffffff;
  --text-muted: #6b7280;
  --text-gray: #374151;
  --border-color: #e5e7eb;
  --border-dark: #4b5563;

  /* Typography */
  --font-primary: "Inter", sans-serif;
  --font-heading: "Inter", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Section Spacing */
  --section-padding-mobile: 7rem;
  --section-padding-tablet: 8rem;
  --section-padding-desktop: 8rem;
  --section-title-padding: 6rem;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;
  --text-8xl: 6rem;

  /* Header/Navigation */
  --header-background: rgba(0, 0, 0, 0.4);
  --header-text-color: #ffffff;
  --header-text-hover: var(--primary-color);
  --header-font: var(--font-primary);
  --header-font-weight: 600;

  /* Buttons */
  --button-primary-bg: var(--primary-color);
  --button-primary-text: #ffffff;
  --button-primary-hover: var(--primary-hover-color);
  --button-secondary-bg: #ffffff;
  --button-secondary-text: var(--primary-color);
  --button-secondary-hover: #f3f4f6;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;

  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

body {
  font-family: Arial, sans-serif;
}

.loading-spinner {
  border: 3px solid #2a2a2a;
  border-top: 3px solid #4ade80;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.accordion-content.open {
  max-height: 500px;
}

.chevron {
  transition: transform 0.3s ease;
}

.chevron.rotated {
  transform: rotate(180deg);
}

.leaderboard-container {
  height: 70vh;
  overflow-y: auto;
}

@media (max-width: 1023px) {
  .leaderboard-container {
    max-height: 50vh;
  }
}

.sticky-header {
  position: sticky;
  top: 0;
  background-color: #0a0a0a;
  z-index: 10;
  opacity: 0.8;
}

.leaderboard-container::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-container::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.leaderboard-container::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 3px;
}

.leaderboard-container::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

.faq-item {
  padding: 16px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 8px 0;
}

.faq-section {
  background-color: #070a0d;
  height: fit-content;
}

.faq-container {
  height: auto;
}

/* Navbar Scroll Blur Effect */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  backdrop-filter: blur(0px);
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 1s ease, backdrop-filter 1s ease;
  -webkit-transition: background-color 1s ease, backdrop-filter 1s ease;
  z-index: 9999;
}

/* Navbar blur only on desktop */
@media (min-width: 1024px) {
  #navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }
}

/* No blur for mobile and tablet */
@media (max-width: 1023px) {
  #navbar.scrolled {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Dynamic Island Styles - Fixed for all screen sizes */
.dynamic-island {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 50px;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dynamic-island:hover {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Dynamic Island - Fixed size and backdrop */
.dynamic-island-mobile {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dynamic-island-mobile:hover {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Fixed icon size for mobile */
.mobile-menu-icon {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

/* Tablet Dynamic Island */
.dynamic-island-tablet {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dynamic-island-tablet:hover {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Tablet icon size */
.tablet-menu-icon {
  width: 28px;
  height: 28px;
  stroke-width: 2.8;
}

/* Menu Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes menuExpand {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scale(1);
  }
}

@keyframes menuItemFadeIn {
  from {
    opacity: 0;
    transform: translateX(-20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.menu-slide-down {
  animation: slideDown 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-expand {
  animation: menuExpand 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item {
  animation: menuItemFadeIn 600ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Enhanced Backdrop Blur */
#tabletMenu {
  backdrop-filter: saturate(150%) blur(30px);
  -webkit-backdrop-filter: saturate(150%) blur(30px);
}

#mobileMenu {
  backdrop-filter: saturate(120%) blur(25px);
  -webkit-backdrop-filter: saturate(120%) blur(25px);
}

/* Glass Morphism Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Hover Effects for Menu Items */
.menu-item:hover {
  text-shadow: 0 0 20px currentColor;
  transform: translateY(-2px);
}

/* Close Button Enhancement */
#tabletCloseBtn {
  transition: all 0.3s ease;
}

#tabletCloseBtn:hover {
  transform: scale(1.1) rotate(90deg);
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile touch optimizations */
@media (max-width: 767px) {
  * {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
  .dynamic-island-tablet {
    padding: 14px 18px;
    border-radius: 18px;
  }

  .tablet-menu-icon {
    width: 26px;
    height: 26px;
    stroke-width: 3;
  }

  /* Remove navbar background on tablet */
  #navbar {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #navbar.scrolled {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Security Measures - Prevent Content Theft */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Allow text selection only for specific elements */
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Prevent drag and drop */
img,
video,
audio {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Make clickable elements work */
a,
button,
[role="button"],
input,
textarea,
select,
nav,
nav *,
#navbar,
#navbar * {
  pointer-events: auto !important;
}

/* Specific navigation bar fixes */
#navbar {
  pointer-events: auto !important;
}

#navbar *,
#navbar a,
#navbar button,
#navbar div {
  pointer-events: auto !important;
}

/* Navigation links specific fixes */
.nav-link {
  pointer-events: auto !important;
  cursor: pointer !important;
  display: inline-block !important;
}

/* Menu containers */
#mobileMenu,
#tabletMenu,
#mobileMenuBtn,
#tabletMenuBtn,
#tabletCloseBtn {
  pointer-events: auto !important;
}

/* Override any security measures that might block navbar */
#navbar,
#navbar *,
.nav-link,
#mobileMenuBtn,
#tabletMenuBtn,
#tabletCloseBtn {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Prevent text selection on specific elements */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Hide scrollbars to prevent easy navigation */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* Prevent highlighting */
::selection {
  background: transparent;
}
::-moz-selection {
  background: transparent;
}

/* Prevent print */
@media print {
  * {
    display: none !important;
  }
}

/* Mobile optimizations */
@media (max-width: 767px) {
  .dynamic-island-mobile {
    padding: 14px 18px;
    border-radius: 18px;
  }

  .mobile-menu-icon {
    width: 26px;
    height: 26px;
  }

  /* Remove navbar background on mobile */
  #navbar {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #navbar.scrolled {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
  }

  .hover\:-translate-y-1:hover {
    transform: none !important;
  }

  /* Simplify borders on mobile */
  .border-white\/20 {
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .hover\:border-white\/30:hover {
    border-color: rgba(255, 255, 255, 0.15) !important;
  }

  /* Remove blur effects from specific sections on mobile */
  #community .backdrop-blur-md,
  #access .backdrop-blur-xl,
  #matters .backdrop-blur-md {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.12) !important;
  }

  /* Optimize background patterns on mobile */
  .blur-3xl {
    filter: none !important;
    opacity: 0.03 !important;
  }

  .animate-pulse {
    animation: none !important;
  }

  /* Reduce section padding on mobile */
  section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .py-20,
  .py-24,
  .py-32 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .py-16 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  .pt-40 {
    padding-top: 8rem !important;
  }

  .pb-16 {
    padding-bottom: 1.5rem !important;
  }

  .mb-16,
  .mb-20 {
    margin-bottom: 1.5rem !important;
  }

  .mb-12 {
    margin-bottom: 1rem !important;
  }

  .pt-20 {
    padding-top: 2rem !important;
  }
}
