/* 基础样式 */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600&family=Comic+Neue:wght@700&display=swap');

:root {
    /* 粉色系配色 */
    --pink-primary: #ff6b9e;
    --pink-secondary: #ff3d7f;
    --pink-accent: #ff1493;
    --pink-light: #fff0f5;
    --pink-dark: #d23669;
    --pink-pale: #ffdfeb;
    --text-color: #5a3d5a;

    /* 动画曲线 */
    --cubic-bounce: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

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

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--pink-light);
    background-image: url('images/background.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 头部样式 - 稳定不闪烁版本 */
header {
    background: linear-gradient(135deg, var(--pink-primary), var(--pink-secondary));
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 3rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 105, 158, 0.4);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
    z-index: 1;
    /* 性能优化 */
    backface-visibility: hidden;
    transform: translateZ(0);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><path d="M30,10 Q50,5 70,10 T90,30 Q95,50 90,70 T70,90 Q50,95 30,90 T10,70 Q5,50 10,30 T30,10" fill="white"/></svg>');
    background-size: 80px;
    opacity: 0.3;
}

header h1 {
    font-family: 'Comic Neue', cursive;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(210, 54, 105, 0.5);
    position: relative;
    display: inline-block;
    animation: fadeInDown 1s ease forwards;
    opacity: 0;
    animation-delay: 0.3s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background: white;
    border-radius: 3px;
}

header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(210, 54, 105, 0.5);
    position: relative;
    animation: fadeIn 1s ease forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 心形装饰（稳定版） */
header::after {
    content: "❤";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--pink-secondary);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
    will-change: transform;
}

/* 主内容区 */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* 卡片样式 - 3D悬浮效果 */
section {
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(255, 105, 158, 0.1),
        0 4px 16px rgba(255, 105, 158, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.5s var(--cubic-bounce);
    transform-style: preserve-3d;
    transform: perspective(500px);
}

section:hover {
    transform: translateY(-8px) perspective(500px) rotateX(2deg);
    box-shadow: 0 15px 40px rgba(255, 105, 158, 0.2),
        0 8px 24px rgba(255, 105, 158, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.6);
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to right, var(--pink-primary), var(--pink-accent));
    border-radius: 18px 18px 0 0;
    opacity: 0.7;
}

/* 个人资料样式 */
.profile {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.profile-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: 0 8px 25px rgba(255, 105, 158, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.6);
    transition: all 0.6s var(--cubic-bounce);
    position: relative;
    overflow: hidden;
}

.profile-img:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 12px 35px rgba(255, 61, 127, 0.5),
        inset 0 0 25px rgba(255, 255, 255, 0.8);
}

.profile-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 158, 0.3), rgba(255, 20, 147, 0.2));
    border-radius: 50%;
}

/* 提问表单样式 */
.question-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

textarea {
    width: 100%;
    min-height: 180px;
    padding: 1.2rem;
    border: 2px solid var(--pink-pale);
    border-radius: 12px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 2px 10px rgba(255, 105, 158, 0.1);
}

textarea:focus {
    outline: none;
    border-color: var(--pink-primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 158, 0.2),
        inset 0 2px 15px rgba(255, 105, 158, 0.15);
    background: white;
}

/* 按钮动画效果 - 超级可爱版 */
.submit-btn {
    background: linear-gradient(135deg, var(--pink-primary), var(--pink-accent));
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.5s var(--cubic-bounce);
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(255, 105, 158, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    align-self: center;
    min-width: 200px;
    text-align: center;
}

.submit-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 61, 127, 0.5);
    letter-spacing: 1.5px;
}

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

.submit-btn::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
    transform: rotate(30deg) translate(-10px, 50px);
    transition: all 0.8s ease;
}

.submit-btn:hover::before {
    transform: rotate(30deg) translate(10px, -50px);
}

/* 隐私声明 */
.privacy-note {
    font-size: 0.85rem;
    color: var(--pink-dark);
    text-align: center;
    margin-top: 1.5rem;
    position: relative;
    padding-top: 1rem;
}

.privacy-note::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--pink-primary), transparent);
}

.privacy-note i {
    margin-right: 5px;
    color: var(--pink-accent);
}

/* 页脚样式 - 粉色渐变 */
footer {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--pink-dark), #8a1242);
    color: white;
    margin-top: 4rem;
    position: relative;
    clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: white;
    font-size: 1.8rem;
    transition: all 0.5s var(--cubic-bounce);
    display: inline-flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.social-links a:hover {
    transform: translateY(-8px) scale(1.2);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        padding: 3rem 1rem;
        clip-path: polygon(0 0, 100% 0, 100% 95%, 50% 100%, 0 95%);
    }

    header h1 {
        font-size: 2.2rem;
    }

    .profile {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    section {
        padding: 2rem 1.5rem;
        margin-bottom: 2.5rem;
    }

    footer {
        clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
        padding: 2.5rem 0 3rem;
    }
}

