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

body {
    font-family: 'Noto Serif SC', serif;
    background-color: #fff5f5;
    color: #4a4a4a;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 0;
    position: relative;
}

.title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3.5rem;
    color: #ff6b6b;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
}

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

.heart {
    position: relative;
    width: 100px;
    height: 90px;
    margin: 30px auto;
}

.heart:before,
.heart:after {
    position: absolute;
    content: "";
    left: 50px;
    top: 0;
    width: 50px;
    height: 80px;
    background: #ff6b6b;
    border-radius: 50px 50px 0 0;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.heart:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

.heart:before {
    animation: pulse-left 1.5s infinite;
}

.heart:after {
    animation: pulse-right 1.5s infinite;
}

@keyframes pulse-left {
    0% {
        transform: rotate(-45deg) scale(0.8);
    }
    5% {
        transform: rotate(-45deg) scale(0.9);
    }
    10% {
        transform: rotate(-45deg) scale(0.8);
    }
    15% {
        transform: rotate(-45deg) scale(1);
    }
    50% {
        transform: rotate(-45deg) scale(0.8);
    }
    100% {
        transform: rotate(-45deg) scale(0.8);
    }
}

@keyframes pulse-right {
    0% {
        transform: rotate(45deg) scale(0.8);
    }
    5% {
        transform: rotate(45deg) scale(0.9);
    }
    10% {
        transform: rotate(45deg) scale(0.8);
    }
    15% {
        transform: rotate(45deg) scale(1);
    }
    50% {
        transform: rotate(45deg) scale(0.8);
    }
    100% {
        transform: rotate(45deg) scale(0.8);
    }
}

.message {
    margin: 50px 0;
}

.message-card {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.1);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    line-height: 2;
    border: 2px solid #ffb8b8;
    transition: transform 0.3s ease;
}

.message-card:hover {
    transform: translateY(-5px);
}

.message-card p {
    margin-bottom: 10px;
}

.signature {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: #ff6b6b;
    margin-top: 20px;
}

.gallery {
    margin: 80px 0;
    text-align: center;
}

h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.5rem;
    color: #ff6b6b;
    margin-bottom: 30px;
    text-align: center;
}

.photo-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.photo {
    width: 300px;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.photo:hover {
    transform: scale(1.05);
}

.photo.active {
    box-shadow: 0 0 0 4px #ff6b8a, 0 10px 30px rgba(255, 80, 80, 0.4);
    transform: scale(1.05);
}

.photo1 {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.photo2 {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

.photo3 {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

/* 双击上传提示文字 */
.photo-upload-hint {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 0;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.25);
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.photo:hover .photo-upload-hint {
    opacity: 1;
}

.photo-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 107, 107, 0.32);
    color: white;
    padding: 10px;
    font-size: 1.1rem;
    transition: background-color 0.5s ease;
}

.photo:hover .photo-text {
    background: rgba(255, 107, 107, 0.9);
    animation: text-heartbeat 1.5s infinite;
}

/* 上传中遮罩 */
.photo-uploading-mask {
    position: absolute;
    inset: 0;
    background: rgba(255, 107, 107, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    pointer-events: none;
}

.photo-uploading-mask::after {
    content: '上传中…';
    color: #fff;
    font-size: 1rem;
    letter-spacing: 2px;
}

@keyframes text-heartbeat {
    0% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.05);
    }
    30% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.05);
    }
    60% {
        transform: scale(1);
    }
}

.poem {
    margin: 80px 0;
}

.poem-text {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.1);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    line-height: 2;
    border-left: 5px solid #ff6b6b;
}

.wishes {
    margin: 80px 0;
}

.wish-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.wish {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.1);
    width: 250px;
    text-align: center;
    transition: transform 0.3s ease;
}

.wish:hover {
    transform: translateY(-10px);
}

.wish-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

footer {
    margin-top: 100px;
    padding: 20px 0;
    border-top: 1px solid #ffb8b8;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.love-declaration {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.5rem;
    color: #ff6b6b;
}

.icp-info {
    font-size: 0.9rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icp-icon {
    width: 14px;
    height: 14px;
    margin-right: 5px;
    vertical-align: middle;
}

.icp-info a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.icp-info a:hover {
    color: #ff6b6b;
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .message-card, .poem-text {
        padding: 20px;
        font-size: 1rem;
    }

    .photo {
        width: 100%;
        max-width: 300px;
    }

    h2 {
        font-size: 2rem;
    }

    .wish {
        width: 100%;
        max-width: 250px;
    }
}

/* ==================== 帘幕效果 ==================== */

.curtain-overlay {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    z-index: 9999;
    cursor: pointer;
    overflow: hidden;
    text-align: center;
    line-height: 50px;

    background: linear-gradient(
        160deg,
        #fff0f5 0%,
        #ffe4ee 20%,
        #ffd8e4 40%,
        #ffc8d8 60%,
        #ffb8cc 80%,
        #ffa8bc 100%
    );
}

.curtain-overlay p {
    opacity: 0;
}

.curtain-overlay p:nth-child(1) {
    margin: 100px auto 0 auto;
    overflow: hidden;
}

.curtain-overlay p:nth-child(n+2) {
    margin: 0 auto;
    overflow: hidden;
}

.curtain-icp {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
}

.curtain-icp img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.curtain-icp a {
    color: rgba(180, 50, 70, 0.75);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: 'Noto Serif SC', serif;
}

/* ==================== 上传提示 Toast ==================== */

.upload-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(50, 50, 50, 0.88);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    z-index: 9998;
    white-space: nowrap;
}

