* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: auto;
}

html,
body,
#loading {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #0d1117;
  color: #dfd9d6;
}

#loading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.loading_image {
  display: block;
  animation: loading_pulse 2s infinite;
}

.loading_head {
  text-align: center;
  margin-top: 15px;
}

.loading_school {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.loading_project {
  font-size: 20px;
  color: #98c379;
  margin-top: 10px;
  text-shadow: 0 0 20px rgba(152, 195, 121, 0.8);
  animation: loading_glow 1s ease-in-out infinite alternate;
}

.loading_body {
  margin-top: 15px;
  font-size: 16px;
}

@keyframes loading_pulse {
  0% {
    transform: scale(0.95);
  }

  50% {
    transform: scale(1);
  }

  100% {
    transform: scale(0.95);
  }
}

@keyframes loading_glow {
  from {
    text-shadow: 0 0 10px rgba(152, 195, 121, 0.4);
  }

  to {
    text-shadow: 0 0 30px rgba(152, 195, 121, 0.9), 0 0 60px rgba(152, 195, 121, 0.4);
  }
}

.stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.star_shape {
  position: absolute;
  color: var(--star-color);
  animation: star_flash var(--anim-duration) ease-in-out var(--anim-delay) infinite;
  filter: drop-shadow(0 0 4px var(--star-color));
}

.star_shape.diamond {
  background: var(--star-color);
  transform: rotate(var(--initial-rot));
  border-radius: 1px;
}

.star_shape.star {
  transform: rotate(var(--initial-rot));
}

.star_shape.star svg {
  width: 100%;
  height: 100%;
  display: block;
}

.star_point {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: star_twinkle infinite alternate;
  z-index: 0;
}

@keyframes star_flash {
  0% {
    opacity: 0;
    transform: rotate(var(--initial-rot)) scale(0.2);
  }

  40% {
    opacity: 0.85;
    transform: rotate(calc(var(--initial-rot) + var(--anim-rot))) scale(1);
  }

  60% {
    opacity: 0.85;
    transform: rotate(calc(var(--initial-rot) + var(--anim-rot) * 1.5)) scale(1);
  }

  100% {
    opacity: 0;
    transform: rotate(calc(var(--initial-rot) + var(--anim-rot) * 2)) scale(0.2);
  }
}

@keyframes star_twinkle {
  0% {
    opacity: 0.2;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.app {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.canvas {
  position: absolute;
  inset: 0;
  z-index: 9;
}

.canvas :deep(div) {
  width: 100% !important;
  height: 100% !important;
}

canvas {
  cursor: url('../image/cursor.webp'), pointer;
}

/* ===== Task Popup ===== */
.task-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 8, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.task-popup-overlay.show {
  opacity: 1;
}

.task-popup-panel {
  position: relative;
  width: 560px;
  max-width: 90vw;
  padding: 40px 30px 30px;
  border-radius: 28px;
  background: radial-gradient(ellipse at 50% 40%, rgba(15, 22, 40, 0.9) 0%, rgba(6, 9, 15, 0.95) 70%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 60px rgba(0, 175, 207, 0.15), 0 0 120px rgba(126, 56, 176, 0.08);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.task-popup-overlay.show .task-popup-panel {
  transform: scale(1) translateY(0);
}

.task-popup-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.task-popup-header {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 6px;
  margin-bottom: 24px;
  text-shadow:
    0 0 20px rgba(0, 175, 207, 0.5),
    0 0 40px rgba(126, 56, 176, 0.3);
}

.task-popup-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-popup-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(8, 12, 22, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.task-popup-item:hover {
  border-color: rgba(0, 175, 207, 0.4);
  background: linear-gradient(135deg, rgba(0, 175, 207, 0.1) 0%, rgba(126, 56, 176, 0.08) 100%);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(0, 175, 207, 0.15);
}

.task-popup-type-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  mix-blend-mode: screen;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 16px rgba(0, 175, 207, 0.25);
}

.task-popup-title {
  flex: 1;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 3px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.task-popup-status-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  mix-blend-mode: screen;
  opacity: 0.9;
}

.task-popup-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.task-popup-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(90deg);
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  .task-popup-panel {
    width: 92vw;
    padding: 32px 18px 22px;
    border-radius: 22px;
  }

  .task-popup-header {
    font-size: 22px;
    letter-spacing: 4px;
    margin-bottom: 18px;
  }

  .task-popup-list {
    gap: 10px;
  }

  .task-popup-item {
    gap: 12px;
    padding: 14px 14px;
    border-radius: 16px;
  }

  .task-popup-type-icon {
    width: 48px;
    height: 48px;
  }

  .task-popup-title {
    font-size: 17px;
    letter-spacing: 2px;
  }

  .task-popup-status-icon {
    width: 36px;
    height: 36px;
  }

  .task-popup-close {
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  /* touch 设备移除 hover 变换，避免误触残留 */
  .task-popup-item:hover {
    transform: none;
  }
}