* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 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;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 背景装饰心形 */
.hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.hearts::before,
.hearts::after {
    content: '💕';
    position: absolute;
    font-size: 30px;
    opacity: 0.3;
    animation: float 20s infinite;
}

.hearts::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.hearts::after {
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

/* 浮动心形 */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.floating-hearts .heart {
    position: absolute;
    font-size: 25px;
    opacity: 0.4;
    animation: floatHeart 15s infinite;
}

.floating-hearts .heart:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.floating-hearts .heart:nth-child(2) {
    left: 40%;
    animation-delay: 3s;
}

.floating-hearts .heart:nth-child(3) {
    left: 60%;
    animation-delay: 6s;
}

.floating-hearts .heart:nth-child(4) {
    left: 80%;
    animation-delay: 9s;
}

.floating-hearts .heart:nth-child(5) {
    left: 50%;
    animation-delay: 12s;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 主内容区 */
.content {
    position: relative;
    z-index: 1;
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title-section {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.main-title {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-content {
    text-align: center;
}

.message {
    margin-bottom: 25px;
}

.message-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    font-weight: 400;
}

/* 表白文案 */
.proposal-message {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 143, 171, 0.1));
    border-radius: 20px;
    border: 2px solid rgba(255, 107, 157, 0.3);
}

.proposal-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #ff6b9d;
    font-weight: 500;
    text-align: center;
    margin: 0;
    animation: fadeIn 1s ease-in;
    text-shadow: 0 1px 3px rgba(255, 107, 157, 0.3);
}

/* 按钮样式 */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: white;
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary:active {
    transform: scale(0.95);
}

/* 按钮禁用状态 */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 回忆记录按钮 */
.btn-memory {
    position: fixed;
    bottom: 85px;
    right: 20px;
    z-index: 100;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-memory:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-memory:active {
    transform: scale(0.95);
}

/* 音乐控制按钮 */
.btn-music {
    position: fixed;
    bottom: 40px;
    right: 20px;
    z-index: 100;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-music:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 107, 157, 0.4);
}

.btn-music:active {
    transform: scale(0.95);
}

/* 音乐播放状态动画 */
.btn-music.playing {
    animation: rotate 3s linear infinite;
}

/* 旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 情书样式 */


/* 倒计时样式 */
.countdown {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    text-align: center;
    position: relative;
}



.countdown h3 {
    color: #ff6b9d;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.countdown-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 10px;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.time-unit .number {
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b9d;
    line-height: 1;
    margin-bottom: 3px;
}

.time-unit .label {
    font-size: 0.8rem;
    color: #666;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* 隐藏类 */
.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

/* 通用过渡效果 */
.card,
.countdown,
.moments-feed,
.heart-message-section,
.music-control-btn {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 照片框架和倒计时显示动画 */
.photo-frame, .countdown {
    animation: fadeIn 0.8s ease-in;
}

/* 内容加载动画 */
@keyframes contentLoad {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片淡出动画 */
@keyframes cardFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.95);
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .card, .frame, .countdown {
        padding: 20px;
    }
    
    .message-text {
        font-size: 1rem;
    }
    
    .time-unit .number {
        font-size: 2rem;
    }
}

/* 点击特效 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* 朋友圈样式 */
.moments-feed {
    margin-top: 30px;
    animation: fadeIn 0.8s ease-in;
}

.moments-title {
    text-align: center;
    color: #ff6b9d;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(255, 107, 157, 0.3);
}

.moments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.moment-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: slideUp 0.6s ease-out;
}

.moment-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.moment-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.moment-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.moment-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.moment-image:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.moment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #999;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.moment-date {
    font-weight: 500;
}

.moment-actions {
    display: flex;
    gap: 15px;
}

.moment-action {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.moment-action:hover {
    background: rgba(255, 107, 157, 0.1);
    color: #ff6b9d;
}

.no-moments {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.8s ease-in;
}

.no-moments p {
    margin: 0;
    font-size: 1rem;
}

.moments-loading {
    text-align: center;
    color: #ff6b9d;
    padding: 20px;
    font-size: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

/* 朋友圈图片预览弹窗 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.image-preview-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.image-preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.image-preview {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.close-preview {
    position: absolute;
    top: -40px;
    right: -40px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-preview:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* 图片预览包装器 */
.image-preview-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 预览导航按钮 */
.preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 36px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    user-select: none;
}

.preview-prev {
    left: 20px;
}

.preview-next {
    right: 20px;
}

.preview-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

/* 图片指示器 */
.image-preview-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10001;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.3);
}

/* 图片计数器 */
.image-preview-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10001;
}

/* 图片触摸优化 */
.image-preview {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

/* 说句心里话区域样式 */
.heart-message-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.8s ease-in;
}

.heart-message-title {
    color: #ff6b9d;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(255, 107, 157, 0.3);
}

.heart-message-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.heart-message-input {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid rgba(255, 107, 157, 0.3);
    border-radius: 15px;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.heart-message-input:focus {
    outline: none;
    border-color: #ff6b9d;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.heart-message-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.heart-message-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 15px;
    border-left: 4px solid #ff6b9d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
}

.heart-message-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.heart-message-date {
    font-size: 0.8rem;
    color: #999;
    text-align: right;
}

.heart-message-no {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 1rem;
}

/* 心里话发送成功样式 */
.heart-message-success-section {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 143, 171, 0.1));
    border: 2px solid rgba(255, 107, 157, 0.3);
    animation: fadeIn 0.8s ease-in;
}

.heart-message-success {
    text-align: center;
    padding: 40px 20px;
}

.heart-message-success-title {
    color: #ff5280;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8), 0 3px 6px rgba(255, 82, 128, 0.3);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.heart-message-success-text {
    color: #444;
    font-size: 1.2rem;
    line-height: 2;
    margin-bottom: 30px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.heart-message-success-emoji {
    font-size: 4rem;
    animation: bounce 2s ease-in-out infinite;
    margin-top: 20px;
}

/* 弹跳动画 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* 响应式朋友圈 */
@media (max-width: 480px) {
    .moment-images {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .moment-image {
        height: 100px;
    }
    
    .moment-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .moment-actions {
        align-self: flex-end;
    }
    
    /* 说句心里话响应式 */
    .heart-message-section {
        padding: 20px;
    }
    
    .heart-message-input {
        min-height: 100px;
        font-size: 0.9rem;
    }
}
