/* ==========================================================
   DARK THEME NAVBAR - COMPACT & OPTIMIZED
   Desktop + Mobile Ready with Single-line Layout
   ========================================================== */

/* Root Body */
body {
    background-color: #0f0f0f;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ==========================================================
   NAVBAR BASE STRUCTURE - COMPACT
   ========================================================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    background-color: #181818;
    width: min(96%, 1400px);
    margin: clamp(10px, 1.5vw, 20px) auto;
    padding: clamp(10px, 1.2vw, 16px) clamp(24px, 2.5vw, 40px);
    border-radius: clamp(8px, 0.8vw, 12px);
    border: 1px solid #2a2a2a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    box-sizing: border-box;
    transition: all 0.3s ease;
    min-height: 50px;
    height: auto;
}

.navbar:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.45);
}

/* Equal Width Layout for Left and Right */
.navbar-section {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0; /* Prevents overflow */
}

/* Center Section Always Centered */
.navbar-center {
    justify-content: center;
    flex-shrink: 1;
    min-width: 0;
}

/* Left and Right Spacing */
.navbar-left {
    justify-content: flex-start;
}

.navbar-right {
    justify-content: flex-end;
    gap: clamp(10px, 0.8vw, 16px);
    flex-shrink: 0;
}

/* ==========================================================
   LOGO - COMPACT
   ========================================================== */
.navbar-logo .logo {
    height: clamp(32px, 2.8vw, 44px);
    filter: brightness(0.9);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.navbar-logo:hover .logo {
    transform: scale(1.06);
    filter: brightness(1.1);
}

/* ==========================================================
   NAVIGATION LINKS - SINGLE LINE OPTIMIZED
   ========================================================== */
.navbar-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(8px, 1vw, 16px);
    flex-wrap: nowrap;
    overflow: hidden;
}

.navbar-center a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.9rem, 1vw, 1.1rem);
    padding: clamp(6px, 0.6vw, 10px) clamp(12px, 1.2vw, 20px);
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: max-content;
}

.navbar-center a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    color: #ffffff;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.navbar-center a::after {
    content: '';
    position: absolute;
    top: 0;
    color: #ffffff;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(46, 49, 146, 0.15), transparent);
    transition: left 0.6s ease;
}

.navbar-center a:hover {
    color: #ffffff;
    background-color: rgba(46, 49, 146, 0.12);
    transform: translateY(-1px);
}

.navbar-center a:hover::before {
    width: 70%;
}

.navbar-center a:hover::after {
    left: 100%;
}

/* Active Link */

.navbar-center a.active::before {
    width: 70%;
}

/* ==========================================================
   RIGHT SECTION: TIME + THEME - COMPACT
   ========================================================== */
.navbar-time {
  display: inline-block;
  min-width: 115px; /* fixed width for HH:MM:SS AM/PM */
  text-align: center;
  font-family: monospace; /* prevents font width changes */
  background-color: rgba(46, 49, 146, 0.1);
  color: #b0b0b0;
  font-weight: 600;
  font-size: clamp(0.85rem, 0.8vw, 1rem);
  padding: clamp(6px, 0.6vw, 8px) clamp(10px, 0.8vw, 14px);
  border-radius: 6px;
  border: 1px solid #333333;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-time:hover {
  color: #ffffff;
  background-color: rgba(46, 49, 146, 0.2);
  border-color: #2E3192;
}


.theme-toggle {
    background: rgba(249, 6, 24, 0.08);
    border: 1px solid #333333;
    border-radius: 6px;
    color: #b0b0b0;
    font-size: clamp(1.1rem, 0.9vw, 1.3rem);
    cursor: pointer;
    padding: clamp(6px, 0.6vw, 8px) clamp(10px, 0.8vw, 14px);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 6, 24, 0.25), transparent);
    transition: left 0.6s ease;
}

.theme-toggle:hover {
    color: #ffffff;
    border-color: #F90618;
    background-color: rgba(249, 6, 24, 0.15);
    box-shadow: 0 3px 10px rgba(249, 6, 24, 0.25);
    transform: translateY(-1px);
}

.theme-toggle:hover::before {
    left: 100%;
}

/* ==========================================================
   HAMBURGER MENU (Hidden on Desktop)
   ========================================================== */
.menu-toggle {
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: #e0e0e0;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 1000;
    transition: color 0.3s ease;
    padding: 8px;
}

.menu-toggle:hover {
    color: #F90618;
}

