@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600&family=Rajdhani:wght@500&display=swap');

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a1020;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease-in-out;
}

.loading-spinner {
  text-align: center;
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.8);
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 4px solid rgba(0, 234, 255, 0.2);
  border-radius: 50%;
  border-top-color: #00eaff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner p {
  margin-top: 15px;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', 'Rajdhani', Arial, sans-serif;
  background: #0a1020;
  color: #e0eaff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  background: linear-gradient(120deg, #0a1020 80%, #1b6ef3 100%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  pointer-events: none;
  background: none;
}
body .cyber-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 2;
  position: relative;
  padding-left: 200px; /* Make space for player card */
}

/* Countdown Timer */
.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  color: #00eaff;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.8);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  border: 1px solid #00eaff;
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.3);
  margin: 0.5rem 0;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.countdown-timer span {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  font-weight: bold;
}

/* Player Card Styles */
/* Player Points */
.player-points {
  font-size: 1.4rem;
  font-weight: bold;
  color: #00eaff;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.8);
  margin-top: 0.8rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.3rem 1rem;
  border-radius: 15px;
  border: 1px solid #00eaff;
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.3);
  transition: all 0.3s ease;
}
.player-points:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.5);
}

/* Review Answers */
.review-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  color: #e0eaff;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.review-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #00eaff;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
  font-family: 'Orbitron', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 1px;
}

.score-summary {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: rgba(11, 22, 34, 0.6);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(58, 134, 255, 0.2);
}

.score-summary .score {
  font-size: 1.8rem;
  font-weight: 700;
  color: #3a86ff;
  margin-bottom: 0.5rem;
}

.score-summary .score span {
  background: linear-gradient(135deg, #3a86ff, #00eaff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.score-summary .correct-count {
  font-size: 1.1rem;
  color: #a0aec0;
}

.answers-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.answer-card {
  background: rgba(11, 22, 34, 0.8);
  border-radius: 10px;
  padding: 1.75rem;
  border-left: 5px solid #4a5568;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.answer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 234, 255, 0.1);
}

.answer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.answer-card.correct {
  border-left-color: #48bb78;
  background: linear-gradient(145deg, rgba(11, 22, 34, 0.8), rgba(72, 187, 120, 0.15));
}

.answer-card.incorrect {
  border-left-color: #f56565;
  background: linear-gradient(145deg, rgba(11, 22, 34, 0.8), rgba(245, 101, 101, 0.12));
}

.answer-card .question {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: #f7fafc;
  line-height: 1.5;
  position: relative;
  padding-left: 1.5rem;
}

.answer-card .question::before {
  content: 'Q';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #4a5568;
}

.answer-card.correct .question::before {
  color: #48bb78;
}

.answer-card.incorrect .question::before {
  color: #f56565;
}

.answer-details {
  padding-left: 1.5rem;
  border-left: 2px solid rgba(74, 85, 104, 0.3);
  margin-left: 0.25rem;
}

.answer-card .correct-answer,
.answer-card .your-answer,
.answer-card .explanation {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.answer-card .correct-answer {
  background: rgba(72, 187, 120, 0.1);
  color: #9ae6b4;
  border-left: 3px solid #48bb78;
}

.answer-card .your-answer {
  background: rgba(245, 101, 101, 0.1);
  color: #feb2b2;
  border-left: 3px solid #f56565;
}

.answer-card .explanation {
  background: rgba(159, 122, 234, 0.1);
  color: #b794f4;
  border-left: 3px solid #9f7aea;
  margin-top: 1.25rem;
  font-style: italic;
}

.answer-card .correct-answer::before,
.answer-card .your-answer::before {
  content: '';
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.answer-card .correct-answer::before {
  content: '✓';
  background: rgba(72, 187, 120, 0.2);
  color: #48bb78;
}

.answer-card .your-answer::before {
  content: '✗';
  background: rgba(245, 101, 101, 0.2);
  color: #f56565;
}

.answer-card .explanation::before {
  content: '💡';
  margin-right: 0.5rem;
  font-style: normal;
}

.review-actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.review-actions .btn-primary,
.review-actions .btn-secondary {
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: 180px;
  text-align: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.review-actions .btn-primary {
  background: linear-gradient(135deg, #3a86ff 0%, #2667cc 100%);
  color: white;
}

.review-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(58, 134, 255, 0.25);
}

.review-actions .btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(58, 134, 255, 0.25);
}

.review-actions .btn-secondary {
  background: rgba(74, 85, 104, 0.5);
  color: #e2e8f0;
  border: 1px solid rgba(74, 85, 104, 0.5);
}

.review-actions .btn-secondary:hover {
  background: rgba(74, 85, 104, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.review-actions .btn-secondary:active {
  transform: translateY(1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .review-container {
    padding: 1.5rem 1rem;
  }
  
  .review-container h2 {
    font-size: 1.8rem;
  }
  
  .answer-card {
    padding: 1.5rem 1.25rem;
  }
  
  .answer-card .question {
    font-size: 1.1rem;
  }
  
  .review-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .review-actions .btn-primary,
  .review-actions .btn-secondary {
    width: 100%;
    margin: 0;
  }
}

/* Animation for answer cards */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.answer-card {
  animation: slideIn 0.4s ease-out forwards;
  opacity: 0;
}

.answer-card:nth-child(1) { animation-delay: 0.1s; }
.answer-card:nth-child(2) { animation-delay: 0.2s; }
.answer-card:nth-child(3) { animation-delay: 0.3s; }
.answer-card:nth-child(4) { animation-delay: 0.4s; }
.answer-card:nth-child(5) { animation-delay: 0.5s; }
.answer-card:nth-child(6) { animation-delay: 0.6s; }
.answer-card:nth-child(7) { animation-delay: 0.7s; }

/* Animation for answer cards */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.answer-card {
  animation: slideIn 0.4s ease-out forwards;
  opacity: 0;
}

.answer-card:nth-child(1) { animation-delay: 0.1s; }
.answer-card:nth-child(2) { animation-delay: 0.2s; }
.answer-card:nth-child(3) { animation-delay: 0.3s; }
.answer-card:nth-child(4) { animation-delay: 0.4s; }
.answer-card:nth-child(5) { animation-delay: 0.5s; }
.answer-card:nth-child(6) { animation-delay: 0.6s; }
.answer-card:nth-child(7) { animation-delay: 0.7s; }

.cyber-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: transparent;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1000; /* Increased z-index to ensure header stays on top */
}

.header-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.header-right {
  margin-left: auto;
}

.header-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.cyber-header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #00eaff;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  flex-grow: 1;
  padding: 0 1rem;
}

/* Player card container */
#playerCard {
  /* Layout */
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  
  /* Sizing */
  width: 100% !important;
  min-height: 70px !important;
  padding: 0.8rem 1.5rem !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  max-width: 320px;
  
  /* Styling */
  background: linear-gradient(145deg, rgba(10, 20, 40, 0.95), rgba(20, 40, 80, 0.95)) !important;
  border: 1px solid #00eaff !important;
  border-radius: 16px !important;
  box-shadow: 
    0 0 15px rgba(0, 234, 255, 0.4),
    inset 0 0 10px rgba(0, 180, 255, 0.2) !important;
  backdrop-filter: blur(8px) !important;
  position: relative;
  overflow: hidden;
  
  /* Glow effect */
  &::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 234, 255, 0.1) 0%, rgba(0, 234, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  
  /* Interaction */
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  
  /* Ensure it's always on top and visible */
  will-change: transform, opacity, box-shadow;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* Prevent text overflow */
  min-width: 0;
  
  /* Corner accents */
  &::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00eaff;
    box-shadow: 0 0 10px #00eaff;
    transition: all 0.3s ease;
  }
  
  &::after {
    bottom: -1px;
    right: -1px;
    clip-path: polygon(100% 0, 0% 100%, 100% 100%);
  }
  
  &::before {
    top: -1px;
    left: -1px;
    clip-path: polygon(0 0, 0% 100%, 100% 0);
  }
}

/* Hover effect for player card */
#playerCard:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 
    0 5px 25px rgba(0, 234, 255, 0.6),
    inset 0 0 15px rgba(0, 180, 255, 0.3) !important;
  
  &::before {
    opacity: 0.5;
  }
  
  .player-avatar {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.5);
  }
  
  .player-points {
    background: linear-gradient(90deg, rgba(0, 180, 255, 0.3), rgba(0, 220, 255, 0.2));
    transform: translateY(-1px);
  }
}

