body {
  font-family: "Inter", sans-serif;
  background-color: #05080f; /* Even darker blue */
  color: #e2e8f0; /* Lighter gray for better contrast */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250' viewBox='0 0 100 100'%3E%3Cstyle%3E.logo { font-family: 'Racing Sans One', sans-serif; font-size: 40px; opacity: 0.02; } %3C/style%3E%3Ctext x='50' y='65' fill='%2300c6ff' class='logo' text-anchor='end' transform='rotate(-20 50 50)'%3E#%3C/text%3E%3Ctext x='52' y='65' fill='%23f7ff00' class='logo' text-anchor='start' transform='rotate(-20 50 50)'%3E8%3C/text%3E%3C/svg%3E");
}
.font-racing {
  font-family: "Racing Sans One", sans-serif;
}
.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -1;
}
.hero-overlay {
  background: linear-gradient(
    to top,
    rgba(5, 8, 15, 1) 0%,
    rgba(5, 8, 15, 0.6) 50%,
    rgba(5, 8, 15, 1) 100%
  );
}
.text-shadow-strong {
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}
.text-gradient {
  background-image: linear-gradient(to right, #00c6ff, #f7ff00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.neon-yellow {
  color: #f7ff00;
}
.title-blue {
  color: #00c6ff;
}
.section-glow {
  position: relative;
}
.section-glow::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 198, 255, 0.05), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.card,
.stat-card,
.video-item,
.gallery-item,
.sponsor-logo,
.form-container {
  background: rgba(15, 23, 42, 0.5); /* slate-900/50 */
  border: 1px solid rgba(51, 65, 85, 0.5); /* slate-700/50 */
  backdrop-filter: blur(10px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.card:hover,
.stat-card:hover,
.video-item:hover,
.gallery-item:hover,
.sponsor-logo:hover {
  transform: translateY(-10px);
  box-shadow:
    0 0 30px rgba(247, 255, 0, 0.2),
    0 0 12px rgba(247, 255, 0, 0.15);
  border-color: rgba(247, 255, 0, 0.4);
}
.textarea-notes,
.form-input {
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0; /* slate-200 */
}
.textarea-notes {
  min-height: 200px;
}
.form-input:focus {
  outline: none;
  border-color: #f7ff00;
  box-shadow: 0 0 0 2px rgba(247, 255, 0, 0.3);
}
.error-message {
  background-color: #991b1b; /* red-800 */
  color: #fca5a5; /* red-300 */
  border-left: 4px solid #ef4444; /* red-500 */
}
.bg-neon-yellow {
  background-color: #f7ff00;
}
.schedule-card {
  background-color: #1e293b; /* slate-800 */
  border-left: 4px solid #475569; /* slate-600 */
  transition: all 0.3s ease;
}
.schedule-card.upcoming {
  border-left-color: #f7ff00;
}
.schedule-card.past {
  opacity: 0.6;
}
.schedule-card:hover {
  transform: translateX(5px);
  border-left-color: #00c6ff;
}
.car-hotspot-container {
  position: relative;
}
.hotspot {
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(0, 198, 255, 0.8);
  border-radius: 50%;
  border: 2px solid white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(0, 198, 255, 0.7);
}
.hotspot:hover {
  transform: scale(1.2);
  background-color: #00c6ff;
}
.hotspot-pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 198, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 198, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 198, 255, 0);
  }
}
.hotspot-info {
  display: none;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: white;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #00c6ff;
  width: 220px;
  z-index: 10;
  text-align: center;
  font-size: 0.9rem;
}
.hotspot:hover .hotspot-info {
  display: block;
}

.swiper {
  width: 100%;
  height: 100%;
}
.swiper-slide {
  width: 100%;
  height: 100%;
}
.swiper-button-next,
.swiper-button-prev {
  color: #f7ff00 !important;
  opacity: 0;
  transition: opacity 0.3s ease;
  --swiper-navigation-size: 30px;
}
.gallery-item:hover .swiper-button-next,
.gallery-item:hover .swiper-button-prev {
  opacity: 0.7;
}
.swiper-pagination-bullet-active {
  background: #f7ff00 !important;
}

.sponsor-logo img {
  filter: grayscale(100%) brightness(0.8);
  transition: filter 0.3s ease;
}
.sponsor-logo:hover img {
  filter: grayscale(0%) brightness(1);
}
.tiktok-embed {
  max-width: 100% !important;
  min-width: 0 !important; /* Override default min-width */
}
#home {
  min-height: 100vh;
}

/* Essential utility classes when Tailwind CSS is not available */
.hidden {
  display: none !important;
}

.block {
  display: block !important;
}

.flex {
  display: flex !important;
}

.items-center {
  align-items: center;
}

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

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