/* ==========================================================
   MOBILE DROPDOWN MENU (Hidden by Default)
   ========================================================== */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #1a1a1a;
    flex-direction: column;
    border: 1px solid #2a2a2a;
    border-top: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    z-index: 999;
}

.mobile-menu a {
    padding: 12px 20px;
    color: #b0b0b0;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #222222;
    background-color: #141414;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

.mobile-menu a:hover {
    background-color: #222222;
    color: #ffffff;
}

.mobile-menu a.active {
    color: #ffffff;
    background-color: rgba(46, 49, 146, 0.25);
    border-left: 4px solid #F90618;
}

.mobile-menu .mobile-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #181818;
    border-top: 1px solid #2a2a2a;
}

/* Mobile Time + Theme */
.mobile-time {
    color: #b0b0b0;
    font-weight: 500;
    font-size: 0.9rem;
    background-color: rgba(46, 49, 146, 0.1);
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #333333;
}

.mobile-theme-toggle {
    background: rgba(249, 6, 24, 0.08);
    color: #e0e0e0;
    border: 1px solid #333333;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 10px;
    transition: all 0.3s ease;
}

.mobile-theme-toggle:hover {
    color: #ffffff;
    background-color: rgba(249, 6, 24, 0.15);
    border-color: #F90618;
}

/* ==========================================================
   RESPONSIVE BEHAVIOR
   ========================================================== */
@media (max-width: 1024px) {
    .navbar {
        padding: 10px 20px;
    }
    
    .navbar-center {
        gap: clamp(6px, 0.8vw, 12px);
    }
    
    .navbar-center a {
        font-size: clamp(0.85rem, 0.9vw, 1rem);
        padding: clamp(5px, 0.5vw, 8px) clamp(10px, 1vw, 16px);
    }
}

@media (max-width: 900px) {
    .navbar {
        justify-content: space-between;
        padding: 10px 16px;
        min-height: 45px;
    }

    .navbar-left {
        display: flex !important;
        flex: 0 1 auto;
    }

    .navbar-right,
    .navbar-center {
        display: none;
    }

    .menu-toggle {
        display: block;
        position: static;
        transform: none;
    }

    .navbar.open .mobile-menu {
        display: flex;
        animation: dropdownFade 0.3s ease forwards;
    }
    
    /* Adjust logo size for mobile */
    .navbar-logo .logo {
        height: 32px;
    }
}

