/* ========== 全局样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 二次元配色方案 */
  --primary-pink: #ffb6c1;
  --secondary-pink: #ffc0cb;
  --light-pink: #ffe4e1;
  --soft-blue: #87ceeb;
  --sky-blue: #b0e0e6;
  --lavender: #e6e6fa;
  --lilac: #c8a2c8;
  --white: #ffffff;
  --text-dark: #4a4a4a;
  --text-light: #7a7a7a;

  /* 渐变色 */
  --gradient-primary: linear-gradient(135deg, #ffb6c1 0%, #87ceeb 100%);
  --gradient-secondary: linear-gradient(135deg, #c8a2c8 0%, #ffe4e1 100%);
  --gradient-glow: linear-gradient(135deg, #ffd700 0%, #ffb6c1 50%, #87ceeb 100%);
}

body {
  font-family: "Noto Sans SC", sans-serif;
  background-image: url("【哲风壁纸】傍晚路灯-山脉-水面.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  color: var(--text-dark);
}

/* 背景模糊遮罩层 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 228, 225, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}

/* ========== 星星装饰 ========== */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: twinkle 2s ease-in-out infinite;
}

.star-1 {
  width: 3px;
  height: 3px;
  top: 10%;
  left: 15%;
  animation-delay: 0s;
}
.star-2 {
  width: 2px;
  height: 2px;
  top: 20%;
  left: 80%;
  animation-delay: 0.5s;
}
.star-3 {
  width: 4px;
  height: 4px;
  top: 40%;
  left: 10%;
  animation-delay: 1s;
}
.star-4 {
  width: 2px;
  height: 2px;
  top: 60%;
  left: 90%;
  animation-delay: 1.5s;
}
.star-5 {
  width: 3px;
  height: 3px;
  top: 80%;
  left: 20%;
  animation-delay: 2s;
}
.star-6 {
  width: 2px;
  height: 2px;
  top: 30%;
  left: 50%;
  animation-delay: 0.3s;
}
.star-7 {
  width: 3px;
  height: 3px;
  top: 70%;
  left: 70%;
  animation-delay: 0.7s;
}
.star-8 {
  width: 2px;
  height: 2px;
  top: 50%;
  left: 30%;
  animation-delay: 1.2s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ========== 弹幕容器 ========== */
.danmaku-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.danmaku {
  position: absolute;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
  animation: danmaku-move linear;
  pointer-events: none;
  transition: transform 0.3s ease;
  will-change: transform;
}

.danmaku.style-1 {
  background: rgba(255, 182, 193, 0.85);
  padding: 8px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(255, 182, 193, 0.4);
}

.danmaku.style-2 {
  background: rgba(135, 206, 235, 0.85);
  padding: 8px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.4);
}

.danmaku.style-3 {
  background: rgba(200, 162, 200, 0.85);
  padding: 8px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(200, 162, 200, 0.4);
}

.danmaku.style-4 {
  background: linear-gradient(45deg, rgba(255, 182, 193, 0.9), rgba(135, 206, 235, 0.9));
  padding: 8px 20px;
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(255, 182, 193, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.danmaku.style-5 {
  background: rgba(255, 215, 0, 0.85);
  padding: 10px 25px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.6);
  font-weight: 700;
  color: #ff6b6b;
}

.danmaku.style-6 {
  background: rgba(144, 238, 144, 0.85);
  padding: 8px 20px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(144, 238, 144, 0.4);
  color: #2e8b57;
}

.danmaku.firework-style {
  background: linear-gradient(
    135deg,
    rgba(255, 69, 0, 0.9),
    rgba(255, 140, 0, 0.9),
    rgba(255, 215, 0, 0.9)
  );
  padding: 12px 30px;
  border-radius: 50%;
  box-shadow:
    0 0 20px rgba(255, 69, 0, 0.8),
    0 0 40px rgba(255, 140, 0, 0.6),
    0 0 60px rgba(255, 215, 0, 0.4);
  font-weight: 800;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: firework-pulse 1s ease-in-out infinite alternate;
}

@keyframes firework-pulse {
  0% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.1) rotate(5deg);
  }
}

.danmaku.rainbow-style {
  background: linear-gradient(
    45deg,
    rgba(255, 0, 0, 0.8),
    rgba(255, 165, 0, 0.8),
    rgba(255, 255, 0, 0.8),
    rgba(0, 255, 0, 0.8),
    rgba(0, 127, 255, 0.8),
    rgba(0, 0, 255, 0.8),
    rgba(139, 0, 255, 0.8)
  );
  padding: 10px 25px;
  border-radius: 20px;
  box-shadow: 0 4px 25px rgba(255, 255, 255, 0.5);
  color: white;
  font-weight: 700;
  animation: rainbow-glow 2s ease-in-out infinite alternate;
}

@keyframes rainbow-glow {
  0% {
    filter: hue-rotate(0deg) brightness(1);
  }
  100% {
    filter: hue-rotate(360deg) brightness(1.2);
  }
}

.danmaku.sparkle-style {
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 20px;
  border-radius: 20px;
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.8),
    0 0 40px rgba(255, 182, 193, 0.6),
    inset 0 0 20px rgba(255, 255, 255, 0.5);
  color: #ff69b4;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

.danmaku.sparkle-style::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: sparkle-rotate 2s linear infinite;
}

