body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #f7f7f7;
    margin: 0;
    color: #222;
}
.header {
    background: #222;
    color: #fff;
    padding: 16px 0;
}
.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}
.container {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-main {
    max-width: 1200px;
    margin: 32px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 32px 24px;
}
.login-panel, .manage-panel {
    /* max-width: 400px; */
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}
.login-panel h2, .manage-panel h2 {
    margin-bottom: 16px;
}
#login-form input {
    width: 80%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
#login-form button {
    padding: 10px 24px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.login-error {
    color: #d00;
    margin-top: 8px;
    font-size: 1em;
}
.upload-section, .list-section {
    margin-bottom: 32px;
}
#upload-form input[type="file"] {
    margin-bottom: 12px;
}
#upload-form input[type="text"] {
    width: 40%;
    margin: 0 8px 12px 0;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
#upload-form button {
    padding: 8px 20px;
    background: #0078d7;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.upload-msg {
    color: #0078d7;
    margin-top: 8px;
}
#image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    align-items: flex-start;
    margin-top: 24px;
}
.image-item {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 28px 18px 20px 18px;
    width: 340px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transition: box-shadow 0.2s, transform 0.2s;
}
.image-item:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    transform: translateY(-6px) scale(1.04);
}
.image-item img.thumb {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}
.image-item input[type="text"],
.image-item textarea {
    width: 98%;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #bbb;
    border-radius: 5px;
    font-size: 1.08em;
    resize: vertical;
}
.image-item .edit-tags {
    margin-bottom: 14px;
    color: #0078d7;
    font-size: 1em;
}
.image-item textarea {
    min-height: 48px;
    max-height: 120px;
}
.image-item .save-btn {
    padding: 10px 28px;
    background: #0078d7;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 8px;
    font-size: 1.08em;
}
.drop-area {
    border: 2px dashed #0078d7;
    border-radius: 8px;
    padding: 32px 0 16px 0;
    margin-bottom: 16px;
    background: #f0f6ff;
    color: #0078d7;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.drop-area.dragover {
    border-color: #005bb5;
    background: #e6f0ff;
}
.drop-area i {
    margin-bottom: 8px;
    display: block;
}
.img-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s;
}
.img-modal.active {
    display: flex;
}
.img-modal-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    background: #fff;
    padding: 8px;
}
.img-modal-close {
    position: absolute;
    top: 32px;
    right: 48px;
    font-size: 2.5em;
    color: #fff;
    cursor: pointer;
    z-index: 10000;
    user-select: none;
    -webkit-user-select: none;
}
.batch-save-tool {
    position: fixed;
    right: 36px;
    bottom: 36px;
    z-index: 10010;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.batch-save-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0078d7;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    font-size: 2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
}
.batch-save-btn:hover {
    background: #005bb5;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}
.batch-save-msg {
    margin-top: 10px;
    background: #fff;
    color: #0078d7;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    padding: 8px 18px;
    font-size: 1.08em;
    min-width: 120px;
    text-align: center;
    display: none;
}

/* 新增样式：上传设置表单 */
.upload-settings {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.upload-settings h3 {
    margin: 0 0 16px 0;
    color: #495057;
    font-size: 1.1em;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.setting-item {
    display: flex;
    flex-direction: column;
}

.setting-item label {
    font-weight: 500;
    margin-bottom: 6px;
    color: #495057;
}

.setting-item input,
.setting-item textarea,
.setting-item select {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.setting-item input:focus,
.setting-item textarea:focus,
.setting-item select:focus {
    outline: none;
    border-color: #0078d7;
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.1);
}

.setting-item textarea {
    resize: vertical;
    min-height: 60px;
}

.favorite-selector {
    display: flex;
    gap: 8px;
    align-items: center;
}

.favorite-selector select {
    flex: 1;
}

.add-favorite-btn {
    padding: 10px 12px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.add-favorite-btn:hover {
    background: #218838;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.form-actions button[type="submit"] {
    background: #0078d7;
    color: #fff;
}

.form-actions button[type="submit"]:hover {
    background: #005bb5;
}

.form-actions button[type="button"] {
    background: #6c757d;
    color: #fff;
}

.form-actions button[type="button"]:hover {
    background: #545b62;
}
