* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 登录区域 */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

/* 管理区域 */
.admin-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.header-title {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 表单区域 */
.form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.form-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 图片上传区域 */
.image-upload-area {
    position: relative;
}

.file-input {
    display: none;
}

.upload-preview {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.upload-preview:hover {
    border-color: #667eea;
    background: #f5f5f5;
}

.upload-placeholder {
    color: #999;
}

.upload-placeholder svg {
    margin-bottom: 12px;
    color: #ccc;
}

.upload-placeholder p {
    margin-top: 8px;
    font-size: 14px;
}

.image-preview {
    position: relative;
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.image-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4444;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.remove-image-btn:hover {
    background: #ff4444;
    color: white;
    transform: scale(1.1);
}

.upload-progress {
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    font-size: 14px;
    color: #666;
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-cancel {
    background: #dc3545;
    color: white;
    margin-left: 12px;
}

.btn-cancel:hover {
    background: #c82333;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* 列表区域 */
.list-section {
    margin-top: 30px;
}

.list-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.list-container {
    display: grid;
    gap: 16px;
}

.list-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.list-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.item-info {
    flex: 1;
}

.item-code {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.item-image {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    word-break: break-all;
}

.item-image img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid #e0e0e0;
}

.item-desc {
    font-size: 14px;
    color: #888;
    margin-bottom: 4px;
}

.item-time {
    font-size: 12px;
    color: #aaa;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.btn-edit {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-edit:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-delete:hover {
    background: #c82333;
}

.empty-tip {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 16px;
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-section {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .item-actions {
        width: 100%;
    }

    .btn-edit,
    .btn-delete {
        flex: 1;
    }
}