/* Responsive navigation utilities */
@media (min-width: 768px) {
  .hidden.md\:flex {
    display: flex !important;
  }

  .md\:hidden {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .hidden.md\:flex {
    display: none !important;
  }

  .md\:hidden {
    display: block !important;
  }
}

/* Large screen responsive utilities (fallback when Tailwind is not available) */
@media (min-width: 1024px) {
  .lg\:block { display: block !important; }
  .lg\:flex { display: flex !important; }
  /* Override hidden when lg:block is present */
  .hidden.lg\:block { display: block !important; }
  /* Explicit lg hidden */
  .lg\:hidden { display: none !important; }
}

:root { --fun-accent: #f7ff00; }
.text-accent { color: var(--fun-accent) !important; }
.border-accent { border-color: var(--fun-accent) !important; }
.bg-accent { background-color: var(--fun-accent) !important; color: #000; }
.focus-accent:focus { outline: 2px solid var(--fun-accent); outline-offset: 2px; }

/* Improve input visibility on dark backgrounds */
input, textarea { color: #e5e7eb; caret-color: #f7ff00; }
input::placeholder, textarea::placeholder { color: #94a3b8; }
/* Ensure visibility when inputs use a white background */
input.bg-white, textarea.bg-white { color: #111827 !important; }
input.bg-white::placeholder, textarea.bg-white::placeholder { color: #6b7280 !important; }

/* Navigation Link Styles */
.nav-link {
  color: #e2e8f0;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.nav-link:hover {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  transform: translateY(-1px);
}

/* Remove login buttons from all pages */
#login-btn,
#mobile-login-btn,
.mobile-login-btn,
#account-toggle-loggedout,
nav a[href="login.html"] {
  display: none !important;
}

/* Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  backdrop-filter: blur(16px);
  z-index: 1000;
  padding: 8px 0;
  margin-top: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 4px;
  margin: 2px 8px;
}

.dropdown-item:hover {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.modern-dropdown {
  min-width: 180px;
}

/* Mobile Menu Styles */
.mobile-menu {
  padding: 16px;
}

.modern-mobile {
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(16px);
}

.mobile-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
}

/* Force readable styling for modern inputs and Settings page */
.modern-input {
  background-color: #1e293b !important; /* slate-800 */
  color: #e5e7eb !important; /* slate-200 */
  border: 1px solid #334155 !important; /* slate-600 */
}
#profile-settings input[type="text"],
#profile-settings input[type="url"],
#profile-settings select {
  background-color: #1e293b !important;
  color: #e5e7eb !important;
  border: 1px solid #334155 !important;
}
#profile-settings input[type="text"]::placeholder,
#profile-settings input[type="url"]::placeholder {
  color: #94a3b8 !important;
}
/* Fix WebKit autofill (ensures text stays visible) */
#profile-settings input:-webkit-autofill,
#profile-settings input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e5e7eb !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* Navigation specific styles */
.avatar-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9999px; background-color: #0ea5e9; color: white; font-weight: 700; font-size: 0.8rem; overflow: hidden; border: 2px solid rgba(255,255,255,0.2); }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials { line-height: 1; }

/* Admin shell */
.admin-shell .card { border-radius: 0.75rem; }
.admin-shell h2 { letter-spacing: 0.02em; }

.dropdown-menu {
  background-color: #1e293b; /* slate-800 */
  border-radius: 0.375rem;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.3),
    0 10px 10px -5px rgba(0, 0, 0, 0.2);
  margin-top: 0.5rem;
  padding: 0.25rem 0;
  width: 12rem;
  z-index: 9999; /* Increased z-index to ensure it appears above all content */
  position: absolute;
  border: 1px solid #475569; /* slate-600 - adds definition */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: max-content; /* Ensures content fits */
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #cbd5e1; /* slate-300 */
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap; /* Prevents text wrapping */
}
.dropdown-menu a[href="#"] { pointer-events: none; opacity: 0.7; }

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background-color: #334155; /* slate-700 */
  color: #f7ff00; /* neon-yellow for better visibility */
  transform: translateX(2px);
  outline: none;
}

/* Enhanced dropdown positioning */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Ensure dropdowns don't get cut off at screen edges */
.dropdown-menu.dropdown-menu-right {
  right: 0;
  left: auto;
}

/* Mobile accordion improvements */
.mobile-accordion-content {
  transition: all 0.3s ease;
  overflow: hidden;
}

.mobile-accordion-content:not(.hidden) {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 200px;
    opacity: 1;
  }
}

/* Improve button focus states for accessibility */
.dropdown-toggle:focus,
.mobile-accordion:focus,
#mobile-menu-button:focus {
  outline: 2px solid #f7ff00;
  outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) {
  .dropdown-menu {
    margin-top: 0.75rem; /* More space for finger tapping */
  }

  .dropdown-menu a {
    padding: 0.75rem 1rem; /* Larger tap targets */
    font-size: 1rem; /* Slightly larger text */
  }
}