.upload-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.upload-toast.success {
    background: rgba(60, 160, 100, 0.9);
}

.upload-toast.error {
    background: rgba(200, 60, 60, 0.9);
}

/* ==================== 笔记悬浮按钮 ==================== */
.notes-fab {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-fab:hover {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 6px 24px rgba(255, 107, 107, 0.6);
}

.notes-fab:active {
    transform: scale(0.95);
}

/* ==================== 笔记弹窗 ==================== */
.notes-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notes-overlay.show {
    opacity: 1;
    visibility: visible;
}

.notes-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

.notes-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.notes-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 2px solid #ffe8e8;
    flex-shrink: 0;
}

.notes-modal-header h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: #ff6b6b;
    margin: 0;
}

.notes-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 0 4px;
}

.notes-modal-close:hover {
    color: #ff6b6b;
}

/* 写笔记区域 */
.notes-write-section {
    padding: 18px 24px;
    border-bottom: 2px solid #ffe8e8;
    flex-shrink: 0;
}

.notes-write-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.note-title-input {
    flex: 1;
    border: 1.5px solid #ffd0d0;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 1rem;
    font-family: 'Noto Serif SC', serif;
    color: #4a4a4a;
    outline: none;
    transition: border-color 0.2s;
    background: #fffaf8;
}

.note-title-input:focus {
    border-color: #ff6b6b;
    background: #fff;
}

.note-title-input::placeholder {
    color: #ccc;
    font-size: 0.9rem;
}

.notes-write-date {
    font-size: 0.85rem;
    color: #bbb;
    white-space: nowrap;
    font-family: 'Ma Shan Zheng', cursive;
}

.note-content-input {
    width: 100%;
    border: 1.5px solid #ffd0d0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Noto Serif SC', serif;
    color: #4a4a4a;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    background: #fffaf8;
}

.note-content-input:focus {
    border-color: #ff6b6b;
    background: #fff;
}

.note-content-input::placeholder {
    color: #ccc;
}

.note-submit-btn {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Ma Shan Zheng', cursive;
    cursor: pointer;
    letter-spacing: 2px;
    transition: opacity 0.2s, transform 0.15s;
}

.note-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.note-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 笔记列表 */
.notes-list-section {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    min-height: 0;
}

.notes-list-empty {
    text-align: center;
    color: #ccc;
    padding: 40px 0;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.1rem;
    line-height: 2;
}

.notes-list-empty p:first-child {
    font-size: 1.3rem;
    color: #ffb0b0;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-card {
    background: linear-gradient(135deg, #fff5f5, #fff);
    border: 1.5px solid #ffd0d0;
    border-radius: 14px;
    padding: 14px 18px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.15);
    border-color: #ffb0b0;
}

.note-card.is-today {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #fff0f0, #fff);
}

.note-card-date {
    font-size: 0.78rem;
    color: #ff8e53;
    font-family: 'Ma Shan Zheng', cursive;
    margin-bottom: 4px;
}

.note-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #4a4a4a;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-card-preview {
    font-size: 0.88rem;
    color: #999;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 笔记详情 */
.note-detail-section {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    min-height: 0;
}

.note-detail-back {
    font-size: 0.9rem;
    color: #ff6b6b;
    cursor: pointer;
    margin-bottom: 16px;
    font-family: 'Ma Shan Zheng', cursive;
    transition: opacity 0.2s;
}

.note-detail-back:hover {
    opacity: 0.7;
}

.note-detail-meta {
    border-bottom: 2px solid #ffe8e8;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.note-detail-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4a4a4a;
    margin-bottom: 6px;
}

.note-detail-date {
    font-size: 0.82rem;
    color: #bbb;
    font-family: 'Ma Shan Zheng', cursive;
}

.note-detail-content {
    font-size: 1rem;
    color: #4a4a4a;
    line-height: 2;
    white-space: pre-wrap;
    padding-bottom: 20px;
}

.note-detail-footer {
    border-top: 1px solid #ffe8e8;
    padding-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.note-delete-btn {
    background: none;
    border: 1.5px solid #ffcccc;
    color: #ff8888;
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Ma Shan Zheng', cursive;
    transition: background 0.2s, color 0.2s;
}

.note-delete-btn:hover {
    background: #fff0f0;
    color: #ff5555;
    border-color: #ff9999;
}

/* 滚动条美化 */
.notes-list-section::-webkit-scrollbar,
.note-detail-section::-webkit-scrollbar {
    width: 5px;
}

.notes-list-section::-webkit-scrollbar-thumb,
.note-detail-section::-webkit-scrollbar-thumb {
    background: #ffd0d0;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .notes-modal {
        width: 95%;
        max-height: 90vh;
    }

    .notes-fab {
        right: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
} 