@media (max-width: 768px) {
    .navbar-center {
        gap: 4px;
    }
    
    .navbar-center a {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 8px 12px;
        min-height: 42px;
    }
    
    .menu-toggle {
        font-size: 1.4rem;
        padding: 6px;
    }
    
    .navbar-logo .logo {
        height: 28px;
    }
    
    .mobile-menu a {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .mobile-bottom {
        padding: 10px 16px;
    }
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   ACCESSIBILITY & POLISH
   ========================================================== */
.navbar-center a:focus,
.theme-toggle:focus,
.navbar-time:focus,
.menu-toggle:focus {
    outline: 2px solid #2E3192;
    outline-offset: 3px;
}

.navbar,
.navbar-center a,
.theme-toggle,
.navbar-time {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================
   ULTRA-WIDE + RETINA OPTIMIZATION
   ========================================================== */
@media (min-width: 1920px) {
    .navbar {
        max-width: 1600px;
        padding: 14px 50px;
        border-radius: 12px;
    }

    .navbar-center a {
        font-size: 1.05rem;
    }

    .theme-toggle,
    .navbar-time {
        font-size: 1rem;
    }
}

@media (min-width: 2560px) {
    .navbar {
        max-width: 2000px;
        padding: 16px 60px;
        border-radius: 14px;
    }

    .navbar-center a {
        font-size: 1.15rem;
    }

    .theme-toggle,
    .navbar-time {
        font-size: 1.1rem;
    }
}

/* ==========================================================
   LINK OVERFLOW PROTECTION
   ========================================================== */
.navbar-center {
    /* Prevent links from wrapping or overlapping */
    flex-wrap: nowrap;
    overflow: visible;
}

.navbar-center a {
    /* Ensure links maintain proper spacing */
    margin: 0 1px;
}

/* ==========================================================
   COMPACT NAVBAR HEIGHT FIX
   ========================================================== */
.navbar {
    height: auto;
    min-height: 50px;
    align-items: center;
}

.navbar > * {
    flex-shrink: 0;
}

/* Ensure single line layout */
.navbar-center a {
    line-height: 1.2;
    display: inline-block;
    vertical-align: middle;
}

/* ==========================================================
   DARK THEME SPECIFIC ENHANCEMENTS
   ========================================================== */
.navbar-logo .logo {
    filter: brightness(0.9);
}

.navbar-logo:hover .logo {
    filter: brightness(1.1);
}

/* Ensure text remains readable in dark theme */
.navbar-center a,
.navbar-time,
.theme-toggle,
.mobile-menu a {
    color: #b0b0b0;
}

.navbar-center a:hover,
.navbar-time:hover,
.mobile-menu a:hover {
    color: #ffffff;
}

/* Mobile menu active state */
.mobile-menu a.active {
    color: #ffffff;
    background-color: rgba(46, 49, 146, 0.25);
}

/* Mobile bottom section enhancements */
.mobile-bottom {
    background-color: #181818;
    border-top: 1px solid #2a2a2a;
}

.mobile-time {
    background-color: rgba(46, 49, 146, 0.1);
    border: 1px solid #333333;
}

.mobile-time:hover {
    background-color: rgba(46, 49, 146, 0.2);
    border-color: #2E3192;
}

.mobile-theme-toggle {
    background-color: rgba(249, 6, 24, 0.08);
    border: 1px solid #333333;
}

.mobile-theme-toggle:hover {
    background-color: rgba(249, 6, 24, 0.15);
    border-color: #F90618;
}



/* =============================================
   FOOTER DARK DESKTOP THEME CSS
   Professional, clean, and dynamic
   Colors: #f90618 (red), #2e3192 (blue)
   ============================================= */

.footer {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 2.5rem 0 1rem;
  margin-top: auto;
  border-top: 1px solid #2d2d2d;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f90618, #2e3192);
  opacity: 0.8;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  transition: transform 0.3s ease;
}

.footer-section:hover {
  transform: translateY(-2px);
}

.footer-section h3 {
  color: #ffffff;
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: #f90618;
  transition: width 0.3s ease;
}

.footer-section:hover h3::after {
  width: 60px;
}

.footer-section p {
  line-height: 1.6;
  margin-bottom: 0.8rem;
  color: #b0b0b0;
  transition: color 0.3s ease;
}

.sponsor-text {
  font-style: italic;
  color: #888888 !important;
  font-size: 0.9rem;
  margin-top: 1rem !important;
  border-top: 1px solid #333333;
  padding-top: 0.8rem !important;
}

.sponsor-text a {
  color: #2e3192 !important;
  font-weight: 600;
  text-decoration: none;
  display: inline !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  min-height: auto !important;
}

.sponsor-text a:hover {
  color: #f90618 !important;
  text-decoration: underline;
}

.footer-section a {
  color: #b0b0b0;
  text-decoration: none;
  display: block;
  margin-bottom: 0.6rem;
  padding: 0.3rem 0;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.footer-section a::before {
  content: '▸';
  position: absolute;
  left: -1rem;
  color: #2e3192;
  opacity: 0;
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: #ffffff;
  padding-left: 1rem;
  transform: translateX(5px);
}

.footer-section a:hover::before {
  opacity: 1;
  left: 0;
}

.footer-section a:hover {
  color: #f90618;
}

/* First section specific styling */
.footer-section:first-child h3 {
  color: #f90618;
}

.footer-section:first-child h3::after {
  background: #f90618;
}

/* Quick Links specific styling */
.footer-section:nth-child(2) h3::after {
  background: #2e3192;
}

.footer-section:nth-child(2) a:hover {
  color: #2e3192;
}

/* Support section specific styling */
.footer-section:nth-child(3) h3::after {
  background: linear-gradient(90deg, #f90618, #2e3192);
}

.footer-bottom {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
  color: #888;
  font-size: 0.9rem;
  position: relative;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f90618, #2e3192, transparent);
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-section {
  animation: fadeInUp 0.6s ease forwards;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }

/* Hover effects for the entire footer */
.footer:hover {
  border-top-color: #f90618;
}

/* Focus states for accessibility */
.footer-section a:focus {
  outline: 2px solid #2e3192;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Print styles */
@media print {
  .footer {
    background: #ffffff !important;
    color: #000000 !important;
    border-top: 1px solid #000000 !important;
  }
  
  .footer-section a {
    color: #000000 !important;
  }
}