/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #fff;
  background: #0f0c29;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ===== Carousel ===== */
.carousel {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide.active {
  opacity: 1;
}

/* Image-based slides — dark overlay for text readability */
.carousel-slide-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.carousel-slide-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* Decorative floating circles */
.carousel-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.decor-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.04;
  background: #fff;
}
.decor-1 {
  width: 600px; height: 600px;
  top: -200px; right: -150px;
  animation: float 20s ease-in-out infinite;
}
.decor-2 {
  width: 400px; height: 400px;
  bottom: -100px; left: -100px;
  animation: float 24s ease-in-out infinite reverse;
}
.decor-3 {
  width: 300px; height: 300px;
  top: 50%; left: 60%;
  animation: float 18s ease-in-out infinite 5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== Overlay ===== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  pointer-events: none;
}
.overlay > * {
  pointer-events: auto;
}

/* ===== Brand ===== */
.brand {
  text-align: center;
  margin-bottom: 3rem;
}
.brand-name {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-accent {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-tagline {
  margin-top: 0.75rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.45);
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* ===== Nav Link Cards ===== */
.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 720px;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem;
  width: 155px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}
.nav-card:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.nav-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(99,102,241,0.2);
  color: #a5b4fc;
  transition: all 0.3s ease;
}
.nav-card:hover .nav-card-icon {
  background: rgba(99,102,241,0.35);
  color: #c7d2fe;
}
.nav-card-icon svg {
  width: 22px;
  height: 22px;
}

.nav-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.01em;
}
.nav-card-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  font-weight: 400;
  text-align: center;
  line-height: 1.35;
}

/* ===== Carousel Dots ===== */
.carousel-dots {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.6rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: all 0.3s ease;
}
.carousel-dot:hover {
  background: rgba(255,255,255,0.5);
}
.carousel-dot.active {
  background: #fff;
  box-shadow: 0 0 12px rgba(99,102,241,0.6);
  width: 24px;
  border-radius: 4px;
}

/* ===== Footer ===== */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 1rem 1.5rem;
  text-align: center;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}
.footer-inner a {
  transition: color 0.2s;
}
.footer-inner a:hover {
  color: rgba(255,255,255,0.6);
}
.beian-icon {
  flex-shrink: 0;
  opacity: 0.5;
  cursor: default;
}
.footer-sep {
  opacity: 0.25;
}

/* ===== Easter Egg Overlay ===== */
.easteregg-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.easteregg-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.easteregg-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  animation: eggReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.easteregg-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.easteregg-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.easteregg-close svg {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.8);
}

@keyframes eggReveal {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .overlay {
    padding: 1.25rem;
    justify-content: center;
  }
  .brand {
    margin-bottom: 2rem;
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
  }
  .nav-card {
    flex-direction: row;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    width: 100%;
  }
  .nav-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .nav-card-icon svg {
    width: 20px;
    height: 20px;
  }
  .nav-card-title {
    font-size: 0.9rem;
  }
  .nav-card-desc {
    font-size: 0.7rem;
  }
  .carousel-dots {
    bottom: 4rem;
  }
  .site-footer {
    padding: 0.75rem 1rem;
  }
  .footer-inner {
    font-size: 0.65rem;
  }
}
