/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #fff;
    line-height: 1.6;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 粒子背景 */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* 浮动爱心 */
#floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.floating-heart {
    position: absolute;
    font-size: 24px;
    color: rgba(255, 182, 193, 0.8);
    animation: floatUp 8s linear infinite;
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 主容器 */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 标题区域 */
.hero-section {
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.title-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 60px 40px;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.main-title {
    font-family: 'Dancing Script', cursive;
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.letter {
    display: inline-block;
    animation: letterBounce 2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

.letter:nth-child(1) { --i: 0; color: #ff6b9d; }
.letter:nth-child(2) { --i: 1; color: #a8e6cf; }
.letter:nth-child(3) { --i: 2; color: #ffd93d; }

@keyframes letterBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.9;
}

.heart-divider {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.heart {
    font-size: 2rem;
    animation: heartBeat 1.5s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.2s);
}

.heart:nth-child(1) { --i: 0; }
.heart:nth-child(2) { --i: 1; }
.heart:nth-child(3) { --i: 2; }

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* 通用章节样式 */
section {
    margin: 80px 0;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

section h2 {
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 30px;
    font-family: 'Dancing Script', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* 倒计时区域 */
.countdown-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd93d;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.countdown-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* 互动爱心区域 */
.heart-generator {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    max-width: 200px;
    margin: 0 auto;
    position: relative;
}

.heart-generator:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.big-heart {
    font-size: 4rem;
    animation: heartPulse 1s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.heart-generator p {
    margin-top: 15px;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* 生成的爱心动画 */
.generated-heart {
    position: absolute;
    font-size: 2rem;
    color: #ff6b9d;
    animation: heartFly 2s ease-out forwards;
    pointer-events: none;
}

@keyframes heartFly {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.5) rotate(360deg) translateY(-100px);
        opacity: 0;
    }
}

/* 文字轮播 */
.message-carousel {
    position: relative;
    height: 80px;
    overflow: hidden;
    margin-bottom: 30px;
}

.message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.message.active {
    opacity: 1;
    transform: translateY(0);
}

.message p {
    font-size: 1.3rem;
    font-style: italic;
    font-family: 'Dancing Script', cursive;
    font-weight: 500;
    line-height: 1.4;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #ffd93d;
    transform: scale(1.3);
}

/* 3D爱心 */
.heart-3d {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3d 4s linear infinite;
}

@keyframes rotate3d {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.heart-3d-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff6b9d, #ffd93d);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    animation: heartbeat3d 1.5s ease-in-out infinite;
}

@keyframes heartbeat3d {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.heart-3d-inner::before,
.heart-3d-inner::after {
    content: '';
    position: absolute;
    width: 75px;
    height: 120px;
    background: linear-gradient(45deg, #ff6b9d, #ffd93d);
    border-radius: 75px 75px 0 0;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.heart-3d-inner::before {
    left: 75px;
}

.heart-3d-inner::after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

/* 星空许愿区 */
.stars-container {
    position: relative;
    height: 200px;
    margin-bottom: 30px;
    border-radius: 15px;
    background: linear-gradient(135deg, #0c0c0c, #1a1a2e, #16213e);
    overflow: hidden;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #fff, transparent);
    animation: shoot 3s linear infinite;
}

@keyframes shoot {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    100% {
        transform: translateX(300px) translateY(300px);
        opacity: 0;
    }
}

.wish-input-container {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto 20px;
}

#wish-input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

#wish-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#make-wish-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #ffd93d, #ff6b9d);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#make-wish-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#wish-display {
    min-height: 40px;
    font-style: italic;
    color: #ffd93d;
    font-size: 1.1rem;
}

/* 记忆墙 */
.polaroid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.polaroid {
    background: #fff;
    padding: 20px 20px 60px;
    border-radius: 5px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: rotate(var(--rotation));
    transition: all 0.3s ease;
    cursor: pointer;
}

.polaroid:nth-child(1) { --rotation: -5deg; }
.polaroid:nth-child(2) { --rotation: 3deg; }
.polaroid:nth-child(3) { --rotation: -3deg; }
.polaroid:nth-child(4) { --rotation: 5deg; }

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.polaroid-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 15px;
}

.polaroid-caption {
    color: #333;
    font-size: 1rem;
    text-align: center;
    font-weight: 500;
}

/* 音乐控制器 */
.music-controller {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
}

.music-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
}

.music-btn.playing {
    animation: musicPulse 1s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.music-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 底部签名 */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 80px;
}

.signature p {
    font-size: 1.3rem;
    font-family: 'Dancing Script', cursive;
    margin-bottom: 10px;
}

.date {
    font-size: 1rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 3.5rem;
    }
    
    .subtitle {
        font-size: 1.4rem;
    }
    
    .title-wrapper {
        padding: 40px 30px;
    }
    
    section {
        margin: 40px 0;
        padding: 30px 15px;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
    
    .countdown-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .countdown-number {
        font-size: 2rem;
    }
    
    .polaroid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .music-controller {
        bottom: 20px;
        right: 20px;
        padding: 10px 15px;
    }
    
    .music-text {
        display: none;
    }
    
    .wish-input-container {
        flex-direction: column;
    }
    
    .heart-3d {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .main-title {
        font-size: 2.8rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .countdown-container {
        grid-template-columns: 1fr 1fr;
        max-width: 300px;
    }
    
    .countdown-number {
        font-size: 1.8rem;
    }
    
    .message p {
        font-size: 1.1rem;
    }
    
    .polaroid-container {
        grid-template-columns: 1fr;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.8s ease-out;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
} 