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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    min-height: 100vh;
}

/* 顶部标题栏 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
}

.close-btn, .menu-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-btn:hover, .menu-btn:hover {
    background-color: #333;
}

.title {
    font-size: 18px;
    font-weight: 600;
}

/* 登录区域 */
.login-section {
    padding: 20px;
}

.login-box {
    display: flex;
    gap: 10px;
}

.password-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: #222;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.password-input:focus {
    border-color: #007bff;
}

.login-btn {
    padding: 12px 25px;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #0056b3;
}

/* 管理区域 */
.admin-section {
    padding: 15px 20px;
    background-color: #222;
    border-bottom: 1px solid #333;
}

.upload-box {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.upload-btn {
    padding: 10px 20px;
    background-color: #28a745;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #218838;
}

.category-select {
    padding: 10px 15px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.upload-status {
    font-size: 13px;
    color: #28a745;
}

/* 提示信息 */
.tips-section {
    padding: 15px 20px;
    background-color: #222;
    margin: 15px;
    border-radius: 10px;
}

.tips-section p {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin: 5px 0;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #333;
    color: #fff;
}

.tab-btn.active {
    background-color: #007bff;
    color: #fff;
}

.tab-btn:hover {
    background-color: #444;
}

.tab-btn.active:hover {
    background-color: #0056b3;
}

/* 图片展示区域 */
.gallery-container {
    padding: 0 15px 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-item {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

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

.item-number {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.item-label {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 预览弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #ccc;
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 10px;
}

.image-number {
    position: absolute;
    bottom: -30px;
    left: 0;
    color: #999;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header {
        padding: 12px 15px;
    }
    
    .title {
        font-size: 16px;
    }
    
    .tips-section {
        margin: 10px;
        padding: 12px;
    }
    
    .tips-section p {
        font-size: 12px;
    }
    
    .category-tabs {
        padding: 0 10px;
    }
    
    .tab-btn {
        padding: 8px 18px;
        font-size: 13px;
    }
}