/* Adjust player avatar for header layout */
#playerCard .player-avatar {
  width: 40px !important;
  height: 40px !important;
  font-size: 1rem !important;
  margin-right: 1rem !important;
  border-radius: 14px !important;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #00eaff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 15px rgba(0, 180, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

#playerCard .avatar-placeholder {
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

/* Adjust player details for header layout */
#playerCard .player-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left;
  line-height: 1.2;
  flex-grow: 1;
  min-width: 0;
}

/* Player name in header */
#playerCard .player-name {
  margin: 0 0 0.2rem 0 !important;
  font-size: 1.1rem !important;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.7);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

/* Player points in header */
#playerCard .player-points {
  margin: 0.2rem 0 0 0 !important;
  font-size: 0.95rem !important;
  padding: 0.4rem 0.8rem !important;
  border-radius: 8px !important;
  background: linear-gradient(90deg, rgba(0, 150, 255, 0.2), rgba(0, 200, 255, 0.1));
  color: #00eaff;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(0, 234, 255, 0.3);
  box-shadow: inset 0 0 10px rgba(0, 180, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  &::before {
    content: '⚡';
    margin-right: 0.4rem;
    font-size: 1.1em;
    filter: drop-shadow(0 0 3px #00eaff);
  }
  
  &:hover {
    background: linear-gradient(90deg, rgba(0, 180, 255, 0.3), rgba(0, 220, 255, 0.2));
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.3);
  }
}

/* Desktop Styles */
@media (min-width: 769px) {
  .cyber-header {
    flex-direction: row;
    padding: 1rem 2rem;
    justify-content: space-between;
    align-items: center;
  }
  
  .header-content {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin: 0;
  }
  
  .header-left {
    order: 1;
    justify-content: flex-start;
    margin-right: auto;
  }
  
  .header-right {
    order: 2;
    margin-left: auto;
  }
  
  .cyber-header h1 {
    order: 0;
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
    margin: 0 auto;
    width: fit-content;
  }

/* Mobile Menu Toggle - Base styles */
.mobile-menu-toggle {
  display: none; /* Will be shown on mobile */
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  margin: 0 5px 0 0;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
  color: #00eaff;
  font-size: 1.5rem;
  padding: 0;
}

/* Hover and active states */
.mobile-menu-toggle:hover {
  color: #00ffff;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
}

.mobile-menu-toggle:active {
  background: rgba(0, 234, 255, 0.1);
}

/* Focus state for accessibility */
.mobile-menu-toggle:focus {
  outline: 2px solid #00eaff;
  outline-offset: 2px;
}

/* Active state - changes to X */
.mobile-menu-toggle.active .fa-bars::before {
  content: '\f00d'; /* Font Awesome X icon */
}

  /* Mobile menu styles - Matches Desktop Design */
  #mobileMenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 16, 32, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 234, 255, 0.2);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1100;
    padding: 2rem 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease, opacity 0.2s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  
  /* Hide on desktop by default */
  @media (min-width: 769px) {
    display: none !important;
  }
}

#mobileMenu.active {
  transform: translateX(0);
  -webkit-transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

/* Mobile menu overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1099;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile menu header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 234, 255, 0.2);
  margin-bottom: 1.5rem;
}

.mobile-menu-header h2 {
  color: #00eaff;
  margin: 0;
  font-size: 1.3rem;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.7);
}

/* Mobile menu close button */
.menu-close-btn {
  background: transparent;
  border: 1px solid rgba(0, 234, 255, 0.3);
  color: #00eaff;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menu-close-btn:hover {
  background: rgba(0, 234, 255, 0.1);
  border-color: #00eaff;
}

/* Menu open state */
.menu-open {
  overflow: hidden;
}

/* Mobile styles */
@media (max-width: 768px) {
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1001;
    position: relative;
    order: 1; /* Ensure it's at the start of the flex container */
  }
  
  /* Show mobile menu */
  #mobileMenu {
    display: block;
  }
  
  /* Adjust main content padding for fixed header */
  main {
    padding-top: 80px;
  }
  
  /* Hide desktop menu items on mobile */
  .desktop-menu {
    display: none !important;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
  }
  
  /* Hide mobile menu toggle on desktop */
  #mobileMenuToggle {
    display: none !important;
  }
  
  /* Style desktop navigation */
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: static;
    background: transparent;
    height: auto;
    width: auto;
    padding: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  
  /* Style desktop player card */
  .desktop-nav .player-card {
    display: flex !important;
    align-items: center;
    background: rgba(20, 30, 60, 0.8);
    border: 1px solid #00eaff;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin: 0;
    transition: all 0.3s ease;
    min-width: 200px;
    cursor: pointer;
  }
  
  .desktop-nav .player-card:hover {
    background: rgba(30, 40, 80, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 234, 255, 0.2);
  }
  
  /* Removed duplicate hover style */
  
  .desktop-nav .player-avatar {
    width: 40px !important;
    height: 40px !important;
    margin-right: 0.75rem;
  }
  
  .desktop-nav .player-details {
    display: flex;
    flex-direction: column;
  }
  
  .desktop-nav .player-name {
    font-size: 0.95rem !important;
    font-weight: 600;
    color: #fff;
    margin: 0 !important;
    white-space: nowrap;
  }
  
  .desktop-nav .player-points {
    font-size: 0.85rem !important;
    color: #00eaff;
    margin: 0.1rem 0 0 0 !important;
    padding: 0.2rem 0.5rem !important;
    background: rgba(0, 234, 255, 0.1);
    border-radius: 12px;
    align-self: flex-start;
  }
  
  /* Style desktop action buttons */
  .desktop-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: 0.5rem;
  }
  
  .desktop-actions .btn-secondary {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    background: rgba(0, 234, 255, 0.1);
    border: 1px solid #00eaff;
    color: #00eaff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  
  .desktop-actions .btn-secondary:hover {
    background: rgba(0, 234, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 234, 255, 0.3);
  }
  
  .desktop-actions .btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 234, 255, 0.3);
  }
  
  .desktop-actions .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
      transparent, 
      rgba(0, 234, 255, 0.2), 
      transparent);
    transition: 0.5s;
  }
  
  .desktop-actions .btn-secondary:hover::before {
    left: 100%;
  }
  
  .desktop-actions .btn-secondary:hover {
    background: rgba(0, 234, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 234, 255, 0.2);
  }
  
  .desktop-actions .btn-secondary:active {
    transform: translateY(0);
  }
  
  /* Hide mobile menu and player info on desktop */
  #mobileMenu,
  .player-info-mobile {
    display: none !important;
  }
}
  
  /* Header styles moved to media query */
  
  /* Show player card on desktop */
  #playerCard {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 234, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin: 0;
  }
  
  /* Hide mobile points display on desktop */
  .player-info-mobile {
    display: none !important;
  }
  
  /* Ensure header is not fixed on desktop */
  .cyber-header {
    position: relative;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 1rem 2rem;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
  }
  
  .header-content {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
  }
  
  .cyber-header h1 {
    position: static;
    transform: none;
    margin: 0;
    text-align: center;
  }
  
  /* Style action buttons */
  .mobile-menu-actions button {
    color: #00eaff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 234, 255, 0.3);
    border-radius: 4px;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
  }
  
  .mobile-menu-actions button:hover {
    background: rgba(0, 234, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 234, 255, 0.2);
  }
  
  /* Adjust player info in card */
  #playerCard .player-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  #playerCard .player-name {
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
  }
  
  #playerCard .player-badge {
    font-size: 0.8rem;
    color: #00eaff;
  }
}

