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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f9f0ff 0%, #fff0f5 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* 头部样式 */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    border-radius: 20px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="rgba(255,255,255,0.1)" d="M50,0 C77.6,0 100,22.4 100,50 C100,77.6 77.6,100 50,100 C22.4,100 0,77.6 0,50 C0,22.4 22.4,0 50,0 Z"/></svg>');
    background-size: 60px;
    opacity: 0.1;
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.logo i {
    color: #ffeb3b;
    margin-right: 15px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.love-quote {
    margin-top: 20px;
    font-style: italic;
    font-size: 1.1rem;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 40px;
}

.upload-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.upload-card h2 {
    color: #ff6b9d;
    margin-bottom: 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #ff6b9d;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ff6b9d;
    font-weight: 500;
}

.file-label:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #ff3d7f;
}

.file-label i {
    font-size: 1.5rem;
}

#photoInput {
    display: none;
}

.file-info {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
    min-height: 20px;
}

input[type="text"],
textarea {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #ff6b9d;
}

textarea {
    resize: vertical;
}

.upload-btn {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff3d7f 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

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

/* 照片墙样式 */
.gallery-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff6b9d;
}

.section-header h2 {
    color: #ff6b9d;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.photo-count {
    background: #ff6b9d;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.photo-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.photo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: white;
}

.photo-info {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.photo-card:hover .photo-info {
    transform: translateY(0);
}

.photo-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
}

.photo-message {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-date {
    font-size: 0.8rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 5px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ff6b9d;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #666;
}

.empty-state p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    z-index: 1001;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #ff6b9d;
    color: white;
}

.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
}

#modalImage {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    #modalImage {
        width: 60%;
        height: auto;
        max-height: 70vh;
    }
}

.modal-info {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#modalTitle {
    font-size: 1.8rem;
    color: #ff6b9d;
    margin-bottom: 15px;
}

#modalMessage {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    flex: 1;
}

.modal-meta {
    margin-bottom: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#modalDate {
    font-size: 0.9rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
}

.delete-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

/* 底部样式 */
.footer {
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 15px;
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.love-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.love-message i {
    color: #ff6b9d;
    font-size: 1.5rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.footer-info p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.tech-info {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .modal-content {
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 30px 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .upload-card,
    .photo-card {
        padding: 20px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6b9d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.notification.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.notification.error {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
}

.notification.info {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}