/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #e91e63 0%, #ff80ab 100%);
    padding: 0;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-brand a {
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    padding: 15px 0;
    display: block;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 15px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #ffebee;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: white;
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.container {
    width: 100%;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.page-header h1 {
    color: #e91e63;
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #888;
    font-size: 18px;
}

/* 图片网格 */
.gallery-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(255, 182, 193, 0.15);
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.photo-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #ffe4e9;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(233, 30, 99, 0.15);
}

.photo-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-card:hover .photo-wrapper img {
    transform: scale(1.05);
}

.photo-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-info {
    flex: 1;
}

.download-count {
    color: #666;
    font-size: 14px;
}

.download-btn {
    background: transparent;
    border: 2px solid #e91e63;
    color: #e91e63;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.download-btn:hover {
    background: #e91e63;
    color: white;
    transform: translateY(-2px);
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.page-btn {
    background: linear-gradient(135deg, #e91e63, #ff80ab);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.3);
}

.page-info {
    color: #666;
    font-size: 16px;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.footer p {
    margin: 10px 0;
    color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .nav-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-menu {
        margin-top: 10px;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .photo-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .download-btn {
        width: 100%;
    }
}

/* 弹窗样式 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e91e63;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 占位符样式 */
.placeholder-img {
    background: linear-gradient(45deg, #ffebee 25%, #fff 25%, #fff 50%, #ffebee 50%, #ffebee 75%, #fff 75%, #fff);
    background-size: 100px 100px;
    animation: placeholder-shimmer 2s infinite;
}

@keyframes placeholder-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}