/* Animation is now handled by JavaScript */

#mainContent {
  position: relative;
  z-index: 1;
}

.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  
  & button {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00eaff;
    color: #00eaff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
    
    &:hover {
      background: rgba(0, 234, 255, 0.1);
      box-shadow: 0 0 15px rgba(0, 234, 255, 0.4);
      transform: translateY(-2px);
    }
    
    &:active {
      transform: translateY(0);
      box-shadow: 0 0 8px rgba(0, 234, 255, 0.2);
    }
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(0, 234, 255, 0.1), transparent);
      transform: translateX(-100%);
      transition: transform 0.6s;
      z-index: -1;
    }
    
    &:hover {
      background: rgba(0, 234, 255, 0.1);
      box-shadow: 0 0 15px rgba(0, 234, 255, 0.3);
      transform: translateY(-2px);
      
      &::before {
        transform: translateX(100%);
      }
    }
    
    &:active {
      transform: translateY(0);
    }
  }
  margin-top: 2rem;
}

.player-info-mobile {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
}

.player-info-mobile .player-points {
  background: rgba(0, 234, 255, 0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.9rem;
}

/* Leaderboard styles */
.leaderboard-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 15px;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.leaderboard-content {
    width: 100%;
    max-width: min(95%, 800px);
    background: rgba(10, 15, 30, 0.97);
    border: 2px solid #00ff9d;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.3);
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
    padding: 20px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 100px;
    padding: 12px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid #00ff9d;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    color: #00ff9d;
    margin: -20px -20px 15px -20px;
    padding: 12px 20px;
    gap: 10px;
}

.leaderboard-entries {
    flex: 1;
    overflow-y: auto;
    margin: 0 -10px;
    padding: 0 10px;
    max-height: 60vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 157, 0.5) rgba(0, 0, 0, 0.2);
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 60px 1fr 100px;
    padding: 10px 5px;
    margin: 4px 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    align-items: center;
    gap: 8px;
}

.leaderboard-entry:hover {
    background: rgba(0, 255, 157, 0.1);
    transform: translateX(3px);
}

.leaderboard-entry.current-player {
    background: rgba(0, 255, 157, 0.2);
    border-left: 3px solid #00ff9d;
}

.leaderboard-rank {
    font-weight: bold;
    color: #00ff9d;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-align: center;
}

.leaderboard-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-score {
    text-align: right;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: #00ff9d;
    padding-right: 5px;
}

.leaderboard-footer {
    display: flex;
    justify-content: center;
    padding: 15px 0 5px;
    margin-top: 10px;
    border-top: 1px solid rgba(0, 255, 157, 0.3);
}

.player-rank {
    text-align: center;
    margin: 1rem 0;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-size: 1rem;
    color: #00ff9d;
}

/* Scrollbar styles */
.leaderboard-entries::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.leaderboard-entries::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.leaderboard-entries::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 157, 0.4);
    border-radius: 4px;
}

.leaderboard-entries::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 157, 0.7);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .leaderboard-container {
        padding: 10px;
    }
    
    .leaderboard-content {
        padding: 15px;
        border-radius: 8px;
    }
    
    .leaderboard-header {
        grid-template-columns: 50px 1fr 80px;
        padding: 10px 8px;
        font-size: 0.75rem;
        margin: -15px -15px 10px -15px;
        padding: 10px 15px;
    }
    
    .leaderboard-entry {
        grid-template-columns: 50px 1fr 80px;
        padding: 8px 4px;
        font-size: 0.85rem;
    }
    
    .leaderboard-rank {
        font-size: 0.85rem;
    }
    
    .leaderboard-name {
        font-size: 0.85rem;
    }
    
    .leaderboard-score {
        font-size: 0.85rem;
    }
    
    .player-rank {
        font-size: 0.95rem;
        padding: 0.7rem;
        margin: 0.8rem 0;
    }
}

