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

body {
    background: radial-gradient(circle at center, #3b0024 0%, #0a001a 100%);
    overflow: hidden;
    font-family: 'Georgia', 'Microsoft YaHei', 'PingFang SC', serif;
    color: #fff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

#background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* 浪漫光晕效果 */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 105, 180, 0.4) 0%, rgba(255, 105, 180, 0) 70%);
    animation: float 10s infinite ease-in-out alternate;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); opacity: 0.3; }
    100% { transform: translateY(-50px) scale(1.5); opacity: 0.8; }
}

/* 边角精美装饰 */
.corner-decoration {
    position: absolute;
    font-size: 3rem;
    z-index: 5;
    pointer-events: none;
    filter: drop-shadow(0 0 15px rgba(255, 105, 180, 0.8));
    animation: breathe 3s infinite alternate ease-in-out;
}
.top-left { top: 30px; left: 30px; }
.top-right { top: 30px; right: 30px; }
.bottom-left { bottom: 30px; left: 30px; }
.bottom-right { bottom: 30px; right: 30px; }

@keyframes breathe {
    from { transform: scale(1); opacity: 0.7; }
    to { transform: scale(1.15); opacity: 1; }
}

/* 气球容器和样式 */
#floating-balloons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 8;
    overflow: hidden;
}

.balloon {
    position: absolute;
    width: 50px;
    height: 65px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    box-shadow: inset -5px -5px 15px rgba(0,0,0,0.2), 0 0 20px rgba(255, 255, 255, 0.3);
    animation: floatUp linear infinite;
    bottom: -100px;
}

.balloon::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid var(--balloon-color);
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.4);
}

@keyframes floatUp {
    0% { transform: translateY(0) translateX(0) rotate(-5deg); opacity: 0; }
    10% { opacity: 0.9; }
    90% { opacity: 0.9; }
    100% { transform: translateY(-120vh) translateX(var(--swing-x)) rotate(10deg); opacity: 0; }
}

/* 鼠标拖尾特效 */
.mouse-trail {
    position: absolute;
    pointer-events: none;
    z-index: 9999;
    font-size: 18px;
    transform: translate(-50%, -50%);
    animation: fadeShrink 0.8s forwards ease-out;
    filter: drop-shadow(0 0 5px rgba(255, 105, 180, 0.8));
}

@keyframes fadeShrink {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -80px) scale(0.2); opacity: 0; }
}

/* 飘落的鲜花层 */
#falling-petals {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.petal {
    position: absolute;
    width: 20px;
    height: 20px;
    opacity: 0.8;
    animation: fall linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg) scale(0.8); opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg) scale(1.2); opacity: 0; }
}

/* 交互提示 */
.hint {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff99cc;
    text-shadow: 0 0 15px #ff0066, 0 0 30px #ff0066;
    animation: pulse 1.5s infinite;
    z-index: 20;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* 3D 礼物盒场景 */
.scene {
    width: 200px;
    height: 200px;
    position: relative;
    z-index: 30;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: all 1s ease-in-out;
}

.scene:hover .cube {
    box-shadow: 0 0 80px #ff3366;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateBox 8s infinite linear;
    border-radius: 10px;
}

/* 打开礼物盒时的样式 */
.cube.open {
    animation: none;
    transform: rotateX(-15deg) rotateY(35deg);
}

@keyframes rotateBox {
    0% { transform: rotateX(-20deg) rotateY(0deg); }
    100% { transform: rotateX(-20deg) rotateY(360deg); }
}

/* 礼物盒的每一个面 */
.face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #ff0055, #990033);
    border: 2px solid #ff99bb;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

/* 礼物盒彩带 - 竖向 */
.ribbon-v {
    position: absolute;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, #ffd700, #ffea70, #ffd700);
    left: 80px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* 礼物盒彩带 - 横向 */
.ribbon-h {
    position: absolute;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, #ffd700, #ffea70, #ffd700);
    top: 80px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* 3D 转换定位面 */
.front  { transform: translateZ(100px); }
.back   { transform: rotateY(180deg) translateZ(100px); }
.right  { transform: rotateY(90deg) translateZ(100px); }
.left   { transform: rotateY(-90deg) translateZ(100px); }
.top    { transform: rotateX(90deg) translateZ(100px); transition: transform 1s ease-in-out; transform-origin: top; }
.bottom { transform: rotateX(-90deg) translateZ(100px); background: #4a0018;}

/* 打开盒盖动画 */
.cube.open .top {
    transform: rotateX(200deg) translateZ(100px);
}

/* 蝴蝶结 */
.bow {
    position: absolute;
    font-size: 90px;
    transform: translateZ(25px) rotateX(-90deg);
    text-shadow: 0 0 15px #ffcc00;
    pointer-events: none;
}

/* 惊喜隐藏信息 */
#surprise-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    text-align: center;
    z-index: 50;
    transition: all 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
    width: 100%;
}

#surprise-message.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

#surprise-message h1 {
    font-size: 4.5rem;
    font-family: 'Georgia', serif;
    background: -webkit-linear-gradient(45deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 0px 20px rgba(255, 105, 180, 0.6);
    margin-bottom: 20px;
}

#surprise-message p {
    font-size: 2rem;
    color: #ffd1dc;
    text-shadow: 0px 0px 10px #ff6699;
    font-weight: 300;
    letter-spacing: 2px;
}

/* 爆炸粒子特效 */
.particle {
    position: absolute;
    pointer-events: none;
    z-index: 40;
    animation: explode 1.2s forwards cubic-bezier(0.1, 0.8, 0.3, 1);
}

@keyframes explode {
    0% { transform: scale(0.5) translate(0, 0); opacity: 1; }
    80% { opacity: 0.8; }
    100% { transform: scale(1.5) translate(var(--tx), var(--ty)); opacity: 0; }
}

/* 适配移动端 */
@media (max-width: 768px) {
    #surprise-message h1 { font-size: 2.5rem; }
    #surprise-message p { font-size: 1.2rem; }
    .scene { transform: scale(0.8); }
    .corner-decoration { font-size: 2rem; }
}