/* ------------------------------
   Global layout + background
------------------------------ */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  color: #ffffff;
}

body {
  background: linear-gradient(120deg, #000814, #001d3d, #000814);
  background-size: 300% 300%;
  animation: gradientMove 12s ease infinite;
  position: relative;
}

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


/* ------------------------------
   Animated glowing stars
------------------------------ */

.star {
  position: fixed;
  background-image: url('star-glow.png');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
  animation: glowPulse var(--pulseSpeed) ease-in-out infinite;
}

@keyframes glowPulse {
  0% {
    opacity: var(--minOpacity);
    filter: drop-shadow(0 0 2px rgba(255,255,150,0.3));
  }
  50% {
    opacity: var(--maxOpacity);
    filter: drop-shadow(0 0 10px rgba(255,255,150,0.9));
  }
  100% {
    opacity: var(--minOpacity);
    filter: drop-shadow(0 0 2px rgba(255,255,150,0.3));
  }
}


/* ------------------------------
   Header bar
------------------------------ */

.header {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  padding: 0 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);

  opacity: 0;
  transform: translateY(-40px);
  animation: headerSlide 1s ease forwards;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 25px;
}

.menu-bar {
  display: flex;
  gap: 18px;
}

@keyframes headerSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  height: 50px;
}

.menu-bar a {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 16px;
}

.menu-bar a::before {
  content: "★";
  margin-right: 6px;
  color: gold;
  font-size: 14px;
  animation: pulseStar 1.8s infinite ease-in-out;
  text-shadow: 0 0 6px gold;
}

@keyframes pulseStar {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}


/* ------------------------------
   Frosted glass cards
------------------------------ */

.card-container {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 60px 20px;
}

.card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 30px;
  width: 280px;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 12px rgba(255,255,255,0.05);
  transition: 0.3s ease;
}

.card:hover {
  border-color: rgba(255,255,255,0.9);
  box-shadow: 0 0 25px rgba(255,255,255,0.5);
}

.card h2 {
  margin-top: 0;
  color: #ffd95a;
  text-shadow: 0 0 6px rgba(255,215,90,0.6);
}

.card p {
  color: #e0e0e0;
  margin-bottom: 20px;
}

.go-btn {
  display: inline-block;
  padding: 12px 28px;
  background: #ffd95a;
  color: #000;
  font-weight: bold;
  border-radius: 10px;
  text-decoration: none;
  transition: 0.3s ease;
  box-shadow: 0 0 12px rgba(255,215,90,0.6);
}

.go-btn:hover {
  background: #ffe27a;
  box-shadow: 0 0 22px rgba(255,215,90,1);
}


/* ------------------------------
   Footer
------------------------------ */

.footer {
  width: 100%;
  text-align: center;
  padding: 25px 0;
  color: #9aa0a6;
  font-size: 14px;
  opacity: 0.7;
  position: relative;
  z-index: 5;
}

.footer-inner {
  display: inline-block;
  animation: footerGlow 4s ease-in-out infinite;
}

@keyframes footerGlow {
  0% {
    text-shadow: 0 0 4px rgba(255,255,255,0.2);
    opacity: 0.7;
  }
  50% {
    text-shadow: 0 0 12px rgba(255,255,255,0.55);
    opacity: 1;
  }
  100% {
    text-shadow: 0 0 4px rgba(255,255,255,0.2);
    opacity: 0.7;
  }
}

.footer-star {
  color: gold;
  margin-right: 6px;
  text-shadow: 0 0 6px gold;
  font-size: 14px;
}

/* ------------------------------
   Time Toggle Slider (A3UA Style)
------------------------------ */

.toggle-wrapper {
  position: relative;
  display: inline-block;
}

.toggle-wrapper .tooltip {
  visibility: hidden;
  opacity: 0;
  width: max-content;
  background: rgba(0,0,0,0.7);
  color: #fff;
  text-align: center;
  padding: 6px 10px;
  border-radius: 6px;
  position: absolute;
  bottom: 36px;
  right: 0;
  font-size: 0.75rem;
  transition: opacity 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toggle-wrapper:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.toggle {
  position: relative;
  width: 50px;
  height: 26px;
  display: inline-block;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 34px;
  transition: 0.3s;
  border: 1px solid rgba(255,255,255,0.3);
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background: url('star-glow.png') center/cover no-repeat;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: rgba(255,216,107,0.4);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* ------------------------------
   Sync Status Indicator
------------------------------ */

#sync-status {
  margin-top: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 0 4px rgba(255,255,255,0.3);
  transition: color 0.6s ease, opacity 0.3s ease;
  opacity: 0.9;
}

/* When stale, fade to red */
#sync-status.stale {
  color: #ff6b6b;
  text-shadow: 0 0 6px rgba(255,0,0,0.4);
}

/* Red bubble container */
.sync-warning {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 12px;
  background: #ff4d4d;
  color: white;
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 0;
  transform: scale(0.95);
  animation: fadeIn 0.4s forwards, pulse 2s infinite ease-in-out;
}

/* Fade-in animation */
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Gentle pulse */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
