/* ==========================================================================
   贝贝云机场 - 数字盲盒与幸运扭蛋风样式库 (Mystery Digital Box Macaron Style)
   ========================================================================== */

:root {
  --primary: #FF5E8E;
  --primary-light: #FFA3BE;
  --secondary: #38EF7D;
  --accent-cyan: #00F5D4;
  --accent-purple: #9D4EDD;
  --accent-yellow: #FFD166;
  --bg-dark: #0B0E14;
  --card-bg: rgba(22, 27, 46, 0.75);
  --glass-border: rgba(255, 255, 255, 0.12);
  --macaron-pink: #FF6584;
  --macaron-mint: #2EC4B6;
  --macaron-purple: #845EC2;
  --macaron-gold: #FFC75F;
}

/* 基础重置与平滑滚动 */
html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: #F3F4F6;
  overflow-x: hidden;
  position: relative;
}

/* 动态背景画布 */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* 炫彩马卡龙文字渐变 */
.text-macaron-gradient {
  background: linear-gradient(135deg, #FF70A6 0%, #FF9770 25%, #FFD670 50%, #E9FF70 75%, #70D6FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-candy-pink {
  background: linear-gradient(135deg, #FF6584 0%, #FF8FA3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-neon-cyan {
  background: linear-gradient(135deg, #00F5D4 0%, #70D6FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 潮流马卡龙玻璃卡片 */
.macaron-card {
  background: linear-gradient(135deg, rgba(25, 30, 52, 0.7) 0%, rgba(16, 20, 36, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 
              inset 0 1px 1px rgba(255, 255, 255, 0.2),
              0 0 30px rgba(255, 112, 166, 0.05);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.macaron-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 151, 0.45);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 
              0 0 40px rgba(255, 112, 166, 0.2),
              inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* 糖果晶莹高光标签 */
.candy-badge {
  background: linear-gradient(135deg, rgba(255, 107, 151, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(255, 107, 151, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 9999px;
  color: #FFB3C6;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 107, 151, 0.2);
}

/* 潮流 3D 能量宝盒容器 */
.box-scene {
  perspective: 1200px;
  perspective-origin: 50% 40%;
}

.box-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto;
  transform-style: preserve-3d;
  animation: floatBox 4s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.box-wrapper:hover {
  transform: scale(1.06) rotateY(12deg) rotateX(-8deg);
}

@keyframes floatBox {
  0%, 100% {
    transform: translateY(0px) rotateY(0deg) rotateX(4deg);
  }
  50% {
    transform: translateY(-20px) rotateY(15deg) rotateX(-6deg);
  }
}

/* 盒子剧烈震颤动效（开箱瞬间） */
.box-wrapper.shaking {
  animation: shakeBurst 0.9s cubic-bezier(.36,.07,.19,.97) both !important;
}

@keyframes shakeBurst {
  10%, 90% { transform: translate3d(-3px, -2px, 0) rotateZ(-3deg) scale(1.05); }
  20%, 80% { transform: translate3d(5px, 3px, 0) rotateZ(4deg) scale(1.1); }
  30%, 50%, 70% { transform: translate3d(-8px, -5px, 0) rotateZ(-6deg) scale(1.15); filter: brightness(1.3); }
  40%, 60% { transform: translate3d(8px, 6px, 0) rotateZ(6deg) scale(1.2); filter: drop-shadow(0 0 30px #FF6584); }
}

/* 3D 盒子各面拟真塑料与气球反光质感 */
.cube {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.cube-face {
  position: absolute;
  width: 220px;
  height: 220px;
  top: 20px;
  left: 20px;
  background: radial-gradient(circle at 35% 30%, #FF97B7 0%, #FF4F81 55%, #B51755 100%);
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  box-shadow: inset 0 0 35px rgba(255, 255, 255, 0.4),
              0 15px 35px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  backface-visibility: hidden;
}

/* 缎带与能量光环 */
.cube-face::before {
  content: '';
  position: absolute;
  width: 44px;
  height: 100%;
  background: linear-gradient(180deg, #FFE66D, #FFAA00);
  box-shadow: 0 0 15px rgba(255, 214, 10, 0.7);
  border-radius: 6px;
}

.cube-face::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 44px;
  background: linear-gradient(90deg, #FFE66D, #FFAA00);
  box-shadow: 0 0 15px rgba(255, 214, 10, 0.7);
  border-radius: 6px;
}

.face-front  { transform: translateZ(110px); }
.face-back   { transform: rotateY(180deg) translateZ(110px); }
.face-right  { transform: rotateY(90deg) translateZ(110px); filter: brightness(0.9); }
.face-left   { transform: rotateY(-90deg) translateZ(110px); filter: brightness(0.85); }
.face-top    { transform: rotateX(90deg) translateZ(110px); filter: brightness(1.15); }
.face-bottom { transform: rotateX(-90deg) translateZ(110px); filter: brightness(0.7); }

/* 盒子盖子开启动态 */
.cube-lid {
  position: absolute;
  width: 236px;
  height: 40px;
  top: 6px;
  left: 12px;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.box-wrapper.opened .cube-lid {
  transform: translateY(-90px) rotateX(120deg) scale(1.1);
  opacity: 0.9;
}

/* 霓虹按钮动效 */
.btn-macaron-glow {
  background: linear-gradient(135deg, #FF5E8E 0%, #FF8E53 50%, #FFAA00 100%);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(255, 94, 142, 0.4), 
              0 0 20px rgba(255, 142, 83, 0.3),
              inset 0 1px 2px rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-macaron-glow:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 45px rgba(255, 94, 142, 0.6), 
              0 0 35px rgba(255, 170, 0, 0.5),
              inset 0 1px 3px rgba(255, 255, 255, 0.8);
}

.btn-macaron-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.btn-macaron-glow:hover::after {
  opacity: 1;
}

/* 呼吸灯效果 */
.pulse-glow {
  box-shadow: 0 0 0 0 rgba(78, 236, 212, 0.7);
  animation: pulseLight 2s infinite;
}

@keyframes pulseLight {
  0% {
    box-shadow: 0 0 0 0 rgba(78, 236, 212, 0.7);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(78, 236, 212, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(78, 236, 212, 0);
  }
}

/* 纸屑动画画布 (Confetti Canvas) */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  pointer-events: none;
}

/* 状态指示器绿灯点 */
.ping-dot {
  position: relative;
  display: inline-flex;
}

.ping-dot::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: inherit;
  opacity: 0.75;
  animation: pingAnimation 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pingAnimation {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* 弹跳徽章动画 */
@keyframes bounceSoft {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-bounce-soft {
  animation: bounceSoft 2.5s ease-in-out infinite;
}

/* 盲盒中奖弹窗 */
.modal-backdrop {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 9, 15, 0.82);
}

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

::-webkit-scrollbar-track {
  background: #0B0E14;
}

::-webkit-scrollbar-thumb {
  background: #252D42;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #FF5E8E;
}

