* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow: hidden;
}

/* 默认背景，如果 JS 成功加载缓存的壁纸会覆盖下面的伪元素样式 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://cdn.jsdelivr.net/gh/WangNingkai/BingImageApi@latest/images/latest.png') no-repeat center center/cover;
  z-index: -2;
  will-change: background;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: -1;
}

.center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 4rem;
  font-weight: bold;
  text-align: center;
  line-height: 1.3;
  transition: opacity 0.6s ease;
  max-width: 1800px;
  width: 80%;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.poem-meta {
  font-size: 1.2rem;
  text-align: right;
  margin-top: 0.8rem;
  opacity: 0.85;
}

@media (max-width: 900px) {
  .center-text {
    font-size: 2.2rem;
  }

  .poem-meta {
    font-size: 0.9rem;
  }
}

.top-right {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.earth-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  animation: breathe 3s ease-in-out infinite;
}

.github-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
}

.github-icon:hover {
  animation: breathe-hover 1.5s ease-in-out infinite;
}

.top-right-link {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
}

.top-right-link:hover {
  animation: breathe-hover 1.5s ease-in-out infinite;
}

.earth-icon:hover {
  animation: breathe-hover 1.5s ease-in-out infinite;
}

@keyframes breathe {

  0%,
  100% {
    transform: scale(1.0);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes breathe-hover {

  0%,
  100% {
    transform: scale(1.0);
  }

  50% {
    transform: scale(1.12);
  }
}

.language-selector {
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 0.9rem;
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.language-selector option {
  color: black;
}

footer {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 100%;
  text-align: right;
  color: #ccc;
  font-size: 0.9rem;
}

footer a {
  color: #ccc;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}