/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    background: #0a0a1a;
    color: #f0e6f6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 星空背景与动态渐变 */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
}

.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(320deg, 
                                #1a0b2e 0%, 
                                #0d0520 25%, 
                                #3d2352 50%, 
                                #6a1b9a 75%, 
                                #8e24aa 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    z-index: -4;
    opacity: 0.7;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: rgba(123, 31, 162, 0.3);
    border-radius: 50px;
    border: 1px solid #7b1fa2;
    font-size: 1rem;
    animation: pulse 2s infinite;
}

.hint i {
    color: #f48fb1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.hint.clicked {
    color: rgba(255, 255, 255, 0.8);
    transform: scale(0.98);
}

.hint.secret-flash {
    animation: secretFlash 0.6s ease-out;
}

@keyframes secretFlash {
    0% { background: rgba(216, 120, 255, 0); color: rgba(255, 255, 255, 0.6); }
    50% { background: rgba(216, 120, 255, 0.3); color: #fff; transform: scale(1.05); }
    100% { background: rgba(216, 120, 255, 0); color: rgba(255, 255, 255, 0.6); }
}

/* 主容器与标题 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    border: 1px solid rgba(255, 182, 193, 0.2);
    box-shadow: 0 20px 60px rgba(142, 36, 170, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.main-title {
    font-family: 'Dancing Script', cursive;
    font-size: 5rem;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #fad0c4, #a18cd1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 10px rgba(255, 154, 158, 0.5)); }
    to { filter: drop-shadow(0 0 25px rgba(161, 140, 209, 0.8)); }
}

.subtitle {
    font-size: 1.4rem;
    color: #d1c4e9;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

/* 惊喜卡片网格 */
.surprise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.surprise-card {
    background: rgba(30, 15, 50, 0.7);
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.surprise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                                rgba(255, 105, 180, 0.1) 0%, 
                                rgba(138, 43, 226, 0.1) 100%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s;
}

.surprise-card:hover {
    transform: translateY(-15px) scale(1.03);
    border-color: #ba68c8;
    box-shadow: 0 25px 50px rgba(186, 104, 200, 0.4);
}

.surprise-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 25px;
    color: #f8bbd9;
    transition: transform 0.5s;
    z-index: 1;
}

.surprise-card:hover .card-icon {
    transform: rotate(20deg) scale(1.2);
}

.card-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #e1bee7;
    z-index: 1;
}

.card-desc {
    color: #b39ddb;
    line-height: 1.7;
    z-index: 1;
    font-size: 1.1rem;
}

/* 卡片内容区（初始隐藏） */
.card-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.8s ease, opacity 0.8s ease, margin-top 0.8s ease;
    width: 100%;
    margin-top: 0;
}

.card-content.show {
    max-height: 1000px;
    opacity: 1;
    margin-top: 30px;
}

.love-letter {
    background: rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 20px;
    border-left: 5px solid #f48fb1;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.9;
}

.love-letter p {
    margin-bottom: 15px;
}

.photo-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
}

/* 音频播放器美化 */
.audio-container {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 20px;
    border: 2px dashed #7e57c2;
}

.audio-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    color: #d1c4e9;
}

.audio-title i {
    color: #f48fb1;
}

.custom-audio {
    width: 100%;
    height: 60px;
    border-radius: 15px;
    outline: none;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    color: #b39ddb;
    font-size: 1rem;
}

.footer-heart {
    color: #ff4081;
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
    margin: 0 8px;
}

/* 粒子容器 */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -2;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .main-title { font-size: 3.5rem; }
    .surprise-grid { grid-template-columns: 1fr; }
    .surprise-card { min-height: 280px; padding: 30px 20px; }
}