/* 悬浮音乐播放器 - 粉色糖果风格 */
.floating-music-player {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 1000;
    transition: all 0.6s var(--cubic-bounce);
}

.player-minimized {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--pink-primary), var(--pink-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 105, 158, 0.5);
    transition: all 0.6s var(--cubic-bounce);
    position: relative;
    overflow: hidden;
}

.player-minimized::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M30,50 Q50,30 70,50 T90,50 Q70,70 50,50 T10,50" fill="none" stroke="white" stroke-width="2"/></svg>');
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
}

.player-minimized:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 12px 35px rgba(255, 61, 127, 0.7);
}

.player-expanded {
    width: 320px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 15px 50px rgba(255, 105, 158, 0.3),
        0 8px 25px rgba(255, 105, 158, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.8);
    display: none;
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    transition: all 0.7s var(--cubic-bounce);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 10000 !important;
}

.floating-music-player.expanded .player-expanded {
    display: block;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.floating-music-player.expanded .player-minimized {
    display: none;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: var(--pink-accent);
    font-weight: bold;
    font-size: 1.1rem;
    font-family: 'Comic Neue', cursive;
}

.minimize-btn {
    background: none;
    border: none;
    color: var(--pink-primary);
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.5s var(--cubic-bounce);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.minimize-btn:hover {
    color: var(--pink-dark);
    transform: rotate(180deg) scale(1.2);
    background: rgba(255, 107, 158, 0.1);
}

audio {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 50px;
}

.song-info {
    font-size: 0.95rem;
    color: var(--pink-dark);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    padding: 8px 0;
    border-radius: 8px;
    background: rgba(255, 107, 158, 0.08);
}

/* 照片墙样式 */
.photo-wall {
    margin: 4rem auto;
    max-width: 1200px;
}

.photo-wall h2 {
    text-align: center;
    color: var(--pink-accent);
    margin-bottom: 2.5rem;
    font-size: 2rem;
    font-family: 'Comic Neue', cursive;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.photo-wall h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--pink-primary), transparent);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 20px;
}

.photo-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 105, 158, 0.2);
    transition: all 0.6s var(--cubic-bounce);
    aspect-ratio: 1/1;
    transform-style: preserve-3d;
}

.photo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 158, 0.2), rgba(255, 20, 147, 0.1));
    z-index: 1;
    transition: all 0.5s ease;
}

.photo-item:hover {
    transform: translateY(-10px) rotate(2deg) scale(1.03);
    box-shadow: 0 15px 40px rgba(255, 61, 127, 0.3);
}

.photo-item:hover::before {
    opacity: 0;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease, filter 0.5s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.05) saturate(1.2);
}

/* 照片放大效果 */
.photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.photo-overlay.active {
    opacity: 1;
}

.photo-modal {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.8);
    transition: transform 0.5s var(--cubic-bounce);
}

.photo-overlay.active .photo-modal {
    transform: scale(1);
}

.photo-modal img {
    max-height: 80vh;
    max-width: 90vw;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.close-btn:hover {
    color: var(--pink-primary);
    transform: rotate(90deg) scale(1.2);
}

/* 飘落樱花效果 */
.sakura {
    position: fixed;
    top: -20px;
    z-index: 999;
    color: rgba(255, 192, 203, 0.7);
    font-size: 1.2rem;
    animation: fall linear infinite;
    pointer-events: none;
    user-select: none;
}

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

/* 响应式设计 - 照片墙 */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .photo-wall h2 {
        font-size: 1.8rem;
    }
}

/* 轮播样式 */
.media-carousel {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9比例 */
    overflow: hidden;
    border-radius: 12px;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-item iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 轮播控制按钮 */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    color: var(--pink-primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

@media (max-width: 768px) {

    .carousel-prev,
    .carousel-next {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }
}

/* 原声带部分样式 */
.soundtrack-section {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(255, 105, 158, 0.1);
}

.soundtrack-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, rgba(255, 107, 158, 0.1), rgba(255, 20, 147, 0.05));
    color: var(--pink-dark);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
}

.soundtrack-title i {
    margin-right: 0.5rem;
    color: var(--pink-accent);
}

.toggle-soundtrack {
    transition: transform 0.3s ease;
}

.soundtrack-title.active .toggle-soundtrack {
    transform: rotate(180deg);
}

.soundtrack-content {
    padding: 1rem;
    display: none;
}

.soundtrack-title.active+.soundtrack-content {
    display: block;
}

.soundtrack-select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--pink-pale);
    border-radius: 8px;
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6b9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
}

.soundtrack-select:focus {
    outline: none;
    border-color: var(--pink-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 158, 0.2);
}

.soundtrack-player {
    width: 100%;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.soundtrack-player::-webkit-media-controls-panel {
    background: linear-gradient(to right, var(--pink-primary), var(--pink-accent));
}

.soundtrack-player::-webkit-media-controls-play-button,
.soundtrack-player::-webkit-media-controls-mute-button {
    filter: brightness(0) invert(1);
}