* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    height: 100vh;
    position: relative;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 页面加载动画 */
body.loading {
    opacity: 0;
}

body.loaded {
    animation: pageFadeIn 1.5s ease forwards;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    animation: containerSlideIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
}

@keyframes containerSlideIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.heart-container {
    margin-bottom: 30px;
    animation: heartPulse 2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes heartPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

.heart {
    width: 100px;
    height: 90px;
    position: relative;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.heart:before,
.heart:after {
    content: '';
    width: 52px;
    height: 80px;
    position: absolute;
    left: 50px;
    top: 0;
    background: #ff6b9d;
    border-radius: 50px 50px 0 0;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.6);
}

.heart:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40%, 50%, 60%, 70%, 80%, 90% {
        transform: scale(1.1);
    }
}

.content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: contentGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.1) 0%, transparent 70%);
    animation: rotateGlow 8s linear infinite;
    pointer-events: none;
}

@keyframes contentGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 20px rgba(255, 107, 157, 0.3);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 40px rgba(255, 107, 157, 0.6);
    }
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.title {
    font-size: 3em;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #ff6b9d, #ffd93d, #ff6b9d, #ff6b9d);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s linear infinite, titleShimmer 2s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 107, 157, 0.5);
    position: relative;
    display: inline-block;
    transform-style: preserve-3d;
    perspective: 1000px;
}

@keyframes titleShimmer {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.messages {
    min-height: 150px;
    margin-bottom: 20px;
    position: relative;
    perspective: 1000px;
}

.message {
    font-size: 1.5em;
    line-height: 1.8;
    margin: 20px 0;
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(30px) scale(0.8) rotateX(90deg);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.message.active {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    animation: messageGlow 2s ease-in-out infinite;
}

.message.exit {
    opacity: 0;
    transform: translateY(-30px) scale(0.8) rotateX(-90deg);
}

@keyframes messageGlow {
    0%, 100% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.2);
    }
    50% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 107, 157, 0.5);
    }
}

/* 打字机效果 */
.message.typing::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 5px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.signature {
    font-size: 1.3em;
    margin-top: 30px;
    opacity: 0;
    animation: fadeIn 2s ease 1s forwards, signatureFloat 3s ease-in-out infinite 2s;
    font-style: italic;
    color: #ffd93d;
    text-shadow: 0 0 10px rgba(255, 217, 61, 0.5);
    position: relative;
    display: inline-block;
}

@keyframes signatureFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 3;
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    color: rgba(255, 107, 157, 0.8);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(255, 107, 157, 0.8));
    transition: transform 0.3s ease;
}

.floating-heart:hover {
    transform: scale(1.5);
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) rotate(36deg) scale(1);
    }
    50% {
        transform: translateY(50vh) rotate(180deg) scale(1.2);
    }
    90% {
        opacity: 1;
        transform: translateY(10vh) rotate(324deg) scale(1);
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* 星空背景 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* 粒子爆炸效果 */
.explosion {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.explosion-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ff6b9d, #ffd93d);
    border-radius: 50%;
    animation: explode 1s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2em;
    }
    
    .message {
        font-size: 1.2em;
    }
    
    .heart {
        width: 80px;
        height: 72px;
    }
    
    .heart:before,
    .heart:after {
        width: 42px;
        height: 64px;
    }
    
    .content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5em;
    }
    
    .message {
        font-size: 1em;
    }
    
    .signature {
        font-size: 1em;
    }
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ff6b9d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