@media (max-width: 400px) {
    .leaderboard-header {
        grid-template-columns: 40px 1fr 70px;
        font-size: 0.7rem;
        padding: 8px 5px;
        margin: -15px -15px 8px -15px;
    }
    
    .leaderboard-entry {
        grid-template-columns: 40px 1fr 70px;
        padding: 6px 3px;
        font-size: 0.8rem;
    }
    
    .leaderboard-rank {
        font-size: 0.8rem;
    }
    
    .leaderboard-name {
        font-size: 0.8rem;
    }
    
    .leaderboard-score {
        font-size: 0.8rem;
    }
    
    .you-badge {
        font-size: 0.7rem;
    }
    
    .player-rank {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
}

/* Leaderboard header styles */
.leaderboard-header {
    border-bottom: 2px solid #00ff9d;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Leaderboard search */
.leaderboard-search {
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(0, 255, 157, 0.2);
}

.search-input {
  width: 100%;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 157, 0.4);
  border-radius: 20px;
  color: #e0eaff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #00ff9d;
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.search-input::placeholder {
  color: rgba(224, 234, 255, 0.5);
}

/* Leaderboard entries wrapper */
.leaderboard-entries-wrapper {
  flex: 1;
  overflow: hidden;
  margin: 0 -10px;
  padding: 0 10px;
}

.leaderboard-entries {
  margin: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.leaderboard-entry:hover {
    background: rgba(0, 255, 157, 0.1);
    transform: translateX(5px);
}

.leaderboard-entry.you {
    background: rgba(0, 255, 157, 0.2);
    border-left: 3px solid #00ff9d;
}

.leaderboard-rank {
    font-weight: bold;
    color: #00ff9d;
}

.leaderboard-name {
    font-weight: 500;
}

.leaderboard-score {
    text-align: right;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
}

/* Leaderboard actions */
.leaderboard-actions {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    border-top: 1px solid rgba(0, 255, 157, 0.2);
    margin-top: 1rem;
    text-align: center;
}

.leaderboard-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
}

.loading {
    text-align: center;
    padding: 3rem 2rem;
    color: #00ff9d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 255, 157, 0.3);
    border-radius: 50%;
    border-top-color: #00ff9d;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #ff6b6b;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 8px;
    margin: 1rem 0;
}

.error-message p {
    margin-bottom: 1rem;
}

.btn-retry, .btn-primary {
    background: #00ff9d;
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-retry:hover, .btn-primary:hover {
    background: #00cc7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 157, 0.2);
}

.no-entries {
    text-align: center;
    padding: 2rem;
    color: #aaa;
    font-style: italic;
}

.you-badge {
    background: rgba(0, 255, 157, 0.2);
    color: #00ff9d;
    font-size: 0.8em;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

/* Scrollbar styles */
.leaderboard-entries::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-entries::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.leaderboard-entries::-webkit-scrollbar-thumb {
    background: #00ff9d;
    border-radius: 4px;
}

.leaderboard-entries::-webkit-scrollbar-thumb:hover {
    background: #00cc7a;
}

/* How to Play Styles */
.how-to-play {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  color: #e0e0e0;
  text-align: center;
}

.how-to-play h2 {
  color: #00eaff;
  margin-bottom: 2rem;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.instructions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  text-align: left;
}

.instruction-item {
  background: rgba(10, 15, 26, 0.8);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #00eaff;
  transition: transform 0.3s ease;
}

.instruction-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 234, 255, 0.2);
}

.instruction-item h3 {
  color: #00eaff;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.instruction-item p {
  margin: 0;
  color: #b0b0b0;
  line-height: 1.5;
}

/* Hide any test messages */
body::after {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  content: none !important;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
  /* Header styles */
  .cyber-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 16, 32, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }

  /* Ensure header content is properly aligned */
  .header-content {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding: 0 10px;
  }

  /* Mobile menu toggle button */
  .mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1001;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    order: 1; /* Ensure it's at the start of the flex container */
    margin-right: 5px;
  }

  .mobile-menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #00eaff;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
  }

  .mobile-menu-toggle span:nth-child(1) {
    top: 5px;
  }

  .mobile-menu-toggle span:nth-child(2),
  .mobile-menu-toggle span:nth-child(3) {
    top: 15px;
  }

  .mobile-menu-toggle span:nth-child(4) {
    top: 25px;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    top: 15px;
    width: 0%;
    left: 50%;
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    transform: rotate(45deg);
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
  }

  .mobile-menu-toggle.active span:nth-child(4) {
    top: 15px;
    width: 0%;
    left: 50%;
  }

  /* Mobile menu styles */
  .mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 16, 32, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding: 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
  }

  .mobile-menu.active {
    transform: translateX(0);
  }

  /* Mobile menu content */
  .mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
  }

  .mobile-menu-actions .btn-secondary {
    color: #00eaff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    width: 100%;
    max-width: 280px;
    margin: 0.5rem auto;
    display: block;
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
  }
  
  .mobile-menu-actions button:hover {
    background: rgba(0, 234, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.4);
    transform: translateY(-2px);
  }
  
  .mobile-menu-actions button:active {
    transform: translateY(0);
  }
  /* Hide points tab on mobile */
  .player-info-mobile {
    display: none !important;
  }
  
  /* Mobile menu buttons - Matches Desktop Buttons */
  .mobile-menu-actions {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .mobile-menu-actions button {
    background: rgba(0, 234, 255, 0.1);
    border: 1px solid #00eaff;
    color: #00eaff;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
    position: relative;
    overflow: hidden;
  }
  
  .mobile-menu-actions button:hover {
    background: rgba(0, 234, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.4);
    transform: translateY(-2px);
  }
  
  .mobile-menu-actions button:active {
    transform: translateY(0);
  }
  #app {
    padding-left: 0;
    padding-top: 60px; /* Make space for fixed header */
  }
  
  /* Ensure mobile menu toggle is visible on mobile */
  .mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1001 !important;
    position: relative;
    z-index: 1102; /* Above header */
  }
  
  /* Enhanced Mobile Header - Matches Desktop Style */
  .cyber-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 16, 32, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 234, 255, 0.2);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
  }
  
  .header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px 0 15px; /* Added left padding to move title left */
  }
  
  /* Ensure the title doesn't overlap with the toggle */
  .header-content h1 {
    font-size: 1.3rem;
    margin: 0;
    color: #00eaff;
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.7);
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
    margin-left: 0.5rem;
  }
  
  .cyber-header h1 {
    font-size: 1.3rem;
    margin: 0;
    color: #00eaff;
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.7);
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
  }
  
  .player-info-mobile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    padding-right: 1rem;
  }
  
  .player-points {
    background: rgba(0, 234, 255, 0.1);
    border: 1px solid rgba(0, 234, 255, 0.3);
    color: #00eaff;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
  }
  
  /* Mobile Menu Toggle - Matches Desktop Style */
  .mobile-menu-toggle {
    display: none; /* Will be overridden by media query */
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 30px;
    background: transparent;
    border: 1px solid rgba(0, 234, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1102;
    position: relative;
    margin-right: 0.5rem;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-toggle:hover {
    background: rgba(0, 234, 255, 0.1);
    border-color: #00eaff;
  }

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: rgba(10, 20, 40, 0.95);
  border: 1px solid rgba(0, 234, 255, 0.3);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.2);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(0, 234, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: #00eaff;
  font-size: 1.5rem;
  font-family: 'Orbitron', sans-serif;
}

.close-modal {
  background: transparent;
  border: none;
  color: #00eaff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0 10px;
  line-height: 1;
  transition: all 0.2s ease;
}

.close-modal:hover {
  color: #fff;
  transform: scale(1.1);
}

.modal-body {
  padding: 20px;
  color: #e0e0e0;
  line-height: 1.6;
}

.modal-body h3 {
  color: #00eaff;
  margin-top: 0;
  font-family: 'Orbitron', sans-serif;
}

.modal-body ol {
  padding-left: 20px;
}

.modal-body li {
  margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .modal-header h2 {
    font-size: 1.3rem;
  }
  
  .modal-body {
    padding: 15px;
  }
}

/* ===== Mobile Header Styles ===== */
@media (max-width: 768px) {
  body {
    padding-top: 12px; /* Add space at the top of the page */
  }
  
  .countdown-timer {
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
    margin: 0.3rem auto;
    order: 1;
    width: 100%;
    max-width: 280px;
  }
  
  .countdown-timer span {
    min-width: 24px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 10px;
  }
  
  .header-content h1 {
    margin-bottom: 0;
  }
  
  .cyber-header {
    padding: 6px 0 0; /* Add padding to the top of the header */
    background: rgba(10, 26, 48, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 234, 255, 0.2);
    position: fixed;
    top: 12px; /* Push the header down from the top */
    left: 0;
    right: 0;
    z-index: 1000;
    height: 72px; /* Increase height to accommodate the extra space */
    display: flex;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 12px 12px; /* Add rounded corners to bottom */
  }

  .header-container {
    width: 100%;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0 auto;
    max-width: 100%;
    position: relative;
  }
  
  /* Hide desktop elements on mobile */
  .desktop-nav,
  #playerCard {
    display: none !important;
  }
  
  .mobile-menu-toggle:hover {
    background: rgba(0, 234, 255, 0.2);
    border-color: #00eaff;
  }
  
  .header-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    position: relative;
    padding: 10px 0 6px;
  }
  
  .cyber-header h1 {
    font-size: 0.95rem;
    text-align: center;
    width: 100%;
    margin: 4px 0 8px 0;
    padding: 0 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.9);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
  }
  
  /* Show mobile header elements on mobile */
  /* Mobile header actions */
  .header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 8px;
    height: 32px;
  }
  
  /* Player card mobile */
  .player-card-mobile {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 234, 255, 0.3);
    border-radius: 18px;
    padding: 10px 16px 10px 10px;
    gap: 10px;
    height: 46px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
  }
  
  .player-avatar {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 50%;
    background: rgba(0, 234, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00eaff;
    font-size: 1rem;
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.4);
  }
  
  .player-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
  }
  
  .player-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
    line-height: 1.2;
  }
  
  .player-points {
    font-size: 0.85rem;
    color: #00eaff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 234, 255, 0.7);
    letter-spacing: 0.5px;
    margin-top: 2px;
  }
  
  /* Header buttons */
  .header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 0 10px;
  }
  
  .header-buttons .btn-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    font-size: 1.5rem !important;
    border-radius: 12px !important;
    background: rgba(0, 234, 255, 0.15) !important;
    border: 1px solid rgba(0, 234, 255, 0.4) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important; /* Remove any padding that might affect icon centering */
  }
  
  /* Specific adjustment for the trophy icon */
  #leaderboardBtn i.fa-trophy {
    margin-right: 1px; /* Fine-tune the trophy icon position */
  }
  
  .header-buttons .btn-icon:hover {
    transform: translateY(-2px) scale(1.05) !important;
    background: rgba(0, 234, 255, 0.25) !important;
    box-shadow: 0 4px 12px rgba(0, 234, 255, 0.3) !important;
  }
  
  .header-buttons .btn-icon:active {
    transform: scale(0.95) !important;
    box-shadow: 0 1px 4px rgba(0, 234, 255, 0.2) !important;
  }
  
  .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 234, 255, 0.1);
    border: 1px solid rgba(0, 234, 255, 0.3);
    color: #00eaff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
  }
  
  .btn-icon:active {
    transform: scale(0.95);
    background: rgba(0, 234, 255, 0.25);
    box-shadow: 0 1px 4px rgba(0, 234, 255, 0.2);
  }
  
  /* Hide desktop navigation on mobile */
  .desktop-nav {
    display: none !important;
  }
  
  /* Adjust main content padding to account for fixed header */
  main {
    padding-top: 84px; /* Increased to account for the extra space above header */
  }
  
  /* Optimize for very small screens */
  @media (max-width: 480px) {
    .cyber-header h1 {
      font-size: 0.9rem;
      letter-spacing: 0.3px;
    }
    
    .header-container {
      padding: 0 8px;
    }
    
    .player-name {
      max-width: 80px;
    }
    
    .player-card-mobile {
      padding: 2px 8px 2px 2px;
      border-radius: 16px;
    }
    
    .player-avatar {
      width: 20px !important;
      height: 20px !important;
      min-width: 20px !important;
      min-height: 20px !important;
      font-size: 0.6rem !important;
    }
    
    .player-name {
      font-size: 0.65rem;
    }
    
    .player-points {
      font-size: 0.6rem;
    }
    
    .btn-icon {
      width: 30px;
      height: 30px;
      font-size: 0.8rem;
    }
  }
  
  /* Extra small devices */
  @media (max-width: 360px) {
    .cyber-header h1 {
      font-size: 0.8rem;
    }
    
    .player-name {
      max-width: 65px;
      font-size: 0.6rem;
    }
    
    .player-points {
      font-size: 0.55rem;
    }
    
    .btn-icon {
      width: 28px;
      height: 28px;
    }
  }
}

  /* Button hover effect */
  .btn-icon:hover {
    background: rgba(0, 234, 255, 0.2);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 234, 255, 0.3);
  }
  
  .player-points {
    background: rgba(0, 234, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #00eaff;
    white-space: nowrap;
  }
  
  .cyber-header {
    width: 100%;
    padding: 1rem;
    position: relative;
    background: transparent;
  }
  
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  /* Hide regular player card on mobile */
  #playerCard {
    display: none !important;
  }
  
  /* Show player card on desktop */
  @media (min-width: 769px) {
    #playerCard {
      display: flex !important;
    }
  }
  
  .cyber-header h1 {
    order: 2;
    margin: 0;
    padding: 0.5rem 0;
  }
  
  /* Hide desktop elements on mobile */
  .header-left,
  .header-right {
    display: none;
  }
  
  .cyber-header h1 {
    font-size: 1.3rem;
    text-align: center;
    margin: 0;
    flex-grow: 1;
  }
  
  /* Player Card Mobile Styles */
  #playerCard {
    width: auto !important;
    max-width: 100% !important;
    margin: 1rem 0 0 0 !important;
    padding: 0.8rem 1.5rem !important;
    min-height: 85px !important;
    height: auto !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    position: relative;
  }
  
  .player-avatar {
    flex-shrink: 0;
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
    margin: 0 1rem 0 0 !important;
  }
  
  .player-info {
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
  }
  
  .player-name {
    font-size: 0.9rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .player-points {
    font-size: 1.1rem !important;
    padding: 0.2rem 0.8rem !important;
    margin: 0 !important;
    white-space: nowrap;
  }
  }
  
  .logo-wrap {
    margin: 0 auto;
    text-align: center;
    order: 0;
    width: 100%;
    padding: 0.25rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .cyber-header h1 {
    font-size: 1.5rem;
    padding: 0;
    text-align: center;
    width: 100%;
    order: 0;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  #playerCard {
    position: relative !important;
    transform: none !important;
    margin: 0.75rem auto !important;
    width: calc(100% - 1.5rem) !important;
    max-width: 500px !important;
    min-height: 80px !important;
    padding: 0.75rem 1.25rem !important;
    order: 2;
    box-sizing: border-box;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    overflow: hidden !important;
    background: linear-gradient(145deg, rgba(10, 20, 40, 0.95), rgba(20, 40, 80, 0.95)) !important;
    border: 1px solid rgba(0, 240, 255, 0.3) !important;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2) !important;
    transition: all 0.3s ease !important;
  }
  
  #playerCard .player-avatar {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    margin: 0 1rem 0 0 !important;
    border-radius: 10px !important;
    border: 1px solid rgba(0, 240, 255, 0.6) !important;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3) !important;
    flex-shrink: 0;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.3);
  }
  
  #playerCard .player-name {
    font-size: 1.1rem !important;
    margin: 0 1rem 0 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    color: #00f0ff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.25rem 0;
  }
  
  #playerCard .player-points {
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    border: 1px solid #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
    text-align: center;
    transition: all 0.2s ease;
    transform: none !important;
    position: relative;
    z-index: 1;
  }
  
  #playerCard .player-points::before {
    content: '⚡';
    font-size: 0.9em;
    margin-right: 0.4rem;
    display: inline-block;
    animation: pulse 1.5s infinite;
  }
  
  @keyframes pulse {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.7; transform: scale(1); }
  }
  
  /* Adjust main content spacing */
  main {
    padding: 1rem 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Ensure content doesn't overflow */
  .container {
    padding: 0 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Optimize for very small screens */
  @media (max-width: 480px) {
    .cyber-header {
      padding: 0.5rem;
    }
    
    .cyber-header h1 {
      font-size: 1.3rem;
      max-width: 100%;
    }
    
    #playerCard {
      padding: 0.7rem 1rem !important;
      min-height: 65px !important;
    }
    
    #playerCard .player-avatar {
      width: 44px !important;
      height: 44px !important;
      min-width: 44px !important;
      min-height: 44px !important;
    }
    
    #playerCard .player-name {
      font-size: 0.95rem !important;
      max-width: none !important;
      padding: 0.3rem 0.8rem !important;
    }
    
    #playerCard .player-points {
      font-size: 0.9rem !important;
      padding: 0.3rem 0.8rem !important;
    }
    
    /* Center the leaderboard button */
    .leaderboard-btn {
      margin: 0.5rem auto !important;
      display: block !important;
    }
  }
  
    /* Extra small devices (phones, 360px and down) */
  @media (max-width: 360px) {
    .cyber-header h1 {
      font-size: 1.2rem;
      max-width: 100%;
    }
    
    #playerCard .player-name {
      max-width: 140px !important;
      font-size: 0.9rem !important;
    }
    
    #playerCard .player-points {
      padding: 0.25rem 0.6rem !important;
      font-size: 0.85rem !important;
    }
  }

