/* ================================
   金牛座生日网站 - 主样式文件
   配色：薄荷绿 #98D8C8、樱花粉 #F7CAC9、香槟金 #F5E6D3
   ================================ */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 50%, #f5e6d3 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #5a4a42;
}

/* 金牛座星空背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #f5e6d3, transparent),
        radial-gradient(2px 2px at 40px 70px, #98d8c8, transparent),
        radial-gradient(1px 1px at 90px 40px, #f7cac9, transparent),
        radial-gradient(2px 2px at 160px 120px, #f5e6d3, transparent),
        radial-gradient(1px 1px at 230px 80px, #98d8c8, transparent),
        radial-gradient(2px 2px at 300px 150px, #f7cac9, transparent),
        radial-gradient(1px 1px at 370px 50px, #f5e6d3, transparent),
        radial-gradient(2px 2px at 450px 180px, #98d8c8, transparent);
    background-size: 500px 200px;
    animation: twinkle 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 音乐控制按钮 */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #f7cac9 0%, #f5e6d3 100%);
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(247, 202, 201, 0.4);
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(247, 202, 201, 0.6);
}

.music-btn.playing {
    animation: musicSpin 3s linear infinite;
}

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

/* 飘落星星容器 */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.falling-star {
    position: absolute;
    font-size: 20px;
    animation: fall linear forwards;
    opacity: 0.8;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 通用容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* 第一屏：生日祝福首页 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(180deg, 
        rgba(247, 202, 201, 0.3) 0%, 
        rgba(245, 230, 211, 0.3) 50%, 
        rgba(152, 216, 200, 0.2) 100%);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

/* 蛋糕动画 */
.cake-container {
    margin-bottom: 30px;
    position: relative;
}

.cake {
    width: 120px;
    height: 80px;
    background: linear-gradient(180deg, #f7cac9 0%, #f5e6d3 100%);
    border-radius: 10px 10px 20px 20px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(247, 202, 201, 0.3);
}

.cake::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: linear-gradient(90deg, #98d8c8, #f7cac9, #f5e6d3, #98d8c8);
    border-radius: 10px;
}

.candle {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 30px;
    background: linear-gradient(180deg, #fff 0%, #f7cac9 100%);
    border-radius: 4px;
}

.flame {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 25px;
    background: linear-gradient(180deg, #f5e6d3 0%, #f7cac9 50%, #ff9a9e 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 20px rgba(245, 230, 211, 0.8);
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1) rotate(-2deg); }
    100% { transform: translateX(-50%) scale(1.1) rotate(2deg); }
}

/* 主标题 */
.main-title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(3rem, 10vw, 6rem);
    margin-bottom: 20px;
    color: #5a4a42;
    text-shadow: 
        2px 2px 4px rgba(247, 202, 201, 0.8),
        4px 4px 8px rgba(152, 216, 200, 0.4);
    position: relative;
}

.main-title .word {
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

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

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

/* 金牛座符号装饰 */
.main-title::before,
.main-title::after {
    content: '♉';
    position: absolute;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #f5e6d3;
    animation: glow 2s ease-in-out infinite;
}

.main-title::before {
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.main-title::after {
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes glow {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(245, 230, 211, 0.5);
        opacity: 0.8;
    }
    50% { 
        text-shadow: 0 0 20px rgba(245, 230, 211, 0.8), 0 0 30px rgba(245, 230, 211, 0.6);
        opacity: 1;
    }
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: #98d8c8;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 3px;
}

.birthday-date {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #f7cac9;
    font-weight: 500;
    margin-bottom: 40px;
}

.birthday-date::before,
.birthday-date::after {
    content: '✨';
    margin: 0 10px;
}

/* 滚动提示 */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #5a4a42;
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.scroll-hint span {
    display: block;
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

.arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid #98d8c8;
    border-bottom: 2px solid #98d8c8;
    transform: rotate(45deg);
    margin: 0 auto;
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

@keyframes scrollDown {
    0% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
    100% { transform: rotate(45deg) translate(10px, 10px); opacity: 0; }
}

/* 通用区块标题 */
.section-title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 15px;
    color: #5a4a42;
    text-shadow: 
        1px 1px 3px rgba(247, 202, 201, 0.6),
        2px 2px 6px rgba(152, 216, 200, 0.4);
    position: relative;
}

.section-title::after {
    content: '♉';
    display: block;
    font-size: 1.5rem;
    margin-top: 10px;
    color: #f5e6d3;
}

/* 第二屏：倒计时 */
.countdown-section {
    padding: 100px 0;
    background: linear-gradient(180deg, 
        rgba(152, 216, 200, 0.1) 0%, 
        rgba(247, 202, 201, 0.1) 100%);
    position: relative;
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 50px 0;
}

.countdown-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px 25px;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(247, 202, 201, 0.2);
    border: 1px solid rgba(247, 202, 201, 0.3);
    transition: all 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(247, 202, 201, 0.3);
}

.countdown-number {
    display: block;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #f7cac9 0%, #98d8c8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Pacifico', cursive;
}

.countdown-label {
    display: block;
    font-size: 1rem;
    color: #98d8c8;
    margin-top: 5px;
    font-weight: 500;
}

.countdown-message {
    text-align: center;
    font-size: 1.1rem;
    color: #8b7b72;
    font-style: italic;
}

/* 第三屏：祝福卡片 */
.wishes-section {
    padding: 100px 0;
    position: relative;
}

.wishes-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.wish-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(152, 216, 200, 0.15);
    border: 1px solid rgba(152, 216, 200, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.wish-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(247, 202, 201, 0.1), transparent);
    transition: left 0.5s ease;
}

.wish-card:hover::before {
    left: 100%;
}

.wish-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(247, 202, 201, 0.25);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.wish-card h3 {
    font-size: 1.5rem;
    color: #f7cac9;
    margin-bottom: 15px;
    font-weight: 600;
}

.wish-card p {
    color: #7a6a62;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* 第四屏：照片墙 */
.gallery-section {
    padding: 100px 0;
    background: linear-gradient(180deg, 
        rgba(245, 230, 211, 0.2) 0%, 
        rgba(247, 202, 201, 0.1) 100%);
    position: relative;
}

.gallery-subtitle {
    text-align: center;
    color: #98d8c8;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.photo-collage {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.collage-main {
    flex: 0 0 45%;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(247, 202, 201, 0.4);
    transition: all 0.5s ease;
    aspect-ratio: 3/4;
}

.collage-main:hover {
    transform: scale(1.02);
    box-shadow: 0 30px 80px rgba(247, 202, 201, 0.6);
}

.collage-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collage-main-glow {
    position: absolute;
    inset: -3px;
    border-radius: 26px;
    background: linear-gradient(135deg, #ff9a9e, #fecfef, #a8edea, #fed6e3);
    z-index: -1;
    opacity: 0.6;
    filter: blur(12px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.collage-side {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-height: 700px;
    overflow-y: auto;
    padding-right: 5px;
}

.collage-side::-webkit-scrollbar {
    width: 4px;
}

.collage-side::-webkit-scrollbar-track {
    background: transparent;
}

.collage-side::-webkit-scrollbar-thumb {
    background: rgba(255, 154, 158, 0.3);
    border-radius: 4px;
}

.collage-item {
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.collage-item:nth-child(odd) {
    transform: rotate(-2deg);
}

.collage-item:nth-child(even) {
    transform: rotate(2deg);
}

.collage-item:hover {
    transform: rotate(0deg) scale(1.15);
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.collage-item:hover img {
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .photo-collage {
        flex-direction: column;
    }
    .collage-main {
        flex: none;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        aspect-ratio: 3/4;
    }
    .collage-side {
        grid-template-columns: repeat(4, 1fr);
        max-height: 400px;
    }
}

@media (max-width: 576px) {
    .collage-side {
        grid-template-columns: repeat(3, 1fr);
        max-height: 350px;
        gap: 10px;
    }
    .collage-main {
        max-width: 100%;
    }
}

/* 第五屏：留言板 */
.message-section {
    padding: 100px 0;
    position: relative;
}

.message-form {
    max-width: 600px;
    margin: 0 auto 50px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(247, 202, 201, 0.15);
    border: 1px solid rgba(247, 202, 201, 0.2);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(247, 202, 201, 0.3);
    border-radius: 15px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #f7cac9;
    box-shadow: 0 0 20px rgba(247, 202, 201, 0.2);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #f7cac9 0%, #98d8c8 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(247, 202, 201, 0.4);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(247, 202, 201, 0.5);
}

.submit-btn:active {
    transform: translateY(0);
}

.messages-container {
    max-width: 600px;
    margin: 0 auto;
}

.message-card {
    display: flex;
    gap: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(152, 216, 200, 0.15);
    border: 1px solid rgba(152, 216, 200, 0.2);
    animation: fadeInUp 0.5s ease;
}

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

.message-avatar {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-name {
    font-weight: 600;
    color: #f7cac9;
    margin-bottom: 8px;
}

.message-text {
    color: #7a6a62;
    line-height: 1.6;
    margin-bottom: 8px;
}

.message-time {
    font-size: 0.85rem;
    color: #98d8c8;
}

/* 页脚 */
.footer {
    padding: 50px 0;
    text-align: center;
    background: linear-gradient(180deg, 
        rgba(247, 202, 201, 0.1) 0%, 
        rgba(152, 216, 200, 0.1) 100%);
    position: relative;
}

.footer-text {
    font-size: 1.1rem;
    color: #f7cac9;
    margin-bottom: 10px;
}

.footer-subtext {
    font-size: 0.95rem;
    color: #98d8c8;
    font-style: italic;
}

/* 点击特效画布 */
#clickEffect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title::before,
    .main-title::after {
        display: none;
    }
    
    .countdown-wrapper {
        gap: 15px;
    }
    
    .countdown-item {
        padding: 20px 15px;
        min-width: 70px;
    }
    
    .wishes-cards {
        grid-template-columns: 1fr;
    }
    
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .message-form {
        padding: 25px;
    }
    
    .music-btn {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .countdown-wrapper {
        gap: 10px;
    }
    
    .countdown-item {
        padding: 15px 10px;
        min-width: 60px;
    }
}