@keyframes sparkle-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes danmaku-move {
  0% {
    transform: translateX(100vw) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateX(90vw) scale(1);
  }
  90% {
    opacity: 1;
    transform: translateX(-100%) scale(1);
  }
  100% {
    transform: translateX(-120%) scale(0.8);
    opacity: 0;
  }
}

/* 旋转效果 - 使用CSS自定义属性 */
.danmaku.rotated {
  transform: translateX(100vw) rotate(var(--rotation, 0deg));
}

@keyframes danmaku-move-rotated {
  from {
    transform: translateX(100vw) rotate(var(--rotation, 0deg));
  }
  to {
    transform: translateX(-120%) rotate(var(--rotation, 0deg));
  }
}

/* ========== 主容器 ========== */
.main-container {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ========== 标题区域 ========== */
.title-section {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeInDown 1s ease-out;
  transition: transform 0.3s ease;
}

.title-section:hover {
  transform: scale(1.05);
}

.anime-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

.title-icon {
  font-size: 36px;
  animation: rotate 3s ease-in-out infinite;
}

@keyframes rotate {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(10deg) scale(1.1);
  }
}

.main-title {
  display: flex;
  gap: 10px;
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.title-char {
  display: inline-block;
  animation: bounce 0.6s ease-in-out infinite;
}

.title-char:nth-child(1) {
  animation-delay: 0s;
}
.title-char:nth-child(2) {
  animation-delay: 0.1s;
}
.title-char:nth-child(3) {
  animation-delay: 0.2s;
}
.title-char:nth-child(4) {
  animation-delay: 0.3s;
}
.title-char:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.subtitle {
  font-size: 1.3rem;
  color: var(--text-dark);
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sparkle {
  animation: sparkle 1.5s ease-in-out infinite;
}

.sparkle:nth-child(1) {
  animation-delay: 0s;
}
.sparkle:nth-child(3) {
  animation-delay: 0.75s;
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* ========== 倒计时区域 ========== */
.countdown-wrapper {
  margin: 40px 0;
  animation: fadeInUp 1s ease-out;
}

.countdown-number {
  display: inline-block;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-weight: 800;
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(255, 182, 193, 0.5));
  animation: number-pulse 2s ease-in-out infinite;
}

@keyframes number-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(255, 182, 193, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 182, 193, 1));
  }
}

.countdown-number.number-changed {
  animation:
    numberFlip 0.6s ease-out,
    number-pulse 2s ease-in-out infinite;
}

@keyframes numberFlip {
  0% {
    transform: scale(1) rotateY(0deg);
  }
  50% {
    transform: scale(1.3) rotateY(180deg);
  }
  100% {
    transform: scale(1) rotateY(360deg);
  }
}

@keyframes numberGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 5px rgba(255, 182, 193, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 182, 193, 1));
  }
}

.anime-border {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 10px;
  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.15),
    inset 0 0 30px rgba(255, 182, 193, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.anime-border:hover {
  transform: scale(1.02);
  box-shadow:
    0 12px 40px rgba(31, 38, 135, 0.2),
    inset 0 0 40px rgba(255, 182, 193, 0.4);
}

.anime-border::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 182, 193, 0.3) 60deg,
    transparent 120deg,
    rgba(135, 206, 235, 0.3) 180deg,
    transparent 240deg,
    rgba(200, 162, 200, 0.3) 300deg,
    transparent 360deg
  );
  animation: rotate-border 10s linear infinite;
}

@keyframes rotate-border {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.countdown-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 25px;
  z-index: 1;
}

.countdown-text {
  font-family: "Fredoka One", cursive;
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  line-height: 1.5;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.countdown-text .number {
  display: inline-block;
  padding: 5px 15px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-radius: 10px;
  margin: 0 3px;
}

/* ========== 弹幕输入区域 ========== */
.danmaku-input-section {
  width: 100%;
  max-width: 600px;
  margin: 40px 0;
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

.anime-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 30px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.1),
    inset 0 0 20px rgba(255, 182, 193, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.6);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.anime-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.2),
    inset 0 0 30px rgba(255, 182, 193, 0.4);
  border-color: rgba(255, 182, 193, 0.8);
  animation: card-float 3s ease-in-out infinite;
}