/* CSS-only fallback to ensure dropdowns open even if JS fails */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block !important; /* override hidden */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .dropdown-menu {
    border: 2px solid #ffffff;
  }

  .dropdown-menu a:hover,
  .dropdown-menu a:focus {
    background-color: #000000;
    color: #ffffff;
  }
}

/* ============================================
   SIGNUP PAGE ENHANCEMENTS
   ============================================ */

/* Background with subtle animation */
.signup-page-bg {
  background: linear-gradient(135deg, #05080f 0%, #0a1128 50%, #05080f 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Container animations */
.signup-container {
  animation: fadeInUp 0.6s ease-out;
}

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

/* Logo animation */
.logo-animation {
  animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hover glow effect for logo */
.hover-glow {
  transition: all 0.3s ease;
  display: inline-block;
}

.hover-glow:hover {
  text-shadow: 0 0 20px rgba(0, 198, 255, 0.5), 0 0 40px rgba(247, 255, 0, 0.3);
  transform: scale(1.05);
}

/* Enhanced form card */
.signup-form-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 100px rgba(0, 198, 255, 0.05);
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Modern input styling */
.modern-input-enhanced {
  background-color: #0f172a !important;
  border: 2px solid #334155 !important;
  color: #e5e7eb !important;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.modern-input-enhanced:focus {
  border-color: #f7ff00 !important;
  background-color: #1e293b !important;
  box-shadow: 0 0 0 3px rgba(247, 255, 0, 0.1), 0 0 20px rgba(247, 255, 0, 0.15) !important;
  transform: translateY(-1px);
}

.modern-input-enhanced::placeholder {
  color: #64748b !important;
}

/* Input group styling */
.input-group {
  animation: fadeInUp 0.5s ease-out both;
}

.input-group:nth-child(1) { animation-delay: 0.4s; }
.input-group:nth-child(2) { animation-delay: 0.5s; }
.input-group:nth-child(3) { animation-delay: 0.6s; }

/* Role card enhancements */
.role-selection-container {
  animation: fadeInUp 0.5s ease-out 0.7s both;
}

.role-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.role-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(247, 255, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.role-card:hover::before {
  left: 100%;
}

.role-card:hover {
  transform: translateX(5px);
  border-color: #f7ff00 !important;
  background: rgba(30, 41, 59, 0.7) !important;
  box-shadow: 0 10px 30px rgba(247, 255, 0, 0.15);
}

.role-card input[type="radio"]:checked ~ div .role-icon {
  animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.role-card input[type="radio"]:checked {
  accent-color: #f7ff00;
}

/* Enhanced button styling */
.signup-btn {
  position: relative;
  overflow: hidden;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.signup-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.signup-btn:hover::before {
  width: 300px;
  height: 300px;
}

.signup-btn:active {
  transform: translateY(1px) !important;
}

/* Invite help box */
.invite-help-box {
  background: rgba(251, 191, 36, 0.05);
  border-left: 3px solid #f7ff00;
  padding: 8px 12px;
  border-radius: 6px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    opacity: 1;
    max-height: 100px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* Fade in up animation for footer text */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out 0.8s both;
}

/* Error message enhancement */
#signup-error {
  animation: shake 0.5s ease;
  color: #fca5a5;
  background: rgba(153, 27, 27, 0.2);
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #ef4444;
  font-size: 0.9rem;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Responsive adjustments for signup page */
@media (max-width: 640px) {
  .signup-form-card {
    padding: 1.5rem !important;
  }
  
  .role-card {
    padding: 0.75rem !important;
  }
  
  .role-icon {
    font-size: 1.5rem !important;
  }
  
  .hover-glow {
    font-size: 2.5rem !important;
  }
}

/* ============================================
   FOOTER ENHANCEMENTS
   ============================================ */

/* Animated gradient for footer title */
.animate-gradient {
  background-size: 200% auto;
  animation: gradient-flow 3s ease infinite;
}

@keyframes gradient-flow {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* Mobile header adjustments: shrink brand text and space hamburger */
@media (max-width: 420px) {
  nav .font-racing { font-size: 1.75rem !important; letter-spacing: 0.05em; }
  #mobile-menu-button { margin-left: 8px; }
}

/* Aspect ratio utilities for video embeds */
.aspect-w-16 {
  position: relative;
  padding-bottom: calc(9 / 16 * 100%);
}

.aspect-w-16 > * {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.space-x-6 > * + * {
  margin-left: 1.5rem;
}

.transition {
  transition: all 0.3s ease;
}

.hover\\:text-neon-yellow:hover {
  color: #f7ff00;
}