/* Challenges Container */
#challenges-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: block !important;
}

/* Challenge Section */
.challenge-section {
  margin-bottom: 3rem;
  background: rgba(10, 16, 32, 0.8);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(0, 234, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.section-title {
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

.section-badge {
  background: #ff3366;
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  align-self: center;
  animation: pulse 2s infinite;
}

.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Make sure the container is visible */
#challenges-container {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Hide leaderboard by default */
#leaderboard-container {
  display: none !important;
}

/* Ensure player card is visible when player data exists */
body:not(.no-player) #playerCard {
  display: flex !important;
}

/* Hide mobile header elements on desktop */
@media (min-width: 769px) {
  .header-actions,
  .player-card-mobile,
  .header-buttons {
    display: none !important;
  }
  
  /* Ensure desktop navigation is visible */
  .desktop-nav {
    display: flex !important;
  }
}

/* Hide player card only when explicitly set */
#playerCard[style*="display: none"],
#playerCard[style*="display:none"] {
  display: none !important;
}

/* Player card hover effect for desktop */
@media (min-width: 769px) {
  #playerCard:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 234, 255, 0.3);
  }
}

.player-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0a1020;
  margin: 0 auto 1rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #00eaff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-details {
  text-align: center;
}

.player-name {
  color: #00eaff;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-points {
  color: #ff00cc;
  font-size: 1rem;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 0, 204, 0.5);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  opacity: 1;
  transition: opacity 0.3s ease-out;
  pointer-events: auto;
}