@keyframes card-float {
  0%,
  100% {
    transform: translateY(-5px) scale(1.01);
  }
  50% {
    transform: translateY(-8px) scale(1.01);
  }
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.card-icon {
  font-size: 1.8rem;
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

.card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
}

.input-wrapper {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

#danmakuInput {
  flex: 1;
  padding: 15px 25px;
  font-size: 1rem;
  border: 2px solid rgba(255, 182, 193, 0.5);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  outline: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: "Noto Sans SC", sans-serif;
}

#danmakuInput:focus {
  border-color: var(--primary-pink);
  box-shadow:
    0 0 0 4px rgba(255, 182, 193, 0.2),
    0 0 20px rgba(255, 182, 193, 0.4);
  transform: scale(1.02);
}

#danmakuInput::placeholder {
  color: var(--text-light);
  transition: opacity 0.3s ease;
}

#danmakuInput:focus::placeholder {
  opacity: 0.5;
}

.anime-button {
  padding: 15px 35px;
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 5px 20px rgba(255, 182, 193, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: "Noto Sans SC", sans-serif;
  position: relative;
  overflow: hidden;
}

.anime-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.anime-button:hover::before {
  left: 100%;
}

.anime-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 30px rgba(255, 182, 193, 0.7);
}

.anime-button:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 5px 15px rgba(255, 182, 193, 0.5);
}

/* 涟漪效果 */
.anime-button {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn-icon {
  font-size: 1.2rem;
  animation: rocket 2s ease-in-out infinite;
}

@keyframes rocket {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

.quick-messages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-btn {
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-dark);
  border: 2px solid rgba(255, 182, 193, 0.4);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: "Noto Sans SC", sans-serif;
  position: relative;
  overflow: hidden;
}

.quick-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--primary-pink);
  transition: width 0.3s ease;
  z-index: -1;
}

.quick-btn:hover::after {
  width: 100%;
}

.quick-btn:hover {
  color: white;
  border-color: var(--primary-pink);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(255, 182, 193, 0.5);
}

.quick-btn:active {
  transform: translateY(-1px) scale(1.01);
}

/* 快捷按钮涟漪效果 */
.quick-btn {
  position: relative;
  overflow: hidden;
}

/* ========== 装饰元素 ========== */
.decoration-items {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  top: 0;
  left: 0;
}

.deco-item {
  position: absolute;
  font-size: 3rem;
  opacity: 0.6;
  animation: float-decoration 6s ease-in-out infinite;
}

.deco-1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.deco-2 {
  top: 15%;
  right: 8%;
  animation-delay: 1.5s;
}

.deco-3 {
  bottom: 20%;
  left: 8%;
  animation-delay: 3s;
}

.deco-4 {
  bottom: 15%;
  right: 5%;
  animation-delay: 4.5s;
}

@keyframes float-decoration {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-dark);
  position: relative;
  z-index: 3;
}

.footer-content p {
  font-size: 1rem;
  margin: 5px 0;
  font-weight: 500;
}

.footer-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ========== 动画 ========== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
  .main-title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .countdown-container {
    padding: 30px 20px;
  }

  .countdown-text {
    font-size: 2rem;
  }

  .input-wrapper {
    flex-direction: column;
  }

  .anime-button {
    width: 100%;
    justify-content: center;
  }

  .deco-item {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 20px 10px;
  }

  .main-title {
    font-size: 2rem;
  }

  .anime-title {
    gap: 10px;
  }

  .title-icon {
    font-size: 24px;
  }

  .countdown-container {
    padding: 20px 15px;
  }

  .countdown-text {
    font-size: 1.5rem;
  }
}

/* ========== 移动端触摸优化 ========== */
@media (hover: none) and (pointer: coarse) {
  /* 增大触摸目标 */
  .anime-button {
    min-height: 50px;
    padding: 15px 35px;
  }

  .quick-btn {
    min-height: 45px;
    padding: 12px 20px;
  }

  #danmakuInput {
    min-height: 50px;
    font-size: 16px; /* 防止iOS缩放 */
  }

  /* 减少动画以提升性能 */
  .star {
    animation: twinkle 3s ease-in-out infinite;
  }

  .title-char {
    animation: bounce 1s ease-in-out infinite;
  }

  /* 触摸反馈优化 */
  .anime-button:active {
    transform: scale(0.95);
    background: var(--gradient-secondary);
  }

  .quick-btn:active {
    transform: scale(0.95);
  }

  /* 防止横向滚动 */
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* 优化弹幕显示 */
  .danmaku {
    font-size: 16px; /* 移动端最小字体 */
    padding: 6px 15px;
  }

  /* 优化倒计时显示 */
  .countdown-number {
    font-size: 1.2em;
    margin: 0 2px;
  }
}

