*{margin:0;padding:0;box-sizing:border-box;}
body{
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f8f5ff;
    color: #2d3748;
    line-height: 1.5;
}
a{text-decoration:none;}
button{cursor:pointer;border:none;outline:none;font-family:inherit;}
input{font-family:inherit;outline:none;}

/* 登录页样式 */
.login-body{
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 25%, #fbc2eb 50%, #a6c1ee 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}
.login-bg-decoration{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 0;
}
.bubble{
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    animation: bubbleFloat 8s infinite ease-in-out;
}
.bubble-1{width: 120px;height: 120px;top: 10%;left: 10%;animation-delay: 0s;}
.bubble-2{width: 80px;height: 80px;top: 60%;right: 10%;animation-delay: 2s;}
.bubble-3{width: 60px;height: 60px;bottom: 15%;left: 20%;animation-delay: 4s;}
.bubble-4{width: 100px;height: 100px;top: 20%;right: 25%;animation-delay: 6s;}
@keyframes bubbleFloat{
    0%,100%{transform: translateY(0) rotate(0deg);}
    50%{transform: translateY(-30px) rotate(10deg);}
}
.login-box{
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 0 10px 40px rgba(31, 38, 135, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 1;
}
.login-header{text-align: center;margin-bottom: 35px;}
.login-header h2{
    font-size: 32px;
    background: linear-gradient(90deg, #ff6b9d, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    font-weight: 700;
}
.login-header p{color: #636e72;font-size: 16px;}
.error-tip{padding: 12px 16px;background: #fff0f0;border: 1px solid #ffccd5;color: #c53030;border-radius: 12px;margin-bottom: 20px;font-size: 14px;}
.input-group{margin-bottom: 25px;}
.input-group label{display: block;margin-bottom: 8px;color: #2d3436;font-weight: 500;font-size: 15px;}
.input-group input{
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e4f3;
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}
.input-group input:focus{border-color: #a29bfe;box-shadow: 0 0 0 4px rgba(162, 155, 254, 0.1);}
.login-btn{
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #ff6b9d, #c44569);
    color: #fff;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
}
.login-btn:hover{transform: translateY(-3px);box-shadow: 0 8px 25px rgba(255, 107, 157, 0.5);}
.login-footer{margin-top: 25px;text-align: center;}
.login-footer a{color: #a29bfe;font-size: 14px;transition: color 0.3s ease;}
.login-footer a:hover{color: #ff6b9d;}

/* 后台管理页通用样式 */
.admin-header{
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(31, 38, 135, 0.08);
    border-bottom: 1px solid rgba(162, 155, 254, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container{
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-left{display: flex;align-items: center;gap: 24px;}
.logo{display: flex;align-items: center;gap: 8px;}
.logo-icon{font-size: 24px;}
.logo-text{
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, #ff6b9d, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.header-count{color: #636e72;font-size: 15px;}
.header-count b{color: #ff6b9d;font-size: 18px;}
.header-right{display: flex;align-items: center;gap: 20px;}
.header-link{color: #636e72;font-size: 15px;transition: all 0.3s ease;padding: 8px 12px;border-radius: 8px;}
.header-link:hover{color: #a29bfe;background: rgba(162, 155, 254, 0.1);}
.logout-link:hover{color: #ff6b9d;background: rgba(255, 107, 157, 0.1);}
.admin-main{padding: 30px 20px;}
.main-container{max-width: 1400px;margin: 0 auto;}
.msg-tip{padding: 14px 20px;border-radius: 12px;margin-bottom: 24px;font-size: 15px;}
.msg-tip.success{background: #f0fff4;border: 1px solid #c6f6d5;color: #22543d;}
.msg-tip.error{background: #fff5f5;border: 1px solid #fed7d7;color: #742a2a;}
.card{
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(31, 38, 135, 0.06);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid rgba(162, 155, 254, 0.08);
}
.card-header{
    padding: 18px 25px;
    border-bottom: 1px solid #f0edf7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.card-header h3{font-size: 18px;color: #2d3436;font-weight: 600;}
.upload-tip-header{font-size: 13px;color: #999;}
.card-body{padding: 25px;}
.upload-card .card-body{padding: 0;}
#uploadForm{padding: 25px;}
.upload-area{
    border: 2px dashed #d6cfff;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #faf8ff;
    margin-bottom: 20px;
}
.upload-area:hover, .upload-area.drag-over{border-color: #a29bfe;background: #f5f2ff;}
.upload-icon{font-size: 40px;margin-bottom: 12px;}
.upload-text{font-size: 17px;color: #2d3436;font-weight: 500;margin-bottom: 6px;}
.upload-tip{font-size: 13px;color: #636e72;}

/* 多图预览样式 */
.preview-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.preview-item{
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #faf8ff;
    border: 1px solid #f0edf7;
}
.preview-item img{
    width: 100%;
    height: 80px;
    object-fit: cover;
}
.preview-remove{
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
}
.preview-name{
    font-size: 11px;
    color: #636e72;
    padding: 4px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-footer{display: flex;align-items: center;justify-content: space-between;gap: 20px;flex-wrap: wrap;}
.file-count{color: #636e72;font-size: 15px;}
.upload-btn{
    padding: 12px 32px;
    background: linear-gradient(90deg, #ff6b9d, #c44569);
    color: #fff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.upload-btn:hover:not(:disabled){transform: translateY(-2px);box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);}
.upload-btn:disabled{background: #dcdfe6;cursor: not-allowed;transform: none;box-shadow: none;}

/* 空状态 */
.empty-state{text-align: center;padding: 60px 20px;}
.empty-icon{font-size: 56px;margin-bottom: 12px;}
.empty-state p{color: #636e72;font-size: 15px;}

/* 图片网格列表（缩小后的卡片） */
.img-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.img-card{
    background: #fff;
    border: 1px solid #f0edf7;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.img-card:hover{transform: translateY(-4px);box-shadow: 0 8px 25px rgba(31, 38, 135, 0.1);border-color: #a29bfe;}
.img-cover{
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: #faf8ff;
}
.img-cover img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.img-card:hover .img-cover img{transform: scale(1.08);}
.img-info{padding: 10px 12px;border-bottom: 1px solid #f0edf7;}
.img-name{
    font-size: 13px;
    color: #2d3436;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}
.img-time{font-size: 11px;color: #999;}
.img-actions{display: flex;}
.action-btn{
    flex: 1;
    padding: 8px 0;
    background: none;
    font-size: 12px;
    transition: all 0.3s ease;
    border-right: 1px solid #f0edf7;
}
.action-btn:last-child{border-right: none;}
.copy-btn{color: #a29bfe;}
.copy-btn:hover{background: rgba(162, 155, 254, 0.1);}
.link-btn{color: #00b894;}
.link-btn:hover{background: rgba(0, 184, 148, 0.1);}
.delete-btn{color: #ff6b9d;}
.delete-btn:hover{background: rgba(255, 107, 157, 0.1);}

/* 分页样式 */
.pagination{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0edf7;
    flex-wrap: wrap;
}
.page-btn{
    padding: 9px 18px;
    background: linear-gradient(90deg, #a29bfe, #6c5ce7);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.page-btn:hover{transform: translateY(-2px);box-shadow: 0 4px 15px rgba(162, 155, 254, 0.4);}
.page-info{color: #636e72;font-size: 14px;}

/* 轻提示样式 */
.toast{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}
.toast.show{opacity: 1;transform: translate(-50%, -50%) scale(1);}

/* 响应式适配 */
@media (max-width: 768px){
    .header-container{height: auto;padding: 15px 20px;flex-direction: column;gap: 12px;}
    .header-left{flex-direction: column;gap: 8px;}
    .admin-main{padding: 20px 15px;}
    .card-body, #uploadForm{padding: 20px 15px;}
    .card-header{padding: 15px 20px;}
    .img-grid{grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));gap: 12px;}
    .img-cover{height: 100px;}
    .upload-footer{flex-direction: column;align-items: flex-start;}
    .upload-btn{width: 100%;}
    .pagination{flex-direction: column;gap: 12px;}
    .page-btn{width: 100%;text-align: center;}
    .preview-grid{grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));}
}
/* 上传进度条样式 */
.upload-progress{
    margin-top: 20px;
}
.progress-bar{
    width: 100%;
    height: 12px;
    background: #f0edf7;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-fill{
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6b9d, #a29bfe);
    border-radius: 6px;
    transition: width 0.3s ease;
}
.progress-text{
    text-align: center;
    font-size: 14px;
    color: #636e72;
}
/* 一键清空按钮样式 */
.clear-btn{
    padding: 8px 16px;
    background: linear-gradient(90deg, #ff6b6b, #c92a2a);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.clear-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}
@media (max-width: 768px){
    .clear-btn{
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
}