.modal-overlay[style*="opacity: 0"],
.modal-overlay[style*="opacity:0"] {
  pointer-events: none;
}

.modal-content {
  background: #0e1424;
  border: 2px solid #00eaff;
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 30px rgba(0, 234, 255, 0.3);
  text-align: center;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-content h3 {
  color: #00eaff;
  margin-top: 0;
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

.modal-content p {
  color: #a0bfff;
  margin-bottom: 1.5rem;
}

.modal-content input {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  background: #0a1020;
  border: 2px solid #00eaff;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
}

.modal-content input:focus {
  border-color: #ff00cc;
  box-shadow: 0 0 15px rgba(255, 0, 204, 0.5);
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.modal-buttons button {
  background: #00eaff;
  color: #0a1020;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-buttons button:hover {
  background: #ff00cc;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 0, 204, 0.4);
}

.modal-buttons button:disabled {
  background: #4f6b8a;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  #app {
    padding-left: 180px;
  }
  
  #playerCard {
    left: 1rem;
    width: 140px;
    padding: 1rem;
  }
}

@media (max-width: 900px) {
  #app {
    padding-left: 0;
  }
  
  #playerCard {
    position: fixed;
    top: 1rem;
    left: 1rem;
    transform: none;
    width: auto;
    padding: 0.5rem;
    border-radius: 50px;
    flex-direction: row;
    align-items: center;
    height: 50px;
    z-index: 1000;
  }
  
  #playerCard .player-avatar {
    width: 40px;
    height: 40px;
    margin: 0 0.5rem 0 0;
  }
  
  #playerCard .player-details {
    display: flex !important;
    flex-direction: column;
    position: static;
    margin-left: 0.5rem;
  }
  
  #playerCard.expanded {
    background: rgba(20, 30, 60, 0.95);
    padding: 0.8rem 1.5rem;
    border: 2px solid #00eaff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    margin: 0;
    position: static;
    transform: none;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    padding: 1.5rem 1rem;
  }
  
  .modal-content h3 {
    font-size: 1.3rem;
  }
}
header.cyber-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  padding: 0.4rem 2vw 0.4rem 2vw;
  z-index: 2;
  min-height: 68px;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.logo-wrap {
  flex: 0 0 auto;
  margin-right: 0.6rem;
  display: flex;
  align-items: center;
}
.cyber-home-btn {
  background: #0a1020;
  color: #00eaff;
  border: 2px solid #00eaff;
  border-radius: 10px;
  font-family: 'Orbitron', 'Rajdhani', Arial, sans-serif;
  font-size: 1.07rem;
  margin-right: 1.2rem;
  margin-left: 0.1rem;
  padding: 0.5em 1.1em;
  box-shadow: 0 0 10px #00eaff99, 0 0 2px #fff;
  text-shadow: 0 0 8px #00eaff44;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  position: relative;
  z-index: 1001;
}

.cyber-home-btn:hover, .cyber-home-btn:focus,
#leaderboardBtn:hover, #leaderboardBtn:hover {
  background: rgba(0, 234, 255, 0.2);
  color: #00eaff;
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 0 20px #00eaffcc, 0 0 4px #fff;
}

/* Leaderboard Button */
#leaderboardBtn {
  background: rgba(0, 0, 0, 0.3);
  color: #00eaff;
  border: 2px solid #00eaff;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  border-radius: 10px;
  font-family: 'Orbitron', 'Rajdhani', Arial, sans-serif;
  font-size: 1.07rem;
  margin-right: 1.2rem;
  padding: 0.5em 1.1em;
  box-shadow: 0 0 10px #00eaff99, 0 0 2px #fff;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  cursor: pointer;
  position: relative;
  z-index: 1000;
}

/* Leaderboard Panel */
.leaderboard-wrapper {
  position: relative;
  display: inline-block;
  margin-left: 1rem;
  z-index: 10000;
}

#leaderboardPanel {
  display: none;
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(10, 16, 32, 0.98);
  border: 2px solid #00eaff;
  border-radius: 10px;
  padding: 1.5rem;
  min-width: 350px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.3);
  z-index: 10001;
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.3);
  z-index: 1000;
  max-height: 70vh;
  overflow-y: auto;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  transform-origin: top right;
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
  pointer-events: none;
}

#leaderboardPanel.panel-visible {
  display: block;
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  animation: panelFadeIn 0.3s ease forwards;
}

@keyframes panelFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#leaderboardPanel.panel-visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Leaderboard Panel Content */
.panel-title {
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  margin: 0 0 1rem 0;
  padding: 0.5rem 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
  border-bottom: 1px solid rgba(0, 234, 255, 0.3);
  position: relative;
}

.panel-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 25%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00eaff, transparent);
}

.panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: calc(70vh - 4rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #00eaff33 transparent;
}

.panel-list::-webkit-scrollbar {
  width: 6px;
}

.panel-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.panel-list::-webkit-scrollbar-thumb {
  background-color: #00eaff66;
  border-radius: 3px;
}

.panel-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  margin: 0.5rem 0;
  background: rgba(20, 30, 50, 0.6);
  border-radius: 8px;
  border-left: 3px solid #00eaff;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.panel-list li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 234, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.panel-list li:hover {
  background: rgba(30, 50, 80, 0.8);
  transform: translateX(5px);
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.2);
}

.panel-list li:hover::before {
  transform: translateX(100%);
}

.panel-rank {
  font-weight: bold;
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  min-width: 1.8rem;
  text-align: center;
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.5);
  position: relative;
  z-index: 1;
}

.panel-name {
  flex-grow: 1;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 1rem;
  padding: 0.2rem 0;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.panel-score {
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
  background: rgba(0, 234, 255, 0.15);
  padding: 0.25rem 0.8rem;
  border-radius: 15px;
  font-size: 0.95rem;
  min-width: 3.5rem;
  text-align: center;
  border: 1px solid rgba(0, 234, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.panel-list li:hover .panel-score {
  background: rgba(0, 234, 255, 0.25);
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 480px) {
  #leaderboardPanel {
    min-width: 280px;
    right: -10px;
  }
  
  .panel-title {
    font-size: 1.1rem;
  }
  
  .panel-list li {
    padding: 0.5rem 0.8rem;
  }
  
  .panel-name {
    font-size: 1rem;
    margin: 0 0.8rem;
  }
  
  .panel-score {
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
    min-width: 3rem;
  }
}

@media (max-width: 900px) {
  .cyber-home-btn,
  #leaderboardBtn {
    font-size: 0.97rem;
    margin-right: 0.5rem;
    padding: 0.45em 0.8em;
  }
}
.cyber-logo {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 8px #00eaff88) drop-shadow(0 0 2px #fff);
  background: none;
  border-radius: 50%;
  margin-left: 0.2rem;
}
header.cyber-header h1 {
  flex: 1 1 auto;
  font-family: 'Orbitron', 'Rajdhani', Arial, sans-serif;
  color: #00eaff;
  font-size: 1.5rem;
  text-shadow: 0 0 8px #00eaff99, 0 0 2px #fff;
  margin: 0 1.5rem 0 0;
  text-align: center;
  letter-spacing: 2px;
}
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
/* Points display has been moved to the player card */
.leaderboard-wrapper {
  position: relative;
  display: inline-block;
}
.leaderboard-panel {
  min-width: 300px;
  max-width: 400px;
  background: rgba(10, 16, 32, 0.98);
  border: 2px solid #00eaff;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.3);
  color: #fff;
  padding: 1rem;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  z-index: 9999;
  max-height: 80vh;
  overflow-y: auto;
  font-family: 'Rajdhani', Arial, sans-serif;
  backdrop-filter: blur(5px);
  transform-origin: top right;
  transition: all 0.3s ease;
  display: none; /* Hide by default */
  opacity: 0;
  visibility: hidden;
}

.leaderboard-panel.visible {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.leaderboard-panel::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-panel::-webkit-scrollbar-track {
  background: rgba(0, 234, 255, 0.1);
  border-radius: 3px;
}

.leaderboard-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 234, 255, 0.4);
  border-radius: 3px;
}