/* ========== Toast 通知系统 ========== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toast-slide-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary-pink);
}

.toast.toast-success {
  border-left-color: #4caf50;
}

.toast.toast-error {
  border-left-color: #ff5252;
}

.toast.toast-warning {
  border-left-color: #ffa726;
}

.toast.toast-info {
  border-left-color: var(--primary-pink);
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 500;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

.toast.toast-hiding {
  animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@media (max-width: 480px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    padding: 12px 16px;
  }

  .toast-message {
    font-size: 0.9rem;
  }
}

/* ========== 主题选择器 ========== */
.theme-selector {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.theme-selector-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-primary);
  box-shadow: 0 4px 20px rgba(255, 182, 193, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-selector-btn:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 25px rgba(255, 182, 193, 0.6);
}

.theme-selector-btn:active {
  transform: scale(1.05);
}

.theme-icon {
  font-size: 1.8rem;
}

.theme-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 320px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 20px;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.theme-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 182, 193, 0.3);
}

.theme-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.theme-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.theme-close-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

.theme-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  border: 2px solid transparent;
}

.theme-item:hover {
  background: rgba(255, 182, 193, 0.1);
  transform: translateX(5px);
}

.theme-item:focus {
  outline: none;
  border-color: var(--primary-pink);
}

.theme-item.active {
  background: rgba(255, 182, 193, 0.2);
  border-color: var(--primary-pink);
}

.theme-preview {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.theme-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.theme-desc {
  font-size: 0.8rem;
  color: var(--text-light);
}

.theme-active-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: var(--primary-pink);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 480px) {
  .theme-selector {
    bottom: 10px;
    right: 10px;
  }

  .theme-selector-btn {
    width: 48px;
    height: 48px;
  }

  .theme-panel {
    width: 280px;
    right: -10px;
  }
}

/* ========== 倒计时彩蛋动画 ========== */

/* 1天倒计时彩蛋效果 */
.countdown-one-day-egg {
  animation: body-celebration 3s ease-in-out infinite;
}

@keyframes body-celebration {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.1) saturate(1.2);
  }
}

.toast-countdown-egg {
  background: linear-gradient(135deg, #ffd700, #ffa500) !important;
  border-left-color: #ff6b00 !important;
  font-size: 1.1rem !important;
  padding: 20px 25px !important;
  animation: toast-celebration-pulse 2s ease-in-out infinite;
}

@keyframes toast-celebration-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.5);
  }
}

/* 最后一分钟倒计时效果 */
.last-minute-countdown {
  animation: urgent-pulse 1s ease-in-out infinite;
}

@keyframes urgent-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.final-countdown-pulse .countdown-number {
  animation: final-number-pulse 1s ease-in-out infinite;
}

@keyframes final-number-pulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 10px rgba(255, 182, 193, 0.5);
  }
  50% {
    transform: scale(1.3);
    text-shadow:
      0 0 30px rgba(255, 107, 107, 1),
      0 0 40px rgba(255, 215, 0, 0.8);
    color: #ff6b6b;
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 10px rgba(255, 182, 193, 0.5);
  }
}

.urgent-border {
  animation: border-urgent 0.8s ease-in-out infinite !important;
  border-color: #ff6b6b !important;
  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.15),
    inset 0 0 30px rgba(255, 107, 107, 0.5),
    0 0 0 4px rgba(255, 107, 107, 0.3) !important;
}

@keyframes border-urgent {
  0%,
  100% {
    transform: scale(1);
    border-color: rgba(255, 107, 107, 0.8);
  }
  50% {
    transform: scale(1.02);
    border-color: #ff6b6b;
  }
}

.toast-last-minute {
  background: linear-gradient(135deg, #ff6b6b, #ffa500) !important;
  border-left-color: #ff4500 !important;
  font-size: 1.05rem !important;
  animation: toast-urgent-shake 0.5s ease-in-out;
}

@keyframes toast-urgent-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* 最后一分钟的秒数特殊样式 */
.last-minute-countdown .countdown-number {
  animation: seconds-countdown 1s linear infinite;
}

@keyframes seconds-countdown {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
    color: #ff4500;
  }
  100% {
    transform: scale(1);
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #f0f0f0;
    --text-light: #b0b0b0;
  }

  body::before {
    background: rgba(0, 0, 0, 0.4);
  }

  .anime-card {
    background: rgba(30, 30, 30, 0.8);
    color: var(--text-dark);
  }

  #danmakuInput {
    background: rgba(50, 50, 50, 0.9);
    color: var(--text-dark);
    border-color: rgba(255, 182, 193, 0.7);
  }

  .quick-btn {
    background: rgba(50, 50, 50, 0.8);
    color: var(--text-dark);
  }
}
