/* ============ 基础重置 & 变量 ============ */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800;900&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap");

:root {
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: rgba(0, 0, 0, 0.25);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --accent-glow: rgba(102, 126, 234, 0.4);
  --card-bg: rgba(255, 255, 255, 0.1);
  --card-hover: rgba(255, 255, 255, 0.18);
  --progress-gradient: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  font-family: 'Outfit', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ Bing 壁纸背景 ============ */
.bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0a0a2e;
  opacity: 0;
  transition: opacity 1.5s ease;
  transform: scale(1.05);
  animation: bgZoom 30s ease-in-out infinite alternate;
}

.bg-wrapper.loaded {
  opacity: 1;
}

@keyframes bgZoom {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.12); }
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 46, 0.65) 0%,
    rgba(20, 10, 50, 0.5) 40%,
    rgba(40, 20, 80, 0.45) 70%,
    rgba(10, 10, 46, 0.6) 100%
  );
  backdrop-filter: blur(1px);
}

/* ============ 粒子画布 ============ */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ============ 主容器 ============ */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.container.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 顶部信息栏 ============ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  z-index: 10;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 100%);
}

.date-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.bing-credit {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 300;
  max-width: 400px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.bing-credit:hover {
  opacity: 1;
}

/* ============ 主标题区 ============ */
.hero-section {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 1s ease 0.3s both;
}

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

.year-badge {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--accent-gradient);
  padding: 6px 24px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: 3px;
  box-shadow: 0 4px 20px var(--accent-glow);
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 4px 20px var(--accent-glow); }
  50% { box-shadow: 0 4px 35px var(--accent-glow), 0 0 60px rgba(102, 126, 234, 0.2); }
}

.main-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--text-primary);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  letter-spacing: 8px;
  line-height: 1.3;
}

.title-icon {
  display: inline-block;
  font-size: 0.8em;
  margin-right: 8px;
  animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(-5deg); }
  75% { transform: translateY(-3px) rotate(3deg); }
}

.subtitle {
  margin-top: 12px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 6px;
}

/* ============ 倒计时卡片 ============ */
.countdown-grid {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 50px;
  animation: fadeInUp 1s ease 0.5s both;
}

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

.countdown-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px 18px;
  min-width: 130px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 8px 32px var(--glass-shadow);
}

.countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.countdown-card:hover {
  background: var(--card-hover);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 48px var(--glass-shadow), 0 0 40px var(--accent-glow);
}

.countdown-card:hover::before {
  opacity: 1;
}

.card-value {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  color: var(--text-primary);
  font-family: 'Outfit', monospace;
  line-height: 1;
  text-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
  transition: transform 0.3s ease, color 0.3s ease;
}

.card-value.flip {
  animation: flipNum 0.3s ease;
}

@keyframes flipNum {
  0% { transform: scale(1) translateY(0); }
  40% { transform: scale(0.85) translateY(5px); opacity: 0.6; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.card-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  letter-spacing: 4px;
  margin-top: 8px;
  text-transform: uppercase;
}

.card-label-cn {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
  font-family: 'Noto Sans SC', sans-serif;
}

.countdown-separator {
  font-size: 3rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.3);
  animation: separatorBlink 1s ease-in-out infinite;
  user-select: none;
}

@keyframes separatorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============ 励志语句 ============ */
.quote-section {
  text-align: center;
  max-width: 700px;
  margin-bottom: 40px;
  animation: fadeInUp 1s ease 0.7s both;
}

.quote-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.2) rotate(10deg); opacity: 0.8; }
}

.quote-text {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 2px;
  font-family: 'Noto Sans SC', sans-serif;
  transition: opacity 0.5s ease;
  background: linear-gradient(90deg, 
    rgba(255,255,255,0.6), 
    rgba(255,255,255,0.9), 
    rgba(255,255,255,0.6));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

/* ============ 进度条 ============ */
.progress-section {
  width: 100%;
  max-width: 500px;
  animation: fadeInUp 1s ease 0.9s both;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--progress-gradient);
  background-size: 200% 100%;
  border-radius: 10px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  animation: progressShine 3s linear infinite;
}

@keyframes progressShine {
  to { background-position: 200% 0; }
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-glow);
}

/* ============ 响应式设计 ============ */
@media screen and (max-width: 768px) {
  .container {
    padding: 80px 16px 40px;
  }

  .top-bar {
    padding: 12px 16px;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .bing-credit {
    max-width: 100%;
    font-size: 0.65rem;
  }

  .hero-section {
    margin-bottom: 40px;
  }

  .main-title {
    letter-spacing: 4px;
  }

  .subtitle {
    letter-spacing: 3px;
    font-size: 0.9rem;
  }

  .countdown-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .countdown-card {
    min-width: 100px;
    padding: 18px 14px 14px;
    border-radius: var(--radius-md);
  }

  .card-value {
    font-size: 2.8rem;
  }

  .countdown-separator {
    font-size: 2rem;
    display: none;
  }

  .quote-text {
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .progress-section {
    max-width: 90%;
  }
}

@media screen and (max-width: 480px) {
  .countdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .countdown-separator {
    display: none;
  }

  .countdown-card {
    min-width: unset;
  }

  .card-value {
    font-size: 2.5rem;
  }

  .year-badge {
    font-size: 0.9rem;
    padding: 5px 18px;
  }
}

/* ============ 滚动条美化 ============ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============ 选中文本样式 ============ */
::selection {
  background: rgba(102, 126, 234, 0.4);
  color: white;
}