.leaderboard-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 234, 255, 0.6);
}
.leaderboard-content {
  width: 100%;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 234, 255, 0.3);
}

.leaderboard-header h3 {
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

.player-rank {
  background: rgba(0, 234, 255, 0.1);
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #00eaff;
  text-shadow: 0 0 5px rgba(0, 234, 255, 0.5);
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  width: 100%;
}

.leaderboard-list li {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.8rem;
  margin: 0.4rem 0;
  background: rgba(20, 30, 50, 0.6);
  border-radius: 8px;
  border-left: 3px solid #00eaff;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.leaderboard-list li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 234, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.leaderboard-list li:hover::before {
  transform: translateX(100%);
}

.leaderboard-list li.current-player {
  background: rgba(0, 180, 255, 0.15);
  border-left-color: #ff00cc;
  box-shadow: 0 0 15px rgba(255, 0, 204, 0.2);
}

.rank {
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
  color: #00eaff;
  min-width: 24px;
  text-align: center;
  margin-right: 0.8rem;
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.7);
}

.player {
  flex: 1;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 1rem;
}

.player::after {
  content: ' (You)';
  color: #ff00cc;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.leaderboard-list li.current-player .player::after {
  opacity: 1;
}

.score-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
}

.score {
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
  color: #00eaff;
  font-size: 1rem;
  white-space: nowrap;
}

.time {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.2rem;
}

.accuracy {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 1rem;
  white-space: nowrap;
}

.no-scores {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  padding: 1rem 0;
  font-family: 'Rajdhani', sans-serif;
}

.leaderboard-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  text-align: center;
  padding-top: 1rem;
}

/* Answer Options */
.q-options {
  margin-bottom: 1.5rem;
}

.opt-btn {
  margin-bottom: 1rem;
}

/* Submit Button Container */
.submit-btn-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  width: 100%;
  align-items: center;
}

/* Submit Button */
#submit-answer {
  padding: 12px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 2px solid #3a86ff;
  background: linear-gradient(135deg, #3a86ff 0%, #2667cc 100%);
  color: white;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(58, 134, 255, 0.3);
  text-transform: uppercase;
  min-width: 200px;
  text-align: center;
}

#submit-answer:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #4a5568;
  border-color: #4a5568;
  box-shadow: none;
}

#submit-answer:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(58, 134, 255, 0.4);
}

#submit-answer:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(58, 134, 255, 0.3);
}

.opt-btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  background: rgba(11, 22, 34, 0.8);
  color: #e0eaff;
  border: 1px solid #1a3a5f;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.opt-btn:hover {
  background: rgba(26, 58, 95, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.opt-btn.selected {
  background: rgba(26, 92, 175, 0.6);
  border-color: #3a86ff;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(58, 134, 255, 0.4);
  transform: translateY(-2px);
  position: relative;
  z-index: 1;
}

.opt-btn.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(58, 134, 255, 0.2), transparent);
  z-index: -1;
  border-radius: 4px;
}

.opt-btn.selected::after {
  content: '✓';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #3a86ff;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(58, 134, 255, 0.8);
}

.opt-btn.selected::after {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

.btn-small:hover {
  background: rgba(0, 234, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.3);
}

.btn-small:active {
  transform: translateY(1px);
}
@media (max-width: 768px) {
  .leaderboard-panel {
    position: fixed;
    top: 80px;
    right: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    max-height: calc(100vh - 100px);
    z-index: 1000;
  }
  
  .leaderboard-list li {
    padding: 0.6rem 0.8rem;
  }
  
  .player {
    font-size: 0.95rem;
  }
  
  .score {
    font-size: 0.95rem;
  }
  
  .accuracy {
    display: none;
  }
}

@media (max-width: 480px) {
  .leaderboard-panel {
    display: none;
    position: fixed;
    top: 60px;
    right: 10px;
    z-index: 1000;
  }
  .leaderboard-wrapper:focus-within .leaderboard-panel,
  .leaderboard-wrapper:hover .leaderboard-panel {
    display: block;
  }
  header.cyber-header h1 {
    font-size: 1.1rem;
    margin: 0 0.5rem 0 0;
  }
  .logo-wrap {
    margin-right: 0.5rem;
  }
  .points {
    margin-right: 0.5rem;
  }
}

/* Responsive adjustments for challenge grid */
@media (max-width: 1200px) {
  .challenge-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .challenge-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
  }
  
  .challenge-list-container {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .challenge-list {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

.points {
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 0 0 4px #00eaff99;
  margin-bottom: 0.3rem;
}

/* Challenges Container */
.challenges-contmain {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  margin-top: 60px; /* Account for fixed header */
  min-height: calc(100vh - 60px); /* Full viewport height minus header */
  box-sizing: border-box;
}

.challenges-title {
  color: #00f7ff;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  text-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
}

.challenges-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 1.2rem;
  padding: 0 1.5rem;
  width: 100%;
  box-sizing: border-box;
  max-width: 1600px;
  margin: 0 auto;
}

/* Challenge Card */
.challenge-card {
  background: rgba(10, 14, 26, 0.8);
  border: 1px solid #555;
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  opacity: 0.6;
  display: flex;
  flex-direction: column;
  min-height: 160px;
}

.challenge-card.unlocked {
  opacity: 1;
  border-color: #00f7ff;
  box-shadow: 0 0 15px rgba(0, 247, 255, 0.2);
}

.challenge-card.completed {
  border-color: #00c853;
  box-shadow: 0 0 15px rgba(0, 200, 83, 0.2);
}

.challenge-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.challenge-card-title {
  margin: 0;
  color: #00f7ff;
  font-size: 1rem;
  flex-grow: 1;
  line-height: 1.3;
}

.challenge-completed {
  background: #00c853;
  color: white;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
}

.challenge-details {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.challenge-difficulty,
.challenge-questions {
  color: #aaa;
  margin-bottom: 0.5rem;
}

.difficulty-easy {
  color: #4caf50;
}

.difficulty-medium {
  color: #ff9800;
}

.difficulty-hard {
  color: #f44336;
}

.challenge-locked-message {
  background: rgba(0, 0, 0, 0.5);
  color: #ff9800;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1rem;
}

/* Hover Effects */
.challenge-card.unlocked:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 247, 255, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 1600px) {
  .challenges-grid {
    grid-template-columns: repeat(3, minmax(250px, 1fr));
  }
}

@media (max-width: 1200px) {
  .challenges-grid {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .challenges-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 0.5rem;
  }
  
  .challenges-container {
    padding: 0.5rem;
  }
}

/* Challenge List Container */
.challenge-list-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
}

/* Challenges Header */
.challenges-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
  width: 100%;
  max-width: 400px;
}

.points-display {
  background: rgba(0, 16, 32, 0.8);
  color: #00eaff;
  border: 1px solid #00eaff;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.2);
}

.points-value {
  font-weight: bold;
  font-size: 1.1rem;
  color: #00eaff;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.7);
}

/* Challenge List */
.challenge-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  justify-content: center;
}

.challenge-item {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(16, 30, 60, 0.7);
  border: 1px solid rgba(0, 234, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 234, 255, 0.2);
  margin: 0;
}

.challenge-item.unlocked {
  background: rgba(16, 30, 60, 0.9);
  border: 1px solid rgba(0, 234, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.1);
}

.challenge-item.newly-unlocked {
  animation: pulseUnlock 1.5s ease-out;
  background: rgba(16, 40, 80, 0.9);
  border: 1px solid #00eaff;
  box-shadow: 0 0 25px rgba(0, 234, 255, 0.3);
}

@keyframes pulseUnlock {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 234, 255, 0.7); }
  50% { transform: scale(1.02); box-shadow: 0 0 20px 10px rgba(0, 234, 255, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 234, 255, 0); }
}

.challenge-button {
  width: 100%;
  padding: 1.2rem 1.5rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #e0f0ff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  min-width: auto;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.challenge-button:disabled {
  cursor: not-allowed;
  opacity: 0.9;
}

.challenge-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.challenge-name {
  font-weight: 500;
  color: #e0f0ff;
  transition: all 0.2s ease;
  margin-right: 1rem;
}

.challenge-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #00eaff;
  opacity: 0.9;
}

.challenge-locked {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 200px;
  text-align: right;
}

.progress-container {
  height: 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.3rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00a2ff, #00eaff);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.unlock-pts {
  font-size: 0.8rem;
  color: #a0c0ff;
  text-align: right;
}

/* Hover Effects */
.challenge-item.unlocked .challenge-button:not(:disabled):hover {
  background: rgba(0, 234, 255, 0.1);
}

.challenge-item.unlocked .challenge-button:not(:disabled):hover .challenge-name {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.challenge-item.unlocked .challenge-button:not(:disabled):hover .challenge-status {
  transform: translateX(5px);
  opacity: 1;
}

.challenge-button:hover:not(:disabled) {
  background: rgba(26, 44, 79, 0.5);
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.4), 0 0 2px #fff;
  transform: translateY(-2px);
}

.challenge-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 0 12px #00eaff44, 0 0 1px #fff;
}

.challenge-item.locked .challenge-button {
  color: #4f6b8a;
  border-color: #4f6b8a;
  background: #0a0f1a;
  cursor: not-allowed;
  box-shadow: none;
  text-shadow: none;
}

.challenge-item.locked .challenge-button:hover {
  transform: none;
  box-shadow: none;
}

.lock {
  display: block;
  font-size: 0.9rem;
  color: #ff4d4d;
  margin-top: 0.5rem;
  font-family: 'Rajdhani', sans-serif;
  text-shadow: 0 0 4px #ff4d4d99;
}

/* Ensure the main content is visible */
#mainContent {
  flex: 1;
  padding: 2rem 0;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Make sure the app container has proper layout */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  align-items: center;
  box-sizing: border-box;
}
.quiz-q {
  background: rgba(20,30,50,0.95);
  border-radius: 14px;
  box-shadow: 0 0 18px #00eaff33, 0 0 2px #fff;
  padding: 2rem 1rem 1.5rem 1rem;
  margin: 1.5rem 0;
  max-width: 420px;
  width: 100vw;
  position: relative;
}
.q-prompt {
  font-size: 1.2rem;
  color: #e0eaff;
  margin-bottom: 1.2rem;
  font-family: 'Rajdhani', Arial, sans-serif;
  text-shadow: 0 0 4px #00eaff44;
}
.q-options {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.opt-btn {
  background: #0a1020;
  color: #00eaff;
  border: 2px solid #00eaff;
  border-radius: 8px;
  font-size: 1.1rem;
  font-family: 'Rajdhani', Arial, sans-serif;
  box-shadow: 0 0 8px #00eaff33;
  padding: 0.8rem 0.6rem;
  margin: 0.2rem 0;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  text-shadow: 0 0 6px #00eaff33;
}
.opt-btn:active {
  background: #00eaff;
  color: #0a1020;
  box-shadow: 0 0 18px #00eaff88;
}
.q-progress {
  margin-top: 1.2rem;
  color: #a0bfff;
  font-size: 1rem;
  text-align: right;
}
.meter {
  width: 100%;
  max-width: 400px;
  height: 12px;
  background: #12203a;
  border-radius: 8px;
  margin: 0.5rem 0 1.2rem 0;
  box-shadow: 0 0 8px #00eaff33;
  overflow: hidden;
  position: relative;
}
.meter .fill {
  height: 100%;
  background: linear-gradient(90deg, #00eaff 20%, #1b6ef3 60%, #ff00cc 100%);
  box-shadow: 0 0 16px #00eaff99, 0 0 4px #ff00cc77;
  border-radius: 8px;
  transition: width 0.5s cubic-bezier(.7,.1,.2,1);
}
.toast {
  position: fixed;
  left: 50%;
  top: 12vh;
  transform: translateX(-50%);
  background: rgba(20,30,60,0.98);
  color: #fff;
  border: 2px solid #00eaff;
  border-radius: 14px;
  box-shadow: 0 0 18px #00eaff55, 0 0 2px #fff;
  padding: 1.2rem 1.2rem 0.8rem 1.2rem;
  min-width: 220px;
  z-index: 100;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 1.1rem;
  animation: toastIn 0.25s cubic-bezier(.7,.1,.2,1);
}
@keyframes toastIn {
  from { opacity: 0; top: 0; }
  to { opacity: 1; top: 12vh; }
}
.toast.correct {
  border-color: #00eaff;
  box-shadow: 0 0 18px #00eaff99, 0 0 2px #fff;
}
.toast.wrong {
  border-color: #ff00cc;
  box-shadow: 0 0 18px #ff00cc99, 0 0 2px #fff;
}
.toast .tip {
  font-size: 0.95em;
  color: #00eaff;
  margin-top: 0.7em;
  text-shadow: 0 0 4px #00eaff99;
}
.results {
  margin: 2.5rem auto 0 auto;
  max-width: 420px;
  background: rgba(20,30,50,0.97);
  border-radius: 14px;
  box-shadow: 0 0 18px #00eaff33, 0 0 2px #fff;
  padding: 2rem 1rem 2rem 1rem;
  text-align: center;
}
.results h2 {
  color: #00eaff;
  font-family: 'Orbitron', Arial, sans-serif;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 8px #00eaff99, 0 0 2px #fff;
}
.results .score {
  font-size: 1.3rem;
  color: #fff;
  margin: 1.2rem 0 0.8rem 0;
}
.results .rank {
  color: #ff00cc;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  font-family: 'Rajdhani', Arial, sans-serif;
  text-shadow: 0 0 6px #ff00cc88;
}
.results .badges {
  margin-bottom: 1.2rem;
  color: #00eaff;
  font-size: 1.1rem;
}
.unlock-msg {
  color: #00ffae;
  font-size: 1.15em;
  margin: 1.2em 0 0.7em 0;
  text-shadow: 0 0 8px #00ffae99, 0 0 2px #fff;
  animation: unlockIn 0.7s cubic-bezier(.7,.1,.2,1);
}
@keyframes unlockIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
button, .opt-btn {
  outline: none;
}
button:focus, .opt-btn:focus {
  box-shadow: 0 0 0 3px #00eaff88;
  border-color: #fff;
}
::-webkit-scrollbar {
  width: 8px;
  background: #101e3a;
}
::-webkit-scrollbar-thumb {
  background: #00eaff44;
  border-radius: 6px;
}
@media (max-width: 600px) {
  .quiz-q, .results, .challenge-list {
    max-width: 98vw;
    padding: 1.2rem 0.3rem;
  }
  header h1 { font-size: 1.2rem; }
}
